@@ -382,22 +382,22 @@ on class [code RabbitMQ.Client.IModel].
382
382
383
383
The class [code RabbitMQ.Client.MessagePatterns.Subscription]
384
384
implements most of the boilerplate of receiving messages (including,
385
- in particular, broadcast events) for you, including queue and exchange
386
- declaration and queue binding, as well as consumer declaration and
387
- management . For example,
385
+ in particular, broadcast events) for you, including consumer
386
+ declaration and management, but excluding queue and exchange
387
+ declaration and queue binding . For example,
388
388
389
389
@code java
390
390
// "IModel ch" in scope.
391
- Subscription sub = new Subscription(ch, "price", "topic", " STOCK.IBM.#");
391
+ Subscription sub = new Subscription(ch, "STOCK.IBM.#");
392
392
foreach (BasicDeliverEventArgs e in sub) {
393
393
// handle the message contained in e ...
394
394
// ... and finally acknowledge it
395
395
sub.Ack(e);
396
396
}
397
397
398
- will declare the relevant exchange, declare a temporary queue, bind
399
- the two together, and start a consumer on the queue using [code
400
- IModel.BasicConsume] .
398
+ will start a consumer on the queue using [code IModel.BasicConsume].
399
+ It is assumed that the queue and any bindings have been previously
400
+ declared .
401
401
402
402
[code Subscription.Ack()] should be called for each received event,
403
403
whether or not auto-acknowledgement mode is used, because [code
0 commit comments