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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:09:04+00:00 2026-05-24T12:09:04+00:00

I have a JBoss-6 server with HornetQ and a single queue: <queue name=my.queue> <entry

  • 0

I have a JBoss-6 server with HornetQ and a single queue:

<queue name="my.queue">  
    <entry name="/queue/test"/>  
</queue>

There a different consumers (on different machines) connected to this queue, but only a single consumer is active at a time. If I shut down this consumer, the messages are immediately processed by one of the other consumers.

Since my messages have some time consuming processing, I want multiple consumer process their unique messages concurrently.

I remember a similar in earlier versions of JBoss where this setup worked without problems. Here in Jboss-6 the messaging system is working well — except of the issue described above. This question is similar to Are multiple client consumers possible in hornetq?, but the scenario is not similar to mine.

Update 1: If I close (STRG+C) one consumer there is a short timeout (until the server recognized the lost consumer) until the next consumer gets the message.

Update 2: Code Snippet

VoidListener ml = new VoidListener();
QueueConnectionFactory qcf = (QueueConnectionFactory)
                             ctx.lookup("ConnectionFactory");
QueueConnection conn = qcf.createQueueConnection();
Queue queue = (Queue) ctx.lookup(queueName);
QueueSession session = conn.createQueueSession(false,
                                               QueueSession.AUTO_ACKNOWLEDGE);

QueueReceiver recv = session.createReceiver(queue,"");
recv.setMessageListener(ml);
conn.start();

And the MessageListerner:

public class OlVoidListener implements MessageListener
{
  public void onMessage(Message msg)
  {
    counter++;
    logger.debug("Message ("+counter+") received");
    try {Thread.sleep(15*1000);} catch (InterruptedException e) {}
  }
}
  • 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-24T12:09:04+00:00Added an answer on May 24, 2026 at 12:09 pm

    With multiple consumers on a queue, messages are load balanced between the consumers.

    As you have some time consuming the message, you should disable buffering by setting consumer-window-size.

    On hornetQ there’s an example on the distribution, about how to disable client buffering and give a better support for slow consumers. (a slow consumer is a consumer that will have some time processing the message)

    message systems will pre-fetch/read-ahead messages to the client buffer to speed up processing and avoid network latency. This is not an issue if you have fast processing queues and a single consumer.

    JBoss Messaging offered the slow-consumer option at the connection factory and hornetq offers the consumer window size.

    Most Message systems will provide you a way to enable or disable client pre-fetching.

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

Sidebar

Related Questions

I have a webservice with basic HTTP authentication on a JBoss server. Is there
Our JBoss server.xml file has this line: <Engine name=jboss.web defaultHost=localhost jvmRoute=app_server_01> Is there any
I have a JBoss server (Server A) that is publishing messages on a topic.
I have a web application deployed on a jboss server running on a unix
So we have three FLEX controls hosted within a JBOSS server instance, and an
I have a web application running in a jboss application server (But it is
I have a server on our company intranet that runs JBoss. I want to
Right now I have a JBoss application server and I want to setup an
We've been debugging this JBoss server problem for quite a while. After about 10
I have a simple web service running on a JBoss server. Now I need

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.