quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.41k stars 2.57k forks source link

Reactive Messaging (RabbitMQ) Unable To Create/Connect to RabbitMQ Durable Queue for Outgoing #19287

Closed m-yassine1 closed 7 months ago

m-yassine1 commented 2 years ago

Describe the bug

I am connecting through AMQP to connect to RabbitMQ, and through this connection, the queues are usually connected. I only wish to transmit messages through that queue and not read (Only use for Outgoing). As such, the receiver end expects the queue to be durable. I set the durable flag to true which through the configuration is being read correctly. Unfortunately, the queue is not getting created as durable, and even when created manually with the durable flag, the application is unable to connect to it.

Expected behavior

AMQP configuration for RabbitMQ with durable flag set to true, should be created as durable, and should be able to connect to durable ones.

Actual behavior

AMQP configuration for RabbitMQ with durable flag set to true, is not created as durable, and is not able to connect to durable ones.

How to Reproduce?

getting-started-quarkus-amqp.zip

Steps to reproduce:

  1. Run the Quarkus application, and it should create the queue.
  2. Check RabbitMQ UI manager, and see that the queue created does not have the durable flag.

Moreover, if you delete the queue that was created and manually create it with the durable flag, the application is unable to connect to it even if the durable flag is set to true.

Output of uname -a or ver

Linux Dev2servme-ThinkPad-L15-Gen-1 5.11.0-25-generic #27-Ubuntu SMP Fri Jul 9 23:06:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "11.0.11" 2021-04-20

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.1.1

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)

Additional information

Make sure to enable AMQP1.0 plugin for RabbitMQ.

quarkus-bot[bot] commented 1 year ago

/cc @cescoffier(reactive-messaging), @ozangunalp(reactive-messaging)

cescoffier commented 1 year ago

This feature must be implemented in the rabbitMQ connector (in smallrye reactive messaging). Do you mind opening an issue in that repo?

ozangunalp commented 1 year ago

I realise that I wrote a response last week but forgot to send it: In AMQP, durable message flag for emitted messages is per message as opposed to RabbitMQ durable queues. If I am not mistaken we cannot create queues/exchanges using AMQP client.