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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:22:51+00:00 2026-06-12T19:22:51+00:00

I have a queue into which multiple messages, all independent and which can be

  • 0

I have a queue into which multiple messages, all independent and which can be processed in parallel.

I have seen a mutlicast router which takes the same in message and splits it across multiple receivers and I think I have also tried a few others like throttle inflight route policy, thread pool profile etc.

However, what I did want was for a single route to encapsulate multiple parallel JMS sessions, the total which I hope to configure and have the messages processed all at once.

I would like to state an assumption of mine, that a single route with a from would mean a single session and not n parallel sessions. Please correct me if I am wrong.

My camel context looks a bit like this:

<bean id="throttlePolicy" class="org.apache.camel.impl.ThrottlingInflightRoutePolicy">
    <!-- define the scope to be context scoped so we measure against total 
        inflight exchanges that means for both route1, route2 and route3 all together -->
    <property name="scope" value="Context" />
    <!-- when we hit > 20 inflight exchanges then kick in and suspend the routes -->
    <property name="maxInflightExchanges" value="20" />
    <!-- when we hit lower than 10% of the max = 2 then kick in and resume 
        the routes the default percentage is 70% but in this demo we want a low value -->
    <property name="resumePercentOfMax" value="10" />
    <!-- output throttling activity at WARN level -->
    <property name="loggingLevel" value="WARN" />
</bean>

<camelContext id="camel" errorHandlerRef="dlc"
    xmlns="http://camel.apache.org/schema/spring">

    <!-- this is the Dead Letter Channel error handler, where we send failed 
        message to a log endpoint -->
    <errorHandler id="dlc" type="DeadLetterChannel"
        deadLetterUri="jms:deadLetterQueue">
        <redeliveryPolicy retryAttemptedLogLevel="INFO"
            maximumRedeliveries="3" redeliveryDelay="250" backOffMultiplier="2"
            useExponentialBackOff="true" />
    </errorHandler>

    <route routePolicyRef="throttlePolicy">
        <from uri="jms:camel.design.md5InputQueue" />
        <transacted ref="required" />
        <process ref="basicProcessor" />
        <to uri="jms:camel.integrationTest.reply" />
    </route>
</camelContext>

As you can see, what I am doing is calculating the MD5 of a source. I was hoping to do this and transfer the result into a reply queue and have all those done in parallel.

To simulate this, I put a sleep (one second) in the basic processor and what I am seeing is a sequential processing of a message one after another rather than parallel processing. For example, if there are 10 messages it takes 10 seconds, if there are 20 messages, it takes 20 seconds etc.

How do I get this to work in parallel and have all the MD5 calculations, say 10 input messages done in about 2 seconds even after putting a sleep condition within the processor.

  • 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-12T19:22:52+00:00Added an answer on June 12, 2026 at 7:22 pm

    just set the maxConcurrentConsumers property to enable multiple consumer threads from your queue…

    <route routePolicyRef="throttlePolicy">
        <from uri="jms:camel.design.md5InputQueue?maxConcurrentConsumers=5" />
        <transacted ref="required" />
        <process ref="basicProcessor" />
        <to uri="jms:camel.integrationTest.reply" />
    </route>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a queue of text messages in Redis. Let's say a message in
in my winforms app, I have a Queue which contains objects: Queue<MyObj> _queuedRows =
We have an ASP.NET MVC web app which allows users to publish messages onto
Let's have a Queue and an item which was enqueued last. What is the
Is it possible to have multiple listeners to messages carried by MSMQ? WCF appears
I'm running into mutex issues with my Queue class under load which I'm at
In our application we have a server which will connect to multiple clients. For
I have a web service that runs multiple DB queries and takes roughly ~500ms-1,000ms
I have queue from struct type struct test { int numbers; }; queue<test> q;
I have declared: queue<int, list<int> > Q After a series of calls: Q.push(37); Q.pop();

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.