Not seeing enabled advisories ActiveMQ WebConsole

classic Classic list List threaded Threaded
9 messages Options
JRR
Reply | Threaded
Open this post in threaded view
|

Not seeing enabled advisories ActiveMQ WebConsole

JRR
Hello,

I am using ActiveMQ 5.6.0 with the CPP client 3.4.2.

I enabled advisories for 'advisoryWhenFull' and 'advisoryForFastProducers' in my activemq.xml file and then restarted the broker. I know that this file is being read due to a couple of errors logged for early typos.

I then used a producer to send persistent messages to the broker's queue until the broker sent an exception to the producer for producer flow control once the limit was reached.

I also did this for non-persistent messages.

I then attached to the AMQ web console and navigated to the 'Topics' screen where I see
1. ActiveMQ.Advisory.Connection
2. ActiveMQ.Advisory.Producer.Queue.c.c.p.v.ms.events
3. ActiveMQ.Advisory.Queue

and that's it. I'm not seeing any advisories for full or fast producers as I expected. Any suggestions? Does the web console not see these?

My activemq.xml configuration is as follows

<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:amq="http://activemq.apache.org/schema/core"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">


    <!-- Allows us to use system properties as variables in this -->
    <!-- configuration
         file -->
    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <value>file:${activemq.conf}/credentials.properties</value>
        </property>
    </bean>

    <!-- ================================================================== -->
    <!-- The <broker> element is used to configure the ActiveMQ broker.     -->
    <!--                                                                    -->
    <!-- Changed useJmx to true to allow web console                        -->
    <!-- ================================================================== -->
	<broker xmlns="http://activemq.apache.org/schema/core"
		brokerName="jrr-5-6-0-localhost"
        advisorySupport="true"
		useJmx="true"
        useShutdownHook="false">
		<!--
			Destination specific policies using destination names or wildcards
		-->
		<destinationPolicy>
			<policyMap>
				<policyEntries>
					<policyEntry queue=">" memoryLimit="5mb" />
					<policyEntry topic=">" memoryLimit="5mb" />
					<policyEntry queue=">"
					                  advisoryWhenFull="true" />
					<policyEntry queue=">"
					                  advisdoryForFastProducers="true" />
				</policyEntries>
			</policyMap>
		</destinationPolicy>
		
		<systemUsage>
		    <systemUsage sendFailIfNoSpace="true">
    			<memoryUsage>
      				<memoryUsage limit="5 mb" />
    			</memoryUsage>
    			<storeUsage>
      				<storeUsage limit="64 mb" />
    			</storeUsage>
    			<tempUsage>
      				<tempUsage limit="64 mb" />
    			</tempUsage>
  			</systemUsage>
		</systemUsage>
		
         
		<!-- The transport connectors ActiveMQ will listen to -->
		<transportConnectors>
			<transportConnector name="tcp"
				uri="tcp://localhost:61616?wireFormat.maxInactivityDuration=0" />
		</transportConnectors>

	</broker>

    <!--
        Enable web consoles, REST and Ajax APIs and demos

        Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
    -->
    <import resource="jetty.xml"/>

</beans>
<!-- END SNIPPET: example -->
JRR
Reply | Threaded
Open this post in threaded view
|

Re: Not seeing enabled advisories ActiveMQ WebConsole

JRR
I've created a consumer and I can see advisory messages for

1. ActiveMQ.Advisory.Connection
2. ActiveMQ.Advisory.Producer.Queue.c.c.p.v.ms.events
3. ActiveMQ.Advisory.Queue

But not for ActiveMQ.Advisory.FastProducer.Queue or ActiveMQ.Advisory.FULL

I see these topics CREATED when my consumer starts but they never get any messages.
Reply | Threaded
Open this post in threaded view
|

Re: Not seeing enabled advisories ActiveMQ WebConsole

gtully
have a peek at this test case:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3903Test.java?view=markup

tweak it to validate your exact scenario but to me, it confirms the fix

On 12 July 2012 23:23, JRR <[hidden email]> wrote:

> I've created a consumer and I can see advisory messages for
>
> 1. ActiveMQ.Advisory.Connection
> 2. ActiveMQ.Advisory.Producer.Queue.c.c.p.v.ms.events
> 3. ActiveMQ.Advisory.Queue
>
> But not for ActiveMQ.Advisory.FastProducer.Queue or ActiveMQ.Advisory.FULL
>
> I see these topics CREATED when my consumer starts but they never get any
> messages.
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Not-seeing-enabled-advisories-ActiveMQ-WebConsole-tp4653952p4653953.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



--
http://fusesource.com
http://blog.garytully.com
JRR
Reply | Threaded
Open this post in threaded view
|

Re: Not seeing enabled advisories ActiveMQ WebConsole

JRR
Hello Gary,

