-
Notifications
You must be signed in to change notification settings - Fork 88
Adding multiple Bindings to a Consumer results in multiple consumer instances #68
Comments
Hello, |
When creating a "ReactiveStreams" "Publisher" and used this as So the "prefetch count" multiplied with the "virtual" consumers which was not what I expected. |
Do you have a small, complete code sample ? |
To be honest it would be quite complicated to share the original code (corporate restrictions, etc.). But I'll try building a minimal example. My idea would be to change
This way you only get 1 consumer which handles an arbitrary amount of routingKeys. What do you think? |
…ys and bind each routingKey when processing 'AddBinding' message
Sorry I did not respond in such a long time. I created a pull request #73 containing a "fix" for this one. The PR is binary compatible and also the behavior is the same as before. Passing in multiple routingKeys is only an optional enhancement. With that one can now exactly configure the amount of consumers (or use exactly 1) when working with multiple routing keys. |
We use this great wrapper for AMQP client to consume multiple routingKeys on a single Exhange.
For that, we send
AddBinding
to theConsumer
as documented:In the AMQP web-interface I now see that for the example snippet above there are 2 "Consumers".
Maybe this is the intended behavior - but what seems strange then is when there are only messages for the routingKey
"my_key_1"
both Consumers seem to handle this message.It would be cool if
Amqp.Binding
could take more than one routingKey.What do you think? Would that be the "correct" approach?
The text was updated successfully, but these errors were encountered: