Skip to content

Commit

Permalink
Update docs/versioned_docs/version-0.15/infra/rabbitmq/index.md
Browse files Browse the repository at this point in the history
Co-authored-by: Ruben Bartelink <ruben@bartelink.com>
  • Loading branch information
alexeyzimarev and bartelink authored Jul 18, 2024
1 parent 05b6a4c commit ee17a60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/versioned_docs/version-0.15/infra/rabbitmq/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ The `Exchange` configuration property is mandatory as the subscription needs to

For consuming messages, the subscription needs a queue bound to the specified exchange. By default, the subscription id is used as the queue name. You can override the queue name by specifying an alternative value using `QueueOptions.Queue` property of the subscription options.

Besides the queue name, it's possible to configure the subscription with RabbitQ-specific parameters. Those include queue options, exchange options, and binding options. Eventuous provides default values for all those, so usually you would not need to change those. One option that you'd want to change si the concurrency limit value, which is set to `1` by default. As RabbitMQ doesn't guarantee message ordering anyway, you can speed up message processing by increasing the concurrency limit, so the subscription can consume messages in parallel. Eventuous will also adjust the prefetch count to accommodate for increased number of consumers, if necessary.
Besides the queue name, it's possible to configure the subscription with RabbitQ-specific parameters. Those include queue options, exchange options, and binding options. Eventuous provides default values for all those, so usually you would not need to change those. One option that likely should be overridden is the concurrency limit value, which is set to `1` by default. As RabbitMQ doesn't guarantee message ordering anyway, you can speed up message processing by increasing the concurrency limit, so the subscription can consume messages in parallel. Eventuous will also adjust the prefetch count to accommodate for increased number of consumers, if necessary.

As mention previously, RabbitMQ messages are published to an exchange, and consumed from a queue bound to that exchange. When the subscription starts, it makes sure that both the exchange and the queue exist, and the queue is bound to the exchange. If you start producing messages to an exchange created by the producer before starting the subscription at least once, and there's no queue and binding created upfront, those messages will be dropped. As long as the exchange has a binding to a subscription queue, the messages will be kept in the queue until consumed. Therefore, we recommend starting the subscription before producing messages.

Expand Down

0 comments on commit ee17a60

Please sign in to comment.