Closed Yaytay closed 3 years ago
In order for ConfirmListeners to function they need to know when a Channel gets reopened (because the delivery tags are scoped to the channel). In my synchronous client the publisher is responsible for resetting the connection (so it knows when it happens) but with the vertx client its handled within the Client object. I had planned to add a callback to the Client to tell the publisher when the connection resets, but thinking about the asynchronous nature of the ReadStream of delivery tags I'm not sure that would work. So I'm starting to think that maybe the ReadStream of Delivery tags should have not just the tag itself, but also something to identify the channel. I don't think the Java rabbit Channel or Connection have any unique ID, so it might have to be something managed by the vertx client.
I've added a "channel instance" field to the Client to track each time the channel gets created. Will require more work if we ever have multiple channels per client, but works for now.
In order for publishers to use message confirmations without blocking their throughput it is necessary to use ConfirmListeners to asynchronously receive confirmation of messages sent. There is currently no support for this in vertx-rabbitmq-client.