activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher L. Shannon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-6943) ActiveMQ.Advisory.Producer.Queue listener receives RemoveInfo instead of ProducerInfo
Date Thu, 05 Apr 2018 13:31:00 GMT

    [ https://issues.apache.org/jira/browse/AMQ-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16426921#comment-16426921
] 

Christopher L. Shannon commented on AMQ-6943:
---------------------------------------------

This is correct behavior and not an issue (the documentation probably just needs updating). 
The remove info will contain the producer Id so you can use that to figure out when a producer
was removed. 

If you want to know when a destination has no more producers you could figure this out by
listening for the producer creation advisories and then tracking all the producers on a destination
somehow (map or some other data structure, etc). Then when the RemoveInfo is received you
can get the producer Id and remove that producer from your tracking.

> ActiveMQ.Advisory.Producer.Queue listener receives RemoveInfo instead of ProducerInfo
> -------------------------------------------------------------------------------------
>
>                 Key: AMQ-6943
>                 URL: https://issues.apache.org/jira/browse/AMQ-6943
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.15.3
>         Environment: Windows and Red Hat.
>            Reporter: Reid Sommerville
>            Priority: Major
>
> According to the page [http://activemq.apache.org/advisory-message.html] when listening
to the advisory ActiveMQ.Advisory.Producer.Queue a ProducerInfo should be sent when a producer
starts/stops. The ProducerInfo message is sent with the expected value in the "producerCount"
attribute when the producer is created, however on calling producer.close() I receive in
my listener a RemoveInfo message.
> My intention is to detect when a queue has 0 producers so I can terminate the consumer
so the Queue can be deleted by the gcInactiveDestinations support however the RemoveInfo has
no getDestination() member to provide information on what queue the closed producer was attached
to.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message