Skip to content

Commit 8028d21

Browse files
author
Alexandru Scvortov
committed
updated MessagePatterns wikipage
1 parent a34b75a commit 8028d21

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/wikipages/data.MessagingPatterns.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -382,22 +382,22 @@ on class [code RabbitMQ.Client.IModel].
382382

383383
The class [code RabbitMQ.Client.MessagePatterns.Subscription]
384384
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,
388388

389389
@code java
390390
// "IModel ch" in scope.
391-
Subscription sub = new Subscription(ch, "price", "topic", "STOCK.IBM.#");
391+
Subscription sub = new Subscription(ch, "STOCK.IBM.#");
392392
foreach (BasicDeliverEventArgs e in sub) {
393393
// handle the message contained in e ...
394394
// ... and finally acknowledge it
395395
sub.Ack(e);
396396
}
397397

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.
401401

402402
[code Subscription.Ack()] should be called for each received event,
403403
whether or not auto-acknowledgement mode is used, because [code

0 commit comments

Comments
 (0)