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 8185805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:58:31+00:00 2026-06-07T01:58:31+00:00

I have problem with Camel and JMS. My routes are very simple: @Override protected

  • 0

I have problem with Camel and JMS.

My routes are very simple:

  @Override
    protected RouteBuilder[] createRouteBuilders() throws Exception {
        createJmsComponent();

        RouteBuilder route1 = new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:startpoint")
                .log("TO JMS: ${body}")
                .to("jms://queue:QUEUE.NAME.OUT?replyTo=QUEUE.NAME.IN&replyToType=Exclusive")
                ;
            }
        };

        RouteBuilder route2 = new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("jms://queue:QUEUE.NAME.IN?receiveTimeout=10000")
                .log("FROM JMS: ${body}")
                ;
            }
        };
        return new RouteBuilder[]{route1, route2};
    }

And in logs I have what I need:

2012-07-04 16:28:10,443 INFO  route1 - TO JMS: message
2012-07-04 16:28:13,477 INFO  route2 - FROM JMS: message

But the problem is that I’ve got Exception:

2012-07-04 16:28:33,960 ERROR o.a.c.p.DefaultErrorHandler                        - Failed delivery for (MessageId: ID-PLWROW912268-4634-1341412084839-0-1 on ExchangeId: ID-PLWROW912268-4634-1341412084839-0-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 20000 millis due reply message with correlationID: ID-PLWROW912268-4634-1341412084839-0-3 not received. Exchange[Message: message]
org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 20000 millis due reply message with correlationID: ID-PLWROW912268-4634-1341412084839-0-3 not received. Exchange[Message: message]
    at org.apache.camel.component.jms.reply.ReplyManagerSupport.processReply(ReplyManagerSupport.java:126) ~[camel-jms-2.9.2.jar:2.9.2]
    at org.apache.camel.component.jms.reply.TemporaryQueueReplyHandler.onTimeout(TemporaryQueueReplyHandler.java:61) [camel-jms-2.9.2.jar:2.9.2]
    at org.apache.camel.component.jms.reply.CorrelationTimeoutMap.onEviction(CorrelationTimeoutMap.java:53) [camel-jms-2.9.2.jar:2.9.2]
    at org.apache.camel.component.jms.reply.CorrelationTimeoutMap.onEviction(CorrelationTimeoutMap.java:30) [camel-jms-2.9.2.jar:2.9.2]
    at org.apache.camel.support.DefaultTimeoutMap.purge(DefaultTimeoutMap.java:203) [camel-core-2.9.2.jar:2.9.2]
    at org.apache.camel.support.DefaultTimeoutMap.run(DefaultTimeoutMap.java:159) [camel-core-2.9.2.jar:2.9.2]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [na:1.6.0_23]
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [na:1.6.0_23]
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [na:1.6.0_23]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [na:1.6.0_23]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [na:1.6.0_23]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [na:1.6.0_23]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_23]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_23]
    at java.lang.Thread.run(Thread.java:662) [na:1.6.0_23]

If I understand correctly, now I have two routes which waiting for response. Route2 read the response from Queue, route1 doesn’t got response(because was readed by route2) and this is reason why I got Exception.

So what I need to do to get this scenario:

route1 - only send message to JMS and not waiting for response. 
route2 - only read message from JMS.
  • 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-06-07T01:58:34+00:00Added an answer on June 7, 2026 at 1:58 am

    The solutions is to use inOnly pattern and preserveMessageQos=true flag.

    .inOnly("jms://queue:QUEUE.NAME.OUT" +
                                "?replyTo=QUEUE.NAME.IN" +
                                "&replyToType=Shared" +
                                "&preserveMessageQos=true")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very strange problem with Apache ActiveMQ with Camel - I tried
I am using camel 2.9.0 in my project. We have a number of routes
So i have this problem with running a application which use JMS, I did
Problem Overview I'm using apache camel 2.4 and have been asked to setup an
I have a regex stored within an Apache Camel XML file: <simple>${body} regex '\s*&lt;+.*'</simple>
i have problem with build my own webservice based on cxf/camel. My webservice should
I'm new to Vim (almost new) and have some questions. The problem came from
I've came upon a problem regarding 2D textures placed on 2D quads. I have
While doing some small regex task I came upon this problem. I have a
I have problem with http://abfoodpolicy.com/ . In IE 8 and 9 the right sidebar

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.