Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Consuming unparseable JMS messages

  1. #11
    Join Date
    Jan 2011
    Posts
    20

    Default

    Any ideas why not all Errors are being redirected to the ErrorChannel? How do I configure an "ErrorListener"?

    -Steve

  2. #12
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Could you elaborate on your use case a bit? Provide some context?
    Generally error-channel is used by default *only* in the async flows since Message send happens on the different thread the Message processing, thus leaving no other way but the default error-channel to let the Message sender know that something wrong happened.
    For all other components there are means to specify the error-channel and that is why I am asking about your particular use case.

  3. #13
    Join Date
    Jan 2011
    Posts
    20

    Question

    - Message has no payload (IBM MQ Header: content = nil) – JMS Listener throws an Exception that does NOT get passed to the errorchannel, but instead rolls the transaction back, leaving message on the Queue (for immediate and infinite retry).
    - Message has empty payload – JMS Listener or SI Base Transformer throws an Exception that DOES get passed to the error channel.
    - Message can not be processed – Processor throws an Exception, which then gets put on the Error Channel. Listener on Error Channel determines if an intermittent Database Error (Transaction Time Out, Table Contention, etc.), in which case, throws an Exception to roll the Transaction back and leave message on Queue. If NOT an intermittent Database Error (ex. Invalid data), then consumes and logs the message, removing from the JMS Q.

    Originally, it was suggested I use an Error Channel, and listeners on the Channel for this. Is there a better pattern that should be used?

    -Steve
    Last edited by Gorky; Mar 14th, 2011 at 05:27 PM. Reason: Added note about retry

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •