Skip to content
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

Handle returned messages #190

Open
jesjos opened this issue Feb 9, 2016 · 0 comments
Open

Handle returned messages #190

jesjos opened this issue Feb 9, 2016 · 0 comments

Comments

@jesjos
Copy link
Contributor

jesjos commented Feb 9, 2016

Currently, as far as I understand, if a Producer publishes a message and no Consumer is available to consume it, that message is dropped without trace. This is because no queue is bound to the routing key yet.

I would like to have the option to notify the Producer, for example by raising an error.

It seems like the mandatory option when publishing is what we want.

I know how to send this option:

Hutch.publish('foo', 'bar', mandatory: true)

But currently this produces no new behavior as there is no handler registered for returned messages.

The challenge is how to implement this handling, since message seem to be returned asynchronously. I'm guessing it would be hard (impossible?) to have Hutch.publish block until we now the message has been routed. Perhaps we could be content with logging the returned message as a warning.

Any input on this? Alternative methods of achieving the same result?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant