Closed davtir88 closed 1 year ago
The onSuccess() method is never called. It uses a common base class because it is so similar in processing headers, data-frames, etc. But is it thus not completely the same. Maybe it was better to use a different architecture for it - we probable were just a bit lazy.
Anyway, with recall() you can install the callback(s) to process bounced messages. With the publish() call you can pass flags to rabbitmq to tell that undelivarvle msgs may be bounced, and that's it. There is no onSuccess that is called.
So if I understand correctly I can fairly assume that once the recall function is invoked I can consider the callback installed without the risk of latencies or errors from the server.
Thanks for the clarifications!
Yes
Looking at the implementation of the DeferredRecall class, it derives from the DeferredReceiver class which in turn derives from the Deferred class. I was able to successfully install the onSuccess callback on the DeferredRecall object but unfortunately it seems that the callback is never invoked.
I attach here a sample code that reproduces the problem. The program periodically sends unroutable mandatory messages on an exchange not bound to any queue. The onReceived callback is correctly invoked but the onSuccess callback doesn't.
Is it the intended approach to know whether or not the recall function was executed successfully? Thanks in advance