How would I run the test you referenced? I use the CPP client not Java. (Actually I don't use Java at all... I start the broker using the bin/activemq script or the script our Java team gives the server team for starting the broker).

I looked through the code and I see that one of the things it's looking for is a ResourceAllocationException  which my CPP client does indeed receive, but there is no fast consumer advisory or full advisory generated even thought the CPP client receives that exception.

Also, in looking at the test it appears that the broker and the producer are created in the same from the same application. Which I believe means they run in the same JVM (I'm not a java person so I'm using words I'm not very familiar with here -- words I've heard our UI team use.) If this is true, it's different from my test that has the broker running in one JVM and an external producer client. Granted one would expect them to behave the same.

Also, it appears that your doTestAdvisoryForFastProducer() is creating creating the two topics for fast producer and full advisory. Is it necessary for these topics to be created first? I ask because in my test I noticed that other advisory topics were created when the advisory was generated, regardless if there was a consumer created for the topic or not.

I also noticed that you are sending persistent messages, while I am sending non-persistent messages. Does this make a difference?

Thanks,

-=John
Reply | Threaded
Open this post in threaded view
|

Re: Not seeing enabled advisories ActiveMQ WebConsole

gtully
think the key bit is to create the advisory topic consumers up front.
There no persistence on a topic unless there are durable subscribers,
so you need to be listening to the topic to get the advisory.

On 13 July 2012 16:03, JRR <[hidden email]> wrote:

> Hello Gary,
>
> How would I run the test you referenced? I use the CPP client not Java.
> (Actually I don't use Java at all... I start the broker using the
> bin/activemq script or the script our Java team gives the server team for
> starting the broker).
>
> I looked through the code and I see that one of the things it's looking for
> is a ResourceAllocationException  which my CPP client does indeed receive,
> but there is no fast consumer advisory or full advisory generated even
> thought the CPP client receives that exception.
>
> Also, in looking at the test it appears that the broker and the producer are
> created in the same from the same application. Which I believe means they
> run in the same JVM (I'm not a java person so I'm using words I'm not very
> familiar with here -- words I've heard our UI team use.) If this is true,
> it's different from my test that has the broker running in one JVM and an
> external producer client. Granted one would expect them to behave the same.
>
> Also, it appears that your doTestAdvisoryForFastProducer() is creating
> creating the two topics for fast producer and full advisory. Is it necessary
> for these topics to be created first? I ask because in my test I noticed
> that other advisory topics were created when the advisory was generated,
> regardless if there was a consumer created for the topic or not.
>
> I also noticed that you are sending persistent messages, while I am sending
> non-persistent messages. Does this make a difference?
>
> Thanks,
>
> -=John
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Not-seeing-enabled-advisories-ActiveMQ-WebConsole-tp4653952p4653989.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



--
http://fusesource.com
http://blog.garytully.com
JRR
Reply | Threaded
Open this post in threaded view
|

Re: Not seeing enabled advisories ActiveMQ WebConsole

JRR
SADNESS!

I changed my steps so that I created a consumer for the topics:
    ActiveMQ.Advisory.FULL
    ActiveMQ.Advisory.Full
    ActiveMQ.Advisory.FastProducer.Queue

I changed to the snapshot for 5.7.0.

I see the advisory topics in the web console. However no advisories are ever sent to them for my configuration.

The CPP client is receiving a javax.jms.ResourceAllocationException so I would expect a FastProducer and a FULL advisory.
Reply | Threaded
Open this post in threaded view
|

Re: Not seeing enabled advisories ActiveMQ WebConsole

gtully
Are you using a composite destination?
In the little unit test the advisory destinations are:
topic://ActiveMQ.Advisory.FastProducer.TempQueue.ID:gtmbp.local-55628-1342199123635-3:1:1
topic://ActiveMQ.Advisory.FULL.TempQueue.ID:gtmbp.local-55628-1342199123635-3:1:1

So you need the exact match or a composite destination in your consumer, like
topic://ActiveMQ.Advisory.FastProducer.>
topic://ActiveMQ.Advisory.FULL.>


On 13 July 2012 16:49, JRR <[hidden email]> wrote:

> SADNESS!
>
> I changed my steps so that I created a consumer for the topics:
>     ActiveMQ.Advisory.FULL
>     ActiveMQ.Advisory.Full
>     ActiveMQ.Advisory.FastProducer.Queue
>
> I changed to the snapshot for 5.7.0.
>
> I see the advisory topics in the web console. However no advisories are ever
> sent to them for my configuration.
>
> The CPP client is receiving a javax.jms.ResourceAllocationException so I
> would expect a FastProducer and a FULL advisory.
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Not-seeing-enabled-advisories-ActiveMQ-WebConsole-tp4653952p4654002.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



--
http://fusesource.com
http://blog.garytully.com
JRR
Reply | Threaded
Open this post in threaded view
|

Re: Not seeing enabled advisories ActiveMQ WebConsole

JRR
Hello.

I tried with all of the following destinations.
ActiveMQ.Advisory.FULL.>
ActiveMQ.Advisory.FULL
ActiveMQ.Advisory.Full.>
ActiveMQ.Advisory.Full
ActiveMQ.Advisory.>
ActiveMQ.Advisory.FastProducer.>


The only consumer that ever received anything was ActiveMQ.Advisory.> and that was getting notifications from the default advisories:
ActiveMQ.Advisory.Producer.Queue.c.c.p.v.ms.events
ActiveMQ.Advisory.Connection
ActiveMQ.Advisory.Queue


In another test I enabled the advisory for
    sendAdvisoryIfNoConsumers/ActiveMQ.Advisory.NoConsumer.Queue.c.c.p.v.ms.events

and this generated advisories that could read from either ActiveMQ.Advisory.NoConsumer.Queue.c.c.p.v.ms.events or ActiveMQ.Advisory.>

I think this is a problem with the advisory not being generated for the configuration that I have.
JRR
Reply | Threaded
Open this post in threaded view
|

Re: Not seeing enabled advisories ActiveMQ WebConsole

JRR
Oh... and this is now being tested against the 5.7.0 snapshot for the broker.