Okay, thank you.
> 16 jan. 2018 kl. 13:29 skrev Michael Klishin <mklis...@pivotal.io>: > > Consumers are expected to handle their exceptions. > > RabbitMQ Java client consumer dispatch pool will hand all unhandled > exceptions to a separate handler. Langohr doesn't have a way to registering > them > but standard handlers don't do anything beyond logging. > > A couple of relevant links: > > * Unhandled Exceptions in http://www.rabbitmq.com/api-guide.html > <http://www.rabbitmq.com/api-guide.html> > * > https://github.com/michaelklishin/langohr/blob/master/src/clojure/langohr/consumers.clj#L113 > > <https://github.com/michaelklishin/langohr/blob/master/src/clojure/langohr/consumers.clj#L113> > > > On Tue, Jan 16, 2018 at 12:42 PM, Magnus Landerblom <mag...@landerblom.se > <mailto:mag...@landerblom.se>> wrote: > Hi, > > Trying out Langohr for a project and I'm wondering how I should handle > exceptions that happens in my handler function. > > Example: > (let [ch (lch/open (...) > {queue-name' :queue} (lq/declare ch "" {:exclusive true :auto-delete > true}) > handler (fn [ch {:keys [routing-key delivery-tag]} ^bytes payload] > (throw (RuntimeException. "Some error")))] > (lq/bind ch queue-name' "amq.topic" {:routing-key ".........."}) > (lc/subscribe ch queue-name' handler {:block true :auto-ack false}))) > > What has happened to me a couple of times is that the code that runs inside > the handler fails and an exception is thrown but it never shows up in the > terminal. > It looks like its catched somewhere and never printed. > Can I get it printed or do I have to wrap the code in a try-catch and handle > ack/nack for my self there? > > > > -- > 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 > <mailto:clojure-rabbitmq+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > > > > -- > MK > > Staff Software Engineer, Pivotal/RabbitMQ > > -- > You received this message because you are subscribed to a topic in the Google > Groups "clojure-rabbitmq" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/clojure-rabbitmq/UjLexUFfdac/unsubscribe > <https://groups.google.com/d/topic/clojure-rabbitmq/UjLexUFfdac/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to > clojure-rabbitmq+unsubscr...@googlegroups.com > <mailto:clojure-rabbitmq+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- 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.