Closed Ultranium closed 3 years ago
Your example does not use confirmations. Without confirmations Rabbit MQ is fire and forget, you won't know what happens to your message. You can either make your confirmations synchronous (waitForConfirms) or asynchronous (more complicated, but RabbitMQPublisher is set up to do it). Synchronous confirmations are clearly a lot simpler to work with, but they will hugely reduce your maximum message sending throughput.
For now, please can you add synchronous confirmations to your example and see what happens.
@Yaytay thanks for your reply.
Indeed, using the waitForConfirms() I can now check if a message was accepted buy RabbitMQ or not. I should've read the manual more carefully.
I just thought that if the RabbitMQClient throws an exception if it can't connect to a server, the same should happen for errors during sending messages, but now I see that this is not how it works.
Version
Vert.x 4.0.2 JDK 15.0.1
Context
I found that calling basicPublish() with non-existent exchange or when the user doesn't have permissions to write to the exchange leads to succeeded() result.
Minimal reproducer
https://github.com/Ultranium/vertx-rabbitmq-send-reproducer
Steps to reproduce
Extra
Wireshark capture: