John Rocha created AMQ-3925:
-------------------------------

             Summary: Advisory messages/topics not generated for 
ActiveMQ.Advisory.FULL or ActiveMQ.Advisory.FastProducer.Queue
                 Key: AMQ-3925
                 URL: https://issues.apache.org/jira/browse/AMQ-3925
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.6.0
         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)

            Reporter: John Rocha
         Attachments: activemq.xml, simple_consumer.cpp, simple_producer.cpp, 
test_details.txt

Two problems relating to advisory messages

# Advisory messages and topics are not being created for 
{{ActiveMQ.Advisory.FULL}} or 
{{ActiveMQ.Advisory.FastProducer.\{Queue,Topic}}}\\
\\
# The {{PolicyEntry}} property for 
{{ActiveMQ.Advisory.FastProducer.\{Queue,Topic}}} is misspelled as 
advis{color:red}d{color}oryForFastProducers.\\
\\
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 {{{color:blue}activemq.xml{color}}} 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 {{{color:blue}activemq.xml{color}}} file.


I have expanded the {{{color:blue}simple_producer.cpp{color}}} 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 {{{color:blue}simple_producer.cpp{color}}} file.


I have expanded the {{{color:blue}simple_consumer.cpp{color}}} 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 {{{color:blue}simple_consumer.cpp{color}}} file.


The test/problem are as follows:

# 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.\\
\\
# 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.\\
\\
# 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}}.\\
\\
# Start the *consumer* so that it will monitor all advisory topics.\\
\\
{{env DEST="ActiveMQ.Advisory.>" TOPIC=1 simple_consumer.exe}}\\
\\
# Refresh the WebConsole screen. Each of the advisory topics will now show a 
consumer.\\
\\
# 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.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to