components-contrib icon indicating copy to clipboard operation
components-contrib copied to clipboard

RabbitMQ binding enhancements required or am I missing something in configuration?

Open jwyackel opened this issue 2 years ago • 2 comments

Ask your question here

Hi,

I just started getting a RabbitMQ binding working, but noticed that there is no way to pass the following parameters:

  • x-queue-type
  • x-single-active-consumer

If I let the Dapr binding declare the queue, it gets created as a classic queue.
If I manually declare the queue using the management portal, I get an exception when the binding is initialized.

msg="process component rabbitmq-input error: [INIT_COMPONENT_FAILURE]: initialization error occurred for rabbitmq-input (bindings.rabbitmq/v1): Exception (406) Reason: \"PRECONDITION_FAILED - inequivalent arg 'x-single-active-consumer' for queue 'daprtest' in vhost '/': received none but current is the value 'true' of type 'bool'\"" app_id=RabbitMQConsumerDapr

As well, does the RabbitMQ binding handle connecting to a cluster of nodes? I can only pass in a single host, I have three nodes, is there any type of support for setting up multiple bindings (hence the request to be able to use x-single-active-consumer), or at least handle multiple hostnames for the initial connection process.

I am just starting out with Dapr and am unsure if I am doing something wrong or what I am trying to do is just not supported at this time?

Jeremy

jwyackel avatar Sep 08 '23 22:09 jwyackel

Just not supported. The SAC parameter x-single-active-consumer, among many others, has not yet been implemented. https://github.com/dapr/components-contrib/blob/2cb3c1cce1de407913615aa0296cba6db34205f7/pubsub/rabbitmq/rabbitmq.go#L50-L62

liuzhch-Orka avatar Sep 13 '23 07:09 liuzhch-Orka

As quorum queues are supported, would you accept contributions for RabbitMQ x-single-active-consumer support ?

DropSnorz avatar Nov 30 '23 09:11 DropSnorz