You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to imply that the topic that is being subscribed to will be bound to the queue with the generated binding key, but this doesn't actually seem possible, even with a custom implementation of the topology builder.
The default topology builder passes the generated queue to that function, not the topic. The TopologyBuilder interface does not accept the topic as an argument and the binding key is not being generated beforehand and passed in like the exchangeName and queueName:
add the topic to the buildTopology function signature (and even remove the queue and exchange parameters since they can already be generated from the topic and the Config
precompute the binding key and pass it in like the other parameters
This would allow for more customizable and dynamic topologies, utilizing wildcard matching on topic exchanges as well as more intuitive configurations.
An example would be to have an exchange which accepts topics as the routing key and then subscribers can subscribe to that on their own queue, and can even subscribe to a subset of those messages using wildcards. This seems like an example of how rabbitmq/amqp is typically used, but doesn't seem possible with the current watermill amqp implementation.
The text was updated successfully, but these errors were encountered:
It does not seem like it is possible to generate queue bindings from the topic
The
amqp.Config
allows providing a function to generate a queue bindingThis seems to imply that the topic that is being subscribed to will be bound to the queue with the generated binding key, but this doesn't actually seem possible, even with a custom implementation of the topology builder.
The default topology builder passes the generated queue to that function, not the topic. The
TopologyBuilder
interface does not accept the topic as an argument and the binding key is not being generated beforehand and passed in like theexchangeName
andqueueName
:I see a few options here:
buildTopology
function signature (and even remove the queue and exchange parameters since they can already be generated from thetopic
and theConfig
This would allow for more customizable and dynamic topologies, utilizing wildcard matching on topic exchanges as well as more intuitive configurations.
An example would be to have an exchange which accepts topics as the routing key and then subscribers can subscribe to that on their own queue, and can even subscribe to a subset of those messages using wildcards. This seems like an example of how rabbitmq/amqp is typically used, but doesn't seem possible with the current watermill amqp implementation.
The text was updated successfully, but these errors were encountered: