ActiveMQ
  1. ActiveMQ
  2. AMQ-762

Message Group based load balancing not well distributed across brokers

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: 5.x
    • Component/s: None
    • Labels:
      None
    • Environment:

      Active MQ 4.0, Lingo 1.1

      Description

      I started 2 servers, each of which have an embedded broker. A shell based chield sends messages to 30 different message groups (using command "register <message group>" in the samepl app provided. Only 2 mesages are received by server1, 3 by server2 and 25 by server3. The load balancing distribution is highly unenen.

      As suggested, I also tried setting a low destination queue prefetch value (consumer.prefetch=1) but the result was the same.

      To run sample :

      1. Unzip attached file and run "maven.bat" from the oot directory (Maven 1.0)
      2. Open 3 DOS boxes in the dist\bin folder and run "startoptimizerPooled.bat", "startOptimizerPooled2.bat" and "startOptimizerPooled3.bat" in each DOS box respectively.
      3. Step 2 starts a network of 3 servers apps which have an embedded broker. The Spring configuration files for each of these servers is in the dist\conf directory.

      4. Open another DOS box in dist\bin and start a test client by running "startClientShell.bat"
      5. This command driver test client accepts commads in the form
      "register <message group>"
      "close <message group>"
      and "exit"

      NOTE: The command "close <message group>" is supposed to close/reset the message group by issueing a "JMSXGroupSeq" header as described here : http://www.activemq.org/site/message-groups.html

      6. Try sending several messages to the server by issuing several commands like "regeister A", "register B", "register C" and so on.. You'll see the highly uneven distibution of messages. Only one or two messages are received my 2 servers while the third one receives a majority of the messages.

      Please let me know if you have trouble running the sample or replicating the issue.

      Thanks,
      Sanjiv

        Activity

        Hide
        Alexis Bietti added a comment -

        Possibly related issue: exclusive consumers don't work either across brokers.

        Show
        Alexis Bietti added a comment - Possibly related issue: exclusive consumers don't work either across brokers.
        Hide
        james strachan added a comment -

        changing to an improvement; as we've never said message groups work across brokers before so its not a bug per se

        Show
        james strachan added a comment - changing to an improvement; as we've never said message groups work across brokers before so its not a bug per se
        Hide
        Sanjiv Jivan added a comment -

        Unfortunately SimpleMessageListenerContainer doesnt seem to be helping.

        Show
        Sanjiv Jivan added a comment - Unfortunately SimpleMessageListenerContainer doesnt seem to be helping.
        Hide
        Sunil Bosco Rodrigues added a comment -

        Using spring 2.0 and Active MQ 4.0 I had the original problem reported by Craig.

        INFO Service - Sync error occurred: javax.jms.InvalidClientIDException: Broker: localhost - Client: ID:inspiron-1410-114619274
        7453-2:1 already connected

        I could get this to work by replacing the DefaultMessageListenerFactory with the SimpleMessageListenerFactory class and I did not have this problem. It's a workaround so hope it helps resolving the original issue.

        Thanks,

        Rodrigues.

        Show
        Sunil Bosco Rodrigues added a comment - Using spring 2.0 and Active MQ 4.0 I had the original problem reported by Craig. INFO Service - Sync error occurred: javax.jms.InvalidClientIDException: Broker: localhost - Client: ID:inspiron-1410-114619274 7453-2:1 already connected I could get this to work by replacing the DefaultMessageListenerFactory with the SimpleMessageListenerFactory class and I did not have this problem. It's a workaround so hope it helps resolving the original issue. Thanks, Rodrigues.

          People

          • Assignee:
            Unassigned
            Reporter:
            Sanjiv Jivan
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development