Thanks for the clarification - I decided to spike the problem out to get a
better understanding of what is going on. I think my conclusion is that my
understanding of what ack-unless-exception does is flawed. My understanding
was that, if a handler threw and exception, the message wouldn't be ack'ed,
but be put back on the exchange. That does not seem to happen, and when qos
is 1, we seem to get stuck, as we are holding one outstanding message.

My spike seems to confirm this. It's available at:

https://github.com/tgk/langohr-consumer-dies-spike

Am I correct in assuming I should explicitly indicate that a message failed?

Thomas


On 21 May 2014 09:09, Michael Klishin <mklis...@gopivotal.com> wrote:

>  On 21 May 2014 at 11:55:46, Thomas Kristensen (
> thomas.kristen...@uswitch.com) wrote:
> > > Regardless of my handler throwing an exception or not, I would
> > expect the same handler to be invoked on the next message coming
> > in. That's what I find confusing. ack-unless-exception does
> > nothing to actually handle thrown exceptions, and it probably
> > shouldn't. But I assumed a thrown exception wouldn't de-register
> > the handler(?)
>
> RabbitMQ Java client dispatches deliveries to a thread pool and handles
> all exceptions. They are passed to an exception handler, which is now
> possible
> to override in 3.3 and Langohr needs to provide a way to do that with
> Clojure
> functions.
>
> No exception can possibly cancel the consumer. There are opinionated
> projects
> that reject messages that caused an exception but it's not appropriate in
> all cases and Langohr does not do that.
> --
> MK
>
> Software Engineer, Pivotal/RabbitMQ
>

-- 
*uSwitch is a trading name of uSwitch Ltd. Registered in **England and 
Wales **(Company No. 03612689). Registered Address: **Notcutt House, 36 
Southwark Bridge Road, London, SE1 9EU*

*This communication and any attachments contains information which is 
confidential and may be subject to legal privilege. It is for intended 
recipients only. If you are not the intended recipient you must not copy, 
distribute, publish, rely on or otherwise use it without our consent. Some 
of our communications may contain confidential information which it could 
be a criminal offence for you to disclose or use without authority. If you 
have received this email in error please notify the sender immediately and 
delete the email from your computer.*

*uSwitch Ltd reserves the right to monitor all email communications for 
compliance with legal, regulatory and professional standards.*

-- 
You received this message because you are subscribed to the Google Groups 
"clojure-rabbitmq" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure-rabbitmq+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to