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

  • Home
  • SEARCH
  • 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 8441497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:34:32+00:00 2026-06-10T08:34:32+00:00

I have an issue with ActiveMQ loadbalancing with Mule. I am using Mule 3.2.0

  • 0

I have an issue with ActiveMQ loadbalancing with Mule. I am using Mule 3.2.0 and ActiveMQ 5.5.1

I have a Mule FLow application which uses JMS inbound Endpoint to listen to queues in ActiveMQ.
I have 2 instances of AMQ running each having a queue called “MyQueue”.
Lets name them AMQ1 and AMQ2.
I also have 2 mule instances running – each having the same app. Let’s name them Mule1 and Mule2.

Now I want each mule instance to pick up messages from either of the AMQ queues. So say a Message Sender sends the message to the queue MyQueue in either AMQ1 or AMQ2 (Message sender load balances using failover transport supported by ActiveMQ – and that bit works fine). Say it reached AMQ1. Now ideally I would like to have 10 consumers each of Mule1 and Mule2 registered in each AMQ instance. So both of them are listening for incoming messages in both the queues. One of them should pick up the message from the queue and process it.

This is the config I am using in Mule to connect to both the AMQ brokers.

  <jms:activemq-connector name="Active_MQ"  brokerURL="failover:tcp://10.0.64.158:61616,tcp://10.0.64.160:61616)?randomize=true"  eagerConsumer="true" numberOfConsumers="10" dynamicNotification="true" validateConnections="true" clientId="MuleInstance1"  doc:name="Active MQ">
      <reconnect count="5" frequency="3000" blocking="false"/>

  </jms:activemq-connector>

kindly note clientId is different for different Mule instances. Also currently AMQ 1 and Mule1 share the same machine and AMQ2 and Mule2 share another machine.

However I am noticing soem random behaviour. AT times all consumers(both of Mule1 and Mule2) register only to one AMQ instance. At times Mule1 is registering only to AMQ1 and Mule 2 to AMQ2.
What ideally I want is cosnumers of both Mule1 and Mule2 to register to both AM1 and AMQ2
I followed the instructions here
http://www.mulesoft.org/documentation-3.2/display/MULE3USER/ActiveMQ+Integration

Basically I wanted to use the network of broker architecture so that there is no loss of service whether a Mule instance or AMQ instance goes down or has to be restarted.
Not sure the randomize=true query param in helping in this case.

Can someone kindly advise how to achieve the above using Mule 3.2.0 and Active MQ 5.5.1?

If there isn’t a solution sadly I may have to make Mule1 listen to AMQ1 and Mule2 listen to only AMQ2 and it won’t really be clustered 🙁

Thanks in advance.

  • 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-10T08:34:33+00:00Added an answer on June 10, 2026 at 8:34 am

    Got it working.
    Got a suggestion the Mule forum itself.

    http://forum.mulesoft.org/mulesoft/topics/activemq_loadbalancing_with_mule

    So basically instead of relying on AMQ load balancing for the consumer I used 2 AMQ connectors and used a composite source in each mule app listenign to 2 Inbound EndPoints. And it works a treat. Bringing up/Shutting down Mule and AMQ instances – all worked a treat. here’s teh config

          <jms:activemq-connector  name="Active_MQ_1"  brokerURL="failover:  (tcp://10.0.64.158:61616)"  eagerConsumer="true"  numberOfConsumers="10"  dynamicNotification="true"  validateConnections="true"  clientId="MuleInstance1"  doc:name="Active MQ">
           <reconnect count="5" frequency="3000" blocking="false"/>
    
         </jms:activemq-connector>
         <jms:activemq-connector  name="Active_MQ_2"  brokerURL="failover:(tcp://10.0.64.160:61616)"  eagerConsumer="true"  numberOfConsumers="10"  dynamicNotification="true"  validateConnections="true"  clientId="MuleInstance1"  doc:name="Active MQ">
         <reconnect count="5" frequency="3000" blocking="false"/>
    
          </jms:activemq-connector>
    

    Now refer to that from within your flow with composite-source

      <flow name="MyAutomationFlow" doc:name="MyAutomationFlow">
          <composite-source>
              <jms:inbound-endpoint queue="MyOrderQ" connector-ref="Active_MQ1" doc:name="JMS Inbound Endpoint"/>
              <jms:inbound-endpoint queue="MyOrderQ" connector-ref="Active_MQ2" doc:name="JMS Inbound Endpoint"/>
          </composite-source>
       ........
    

    Worked a treat!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an issue in ActiveMQ where we have a huge number of messages
I have an issue which I could not find answer for across the web.
I have issue wuth Firefox not displaying style text-decoration: line-through. I am using jqGrid
I have an issue that, while using sql server 2005 i have executed update
i have issue regarding Paging using filterexpression. here's the piece of code for filtering
Im writing sql query and i have issue which i cannot fix. I'm trying
MSSQL database. I have issue to create database using old databases data. Old database
i have done drag and drop using with jquery. here i have issue that
I have issue where i want to create Dynamic function which will do some
I have developed an application using Entity Framework , SQL Server 2000, Visual Studio

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.