Fantastic, thank you On 10/07/2013 17:13, "Bilgin Ibryam" <bibr...@gmail.com> wrote:
>Hi Frazer, > >you can get access the exception from the exchange property: >Exchange.EXCEPTION_CAUGHT > >HTH >Bilgin > >On 10 July 2013 11:53, Frazer Irving <frazer.irv...@mailonline.co.uk> >wrote: > >> Hi, >> >> I'm trying to create an error handler that sends messages to a DLQ, >>sends >> events to riemann and logs the error with a stack trace. I have done >> something like the following. >> >> public RiemannSendProcessor extends SendProcessor { >> public void process (Exchange exchange, AsyncCallback callback) { >> // send events to riemann >> ... >> super.process(exchange, callback) >> } >> } >> >> class RiemannErrorHandlerBuilder extends DeadLetterChannelBuilder { >> public Processor getFailureProcessor () { >> new RiemannSendProcessor(); >> } >> } >> >> (I am translating the above from clojure, so forgive me if this is not >> quite valid java code). >> >> My problem is that I would like to get a reference to the exception that >> caused the error handler to fire, and to log that out. I see there is a >> LoggingErrorHandler but if I subclass that I think I will lose the DLQ >> functionality. Can anyone advise me on how to approach this problem. >> >> >> >> ______________________________________________________________________ >> This e-mail and any attached files are intended for the named addressee >> only. It contains information, which may be confidential and legally >> privileged and also protected by copyright. Unless you are the named >> addressee (or authorised to receive for the addressee) you may not copy >>or >> use it, or disclose it to anyone else. If you received it in error >>please >> notify the sender immediately and then delete it from your system. >>Please >> be advised that the views and opinions expressed in this e-mail may not >> reflect the views and opinions of Associated Newspapers Limited or any >>of >> its subsidiary companies. We make every effort to keep our network free >> from viruses. However, you do need to check this e-mail and any >>attachments >> to it for viruses as we can take no responsibility for any computer >>virus >> which may be transferred by way of this e-mail. Use of this or any other >> e-mail facility signifies consent to any interception we might lawfully >> carry out to prevent abuse of these facilities. >> Associated Newspapers Ltd. Registered Office: Northcliffe House, 2 Derry >> St, Kensington, London, W8 5TT. Registered No 84121 England. > > >______________________________________________________________________ >This email has been scanned by the Symantec Email Security.cloud service. >For more information please visit http://www.symanteccloud.com >______________________________________________________________________ ______________________________________________________________________ This e-mail and any attached files are intended for the named addressee only. It contains information, which may be confidential and legally privileged and also protected by copyright. Unless you are the named addressee (or authorised to receive for the addressee) you may not copy or use it, or disclose it to anyone else. If you received it in error please notify the sender immediately and then delete it from your system. Please be advised that the views and opinions expressed in this e-mail may not reflect the views and opinions of Associated Newspapers Limited or any of its subsidiary companies. We make every effort to keep our network free from viruses. However, you do need to check this e-mail and any attachments to it for viruses as we can take no responsibility for any computer virus which may be transferred by way of this e-mail. Use of this or any other e-mail facility signifies consent to any interception we might lawfully carry out to prevent abuse of these facilities. Associated Newspapers Ltd. Registered Office: Northcliffe House, 2 Derry St, Kensington, London, W8 5TT. Registered No 84121 England.