Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6616167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:33:02+00:00 2026-05-25T20:33:02+00:00

I have a problem with error handling. If an exception occurs in the jrnRoute

  • 0

I have a problem with error handling. If an exception occurs in the jrnRoute, it is processed by the exceptionHandler processor. This is OK. But the message which caused the exception still stays in the jrnQueue, is processed again and causes the error over and over again. Also I have a warning (see below) in logs. How to stop the infinite redelivery? I want to throw a message away in case of an error.

Camel configuration

    <camel:onException>
        <camel:exception>java.lang.Exception</camel:exception>
        <camel:redeliveryPolicy disableRedelivery="true" />
        <camel:process ref="exceptionHandler" />
        <camel:rollback markRollbackOnly="true" />
    </camel:onException>

    <camel:route id="translatorRoute">
        <camel:from ref="transactionsQueue" />
        <camel:process ref="messageTranslator" />
        <camel:inOnly ref="apfRequestQueue" />
    </camel:route>
    <camel:route id="jrnRoute">
        <camel:from ref="jrnQueue" />
        <camel:process ref="jrnProcessor" />
        <camel:stop />
    </camel:route>
</camel:camelContext>

Warning

11:15:00,141 WARN  [JmsMessageListenerContainer] Execution of JMS message listener failed, and no ErrorHandler has been set.
org.apache.camel.RuntimeCamelException: org.apache.camel.RollbackExchangeException: Intended rollback. Exchange[JmsMessage: [ObjectMessageImpl com.swiftmq.jms.ObjectMessageImpl@c84d9d
messageIndex = 5_2
messageId = [LazyUTF8String, s=ID:/172.26.214.11/5349789614428334512/10/0, buffer=[B@5f7fd8]
userId = [LazyUTF8String, s=null, buffer=[B@1c254aa]
clientId = null
timeStamp = 1316682898526
correlationId = null
replyTo = null
destination = jrnQueue@z4smq_4001
deliveryMode = 2
redelivered = true
deliveryCount = 8
type = null
expiration = 0
priority = 4
props = {...}
readOnly = true
sourceRouter = null
destRouter = null
destQueue = null array=[B@1447e6b cnt=1295]]
    at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1145)
    at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:108)
    at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)
    at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)
    at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:243)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.camel.RollbackExchangeException: Intended rollback. Exchange[JmsMessage: [ObjectMessageImpl com.swiftmq.jms.ObjectMessageImpl@c84d9d
messageIndex = 5_2
messageId = [LazyUTF8String, s=ID:/172.26.214.11/5349789614428334512/10/0, buffer=[B@5f7fd8]
userId = [LazyUTF8String, s=null, buffer=[B@1c254aa]
clientId = null
timeStamp = 1316682898526
correlationId = null
replyTo = null
destination = jrnQueue@z4smq_4001
deliveryMode = 2
redelivered = true
deliveryCount = 8
type = null
expiration = 0
priority = 4
props = {...}
readOnly = true
sourceRouter = null
destRouter = null
destQueue = null array=[B@1447e6b cnt=1295]]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:33:02+00:00Added an answer on May 25, 2026 at 8:33 pm

    Yes the markRollbackOnly will cause the transaction manager to mark the TX as rollback, and therefore the JMS broker will keep the message in the queue, and redeliver it again. So remove that instead.

    And do as Ben posted above, with handled true:

     <camel:onException>
            <camel:exception>java.lang.Exception</camel:exception>
            <camel:redeliveryPolicy disableRedelivery="true" />
            <camel:handled>
                <camel:constant>true</camel:constant>
            </camel:handled>
    
            <camel:process ref="exceptionHandler" />
     </camel:onException>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greetings, I have problem with errorPlacement, I'm trying to place the error message next
OK, so I have a problem. If an uncaught exception occurs while I am
I have error handling in Application_Error event of globals.asax file. Inside this event, I'm
I have a problem with a javascript error: $(#slider) is undefined How can i
I have a problem where a method is getting an undefined variable error, even
Ok so I have a recursion problem thats causing a stack overflow error at
I have a problem with IE causing two errors: 1. Object doesn't support this
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
I am implementing exception handling for our BizTalk services, and have run into a
Possible Duplicate: Using global exception handling with “setUncaughtExceptionHandler” and “Toast” I have implemented UncaughtExceptionHandler

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.