[ 
https://issues.apache.org/activemq/browse/AMQ-723?page=comments#action_36630 ] 
            
james strachan commented on AMQ-723:
------------------------------------

I added some documentation to the advisory messages page

http://activemq.org/site/advisory-message.html

basically each consumer advisory message has the number of active consumers on 
the destination as a header, so you can use the selector...

consumerCount = 0

to be notified only when there are no consumers. (Note you might want to check 
in JMX on startup to see what consumers are available, then use advisories for 
events)

> Generate Advisory Messages to setup tear down producer based on consumer 
> activity
> ---------------------------------------------------------------------------------
>
>                 Key: AMQ-723
>                 URL: https://issues.apache.org/activemq/browse/AMQ-723
>             Project: ActiveMQ
>          Issue Type: New Feature
>          Components: Broker
>    Affects Versions: 4.0
>            Reporter: Kyle Himmerick
>             Fix For: 4.1
>
>   Original Estimate: 30 minutes
>  Remaining Estimate: 30 minutes
>
> Use Case is a custom producer is setup for each topic and should be shut down 
> when there are no subscribers left.
> With the getConsumerAdvisoryTopic I can receive messages when a specific 
> subscriber joins or leaves.  So I can figure out if a consumer is the first, 
> but it would be nice to receive a separate message here.
> Currently there is nothing that generates advisory messages when there are no 
> subscribers left.  The getNoTopicConsumersAdvisoryTopic() only fires when a 
> message is sent to a topic with no consumers, like dead letter queue.  A 
> separate advisory message should be fired when the last subscriber leaves.  
> Ideally we could set a delay for this advisory message, so it could fire if 
> the ConsumerCount remained at 0 for x msec/min.  This would prevent 
> unnecessary tear down/setup of the producer.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to