@@ -154,6 +154,63 @@ public function pushToQueue($queue, $message)
154
154
$ this ->connection ->channel ()->basic_publish ($ message , '' , $ queue );
155
155
}
156
156
157
+ /**
158
+ * Declares an exchange
159
+ *
160
+ * This is an alias of method `exchange_declare` of `PhpAmqpLib\Channel\AMQPChannel`.
161
+ *
162
+ * ```php
163
+ * <?php
164
+ * $I->declareExchange(
165
+ * 'nameOfMyExchange', // exchange name
166
+ * 'topic' // exchange type
167
+ * //.. see the original method for more options
168
+ * )
169
+ * ```
170
+ */
171
+ public function declareExchange ()
172
+ {
173
+ return call_user_func_array ([$ this ->connection ->channel (), 'exchange_declare ' ], func_get_args ());
174
+ }
175
+
176
+ /**
177
+ * Declares a queue
178
+ *
179
+ * This is an alias of method `queue_declare` of `PhpAmqpLib\Channel\AMQPChannel`.
180
+ *
181
+ * ```php
182
+ * <?php
183
+ * $I->declareQueue(
184
+ * 'nameOfMyQueue', // exchange name
185
+ * //.. see the original method for more options
186
+ * )
187
+ * ```
188
+ */
189
+ public function declareQueue ()
190
+ {
191
+ return call_user_func_array ([$ this ->connection ->channel (), 'queue_declare ' ], func_get_args ());
192
+ }
193
+
194
+ /**
195
+ * Binds a queue to an exchange
196
+ *
197
+ * This is an alias of method `queue_bind` of `PhpAmqpLib\Channel\AMQPChannel`.
198
+ *
199
+ * ```php
200
+ * <?php
201
+ * $I->bindQueueToExchange(
202
+ * 'nameOfMyQueueToBind', // name of the queue
203
+ * 'transactionTracking.transaction', // exchange name to bind to
204
+ * 'your.routing.key' // Optionally, provide a binding key
205
+ * //.. see the original method for more options
206
+ * )
207
+ * ```
208
+ */
209
+ public function bindQueueToExchange ()
210
+ {
211
+ return call_user_func_array ([$ this ->connection ->channel (), 'queue_bind ' ], func_get_args ());
212
+ }
213
+
157
214
/**
158
215
* Checks if message containing text received.
159
216
*
0 commit comments