Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-3925

Advisory messages/topics not generated for ActiveMQ.Advisory.FULL or ActiveMQ.Advisory.FastProducer.Queue

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 5.6.0
    • Fix Version/s: 5.7.0
    • Component/s: None
    • Environment:

      activemq broker: 5.6.0
      AMQ-CPP client: 3.4.0
      OS: Linux

      java version "1.6.0_17"
      Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
      Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)

      Description

      Two problems relating to advisory messages

      1. Advisory messages and topics are not being created for ActiveMQ.Advisory.FULL or ActiveMQ.Advisory.FastProducer.{Queue,Topic}

      2. The PolicyEntry property for ActiveMQ.Advisory.FastProducer.{Queue,Topic} is misspelled as advisdoryForFastProducers.

        Note that it is spelled with an extra 'd' (advisDory....) Moreover, the configuration XML expects the 'd' in this name. I tried spelling it correctly and activemq 5.6.0 failed when I used the corrected name of advisoryForFastProducers.

      I have customized the activemq.xml configuration file so that advisory support is enabled, and I added a policy entry to turn on ActiveMQ.Advisory.FULL and ActiveMQ.Advisory.FastProducer.Queue. Moreover, systemUsage has been configured to send an exception to the producer if memory, storage or temp usage exceeds certain amounts.

      I have attached my activemq.xml file.

      I have expanded the simple_producer.cpp example file to use the AMQ client interface that our product has. Essentially it creates a connection and all the scaffolding to send messages to the broker. Then it sits in a loop and sends messages. It has some parameters to allow control such as exiting on the first exception (such as when the broker sends its flow control exception when the producer causes the broker to reach it's configured limits, or limiting the number of messages to send).

      This is attached as the simple_producer.cpp file.

      I have expanded the simple_consumer.cpp example file to display message/queue names and work with advisory messages too. It has options to allow the user to indicate which queues/topics to connect too, where the default is the queues that our product uses.

      This is attached as the simple_consumer.cpp file.

      The test/problem are as follows:

      1. Start the broker in console mode, validating that no errors occurred, it's current system usage limit configuration is small enough that it doesn't take long to reach the limit.

      2. Start the producer so that it will send messages to it's default queue (c.c.p.v.ms.events) and terminate as soon as the broker sends it a flow control exception.

        env EX_LIMIT=1 ./simple_producer.exe

        This will run for 2-5 minutes. It usually gets an exception around 25,223 messages.

      3. When the producer terminates, use the WebConsole to view the broker, navigating to the Topics screen and we see the Advisory topics that are created.

        There is only: ActiveMQ.Advisory.Connection, ActiveMQ.Advisory.Producer.Queue.c.c.p.v.ms.events and ActiveMQ.Advisory.Queue.

        Since the producer was terminated due to flow control caused by the disk/memory usage limit being reached, we should also see the advisory queues for ActiveMQ.Advisory.FULL and ActiveMQ.Advisory.FastProducer.Queue.

      4. Start the consumer so that it will monitor all advisory topics.

        env DEST="ActiveMQ.Advisory.>" TOPIC=1 simple_consumer.exe

      5. Refresh the WebConsole screen. Each of the advisory topics will now show a consumer.

      6. Use the producer to send in one message. The broker is at its usage limits so that send will be flow controlled, causing an exception to be sent to the producer.

        env MSG_LIMIT=1 simple_producer.exe

        The consumer will now accept and display the advisory messages it has received. There will be two for ActiveMQ.Advisory.Connection for the producers connection start and stop, and two for the ActiveMQ.Advisory.Producer.Queue.c.c.p.v.ms.events as the producerCount goes to 1 and then to zero as the producer connects and disconnects to the topic.

        There is no FastConsumer or FULL advisory generated even though their conditions have been triggered.

      Detailed test output for the summary listed above is attached.

        Attachments

        1. activemq.xml
          4 kB
          John Rocha
        2. simple_producer.cpp
          27 kB
          John Rocha
        3. simple_consumer.cpp
          12 kB
          John Rocha
        4. test_details.txt
          16 kB
          John Rocha

          Issue Links

            Activity

              People

              • Assignee:
                gtully Gary Tully
                Reporter:
                jrr John Rocha
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: