Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-871

Delivery of messages between consumers is very unequal when using message groups feature

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • JBoss A-MQ 6.2
    • JBoss A-MQ 6.1
    • None
    • None
    • Hide

      1. Download the attached messagegroups_nov28_2.zip, which contains a Maven project
      2. Build the project
      3. Install and start JBoss Fuse 6.1 or JBoss Active MQ 6.1. Set the admin password to 'admin' (or modify the test case source)
      4. Run the test case as follows:

      java -jar target/messagegroups-0.0.1-jar-with-dependencies.jar --produce --consume --numproducers 2 --numconsumers 6.

      This will produce messages on 2 threads and consume on 6. The program will dump every ten seconds the number of messages on each thread. Note that the numbers can be very unequal, and some consumer threads will appear to block for minutes, or whilst other threads consume thousands of messages.

      Show
      1. Download the attached messagegroups_nov28_2.zip, which contains a Maven project 2. Build the project 3. Install and start JBoss Fuse 6.1 or JBoss Active MQ 6.1. Set the admin password to 'admin' (or modify the test case source) 4. Run the test case as follows: java -jar target/messagegroups-0.0.1-jar-with-dependencies.jar --produce --consume --numproducers 2 --numconsumers 6. This will produce messages on 2 threads and consume on 6. The program will dump every ten seconds the number of messages on each thread. Note that the numbers can be very unequal, and some consumer threads will appear to block for minutes, or whilst other threads consume thousands of messages.

    Description

      Multiple consumers are attached to particular JMS queue. Each consumer runs on a thread and holds its own JMS session; each session is derived from the same JMS connection. Each consumer thread reads a randomized number of messages and then shuts down its consumer and starts a new one, such that each thread creates mutliple, sequential consumers from the same session.

      Producers post messages to the queue, and each message is assigned a particular value of the JMSXGroupID header – the intention is that all messages with the same group ID are read by the same consumer. In my tests, each group consists of ten messages.

      Message delivery to consumers is very unequal. Because each group ID has a relatively small number of messages compared to the total message volume, we expect each consumer thread to see roughly the same number of messages.

      In practice, however, it's common for one or two consumers to dominate message consumption, leading to a catastrophic loss of throughput. It's common to see a consumer sitting completely idle, while another thread reads thousands of messages.

      Attachments

        1. messagegroups_nov28_2.zip
          167 kB
        2. ActiveMQConfig.xml
          4 kB
        3. activemq.xml
          3 kB
        4. TestRun120314.txt
          4 kB
        5. App.java
          11 kB

        Activity

          People

            gtully@redhat.com Gary Tully
            rhn-support-kboone Kevin Boone
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: