Having a competing consumer give up on a message

29 views
Skip to first unread message

Pedro Felix

unread,
Sep 27, 2016, 2:01:50 PM9/27/16
to masstransit-discuss
Consider a competing consumer scenario where a consumer detects that it cannot successful process a command message (e.g. the DB is unreachable).
Is there a way for this consumer to give up on the message (i.e. return the message to the shared queue immediately) so that another competing consumer can pick it?

Using the retry policy does not work because it will retry on the same consumer.
Rescheduling the send of the message (using Quarz) seems a little overkill, since theoretically a NAck from the consumer to the queue should suffice.

Thanks
Pedro 

Chris Patterson

unread,
Sep 27, 2016, 2:27:25 PM9/27/16
to masstrans...@googlegroups.com
There isn't a good way without using the second-level retries of scheduled redelivery, but that's a good approach and you can check the retry count yourself. 

With RabbitMQ you can use a delayed exchange for this purpose, but it presently doesn't honor the retry policy and retry count.

This scenario is on my list, I just haven't come up with a nice solution yet.


--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/17148b6f-1fc4-403f-ada7-5ae5a11d18ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages