-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for :amqp_channel.register_confirm_handler(channel, confirm_handler) #41
Comments
This makes currently impossible to return publish errors in a Adding Another could be to make Any reason neither is implemented? Is either option worth considering for inclusion? I'd be keen to write a PR for either. |
My comment on I think naming them |
Thanks for the feedback. I have put together an implementation based off #63. However there is an issue with message ordering. This is a catch all
For this feature to be useful
So, this implementation is not working. Do you think it is acceptable to simplify implementation by just registering for confirm/return the calling process directly? Otherwise I guess we need to spawn a single process handling both confirm and returns. Do you have better ideas? |
I probably need to understand more details about the use case. Why can't they be independent? I believe you can write the logic that doesn't rely on the order?
That might be true most of cases but writing code that relies on the assumption is dangerous as Return handler on AMQP indeed has a overhead(one send plus Record to Map conversion) but that should be discussed separately from the issue. |
My use case is returning errors when publishing unroutable messages with the mandatory flag set on a channel is in confirm mode. In this case the error condition is signalled to the publisher by sending I agree overhead is a different problem, my only concern at the moment is message ordering. In this case the ack must come after the return. I think The section on confirm here explains the logic: https://www.rabbitmq.com/amqp-0-9-1-reference.html |
Could you link to the source which says If you can also point to the code |
Sorry, publisher confirms are a RabbitMQ extension, so this behaviour ( Looking at |
OK, I think we can define the problem like this? "If a process receives messages from a same channel, the order of the messages in the channel should be preserved." Yeah, the current implementation of Let me think about a solution. (note to myself - |
Yes, I guess that's the point. The first solutions which come to my mind are directly registering the caller to handlers or using a single process to register all messages coming from the same channel, including Thanks a lot for your time and thinking this through 👍 |
This should have been addressed 1.2.0-rc.0. Thanks! |
The only facility in Elixir amqp client for receiving confirms is the blocking calls Confirm.wait**** and Confirm.wait****die. Registration of a confirm_handler process is async way of processing.
The text was updated successfully, but these errors were encountered: