quarkiverse / quarkus-rabbitmq-client

Quarkus extension supporting RabbitMQ
Apache License 2.0
36 stars 16 forks source link

Question: benefits of this extension and quarkus-smallrye-reactive-messaging-rabbitmq alternative #233

Open gian1200 opened 5 months ago

gian1200 commented 5 months ago

We currently have some Quarkus apps running natively that uses the oficial "amqp-client" dependency. Comparing the example code to what we currently have, both seems quite similar, except the part where RabbitMQClient is injected and connections are created (we use new ConnectionFactory(), set some configuration and use connection = factory.newConnection()).

From what I've read so far, some the benefits we can gain by migrating to this extension are the native integration with Quarkus metrics, health check, graceful shutdown, testing and quite easy migration path (maybe more), correct?

We've also noticed that quarkus-smallrye-reactive-messaging-rabbitmq (messaging-rabbitmq since Quarkus 3.9) exist. It seems to do a similar job in a different way (some nicer, some more complex).

Is there a plan to keep both extensions coexisting, or one is going to supersede the other? I like some of the benefits, but wouldn't like to migrate to a going-to-be-deprecated extension.

PS: Is this extension mentioned in the Quarkus docs? I found it by accident when googling.

bpasson commented 5 months ago

As it is now, this extension will remain next to quarkus-smallrye-reactive-messaging-rabbitmq. There are upsides and downsides to using the reactive messaging extension. See issue https://github.com/quarkiverse/quarkus-rabbitmq-client/issues/64 for more information on that part.

This extension is basically only exposing the RabbitMQ client as a managed bean for you to use as you see fit, where as the quarkus-smallrye-reactive-messaging-rabbitmq does a lot more, but also uses the Vert.x client in stead of the native RabbitMQ client.

This extension used to be listed in the Quarkus docs, but that broke down when Quarkus changed things with documentation. It hasn't been fixed yet on our side. We are working on it.

We still like to add dev mode support and code starts, but we are a small team as you might have seen. We will get around to adding those features and fixing the documentation.

It is up to you to decide which you want to use. If you have a need for access to the native RabbitMQ client this extension is the way to go I suppose. If the down sides to quarkus-smallrye-reactive-messaging-rabbitmq are no issue for you, you can go that way too. It integrates well with the rest of the reactive messaging stack.