You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by marcelcasado <ma...@ucar.edu> on 2011/05/09 21:08:02 UTC

ActiveMQ.Advisory.MessageConsumed.TempQueue problem

Hi,

I have enabled  <policyEntry tempQueue="true" advisoryForConsumed="true" />
in the broker  so I can subscribe to
"ActiveMQ.Advisory.MessageConsumed.TempQueue.>" to get notified of message
consumed on a tempQueue/s. I see looking at the code for TempQueue that
remaining messages on the tempQueues get "acknowledge()" when the tempQueue
is disposed for example when a client shutdown.

TempQueue.dispose(context) --> purge --> removeMessage -> acknowledge -->
messageConsumed()

 In my code I need to know if a message is consumed by a client but I can
not differentiate between a client "ack" massage and one "ack" by the broker
when the tempQueue is "disposed" looking to the message sent to the
ActiveMQ.Advisory.MessageConsumed.TempQueue... .

Why is the reason to make messages ack when the tempQueue is disposed or
purged?

is there a way that the Advisory messages for  "MessageConsumed" include the
"ack" type so I can differentiate between them.

Thanks,

-Marcel

-Marcel   

--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Advisory-MessageConsumed-TempQueue-problem-tp3510067p3510067.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ.Advisory.MessageConsumed.TempQueue problem

Posted by marcelcasado <ma...@ucar.edu>.
Jira opened:

https://issues.apache.org/jira/browse/AMQ-3320

--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Advisory-MessageConsumed-TempQueue-problem-tp3510067p3518956.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ.Advisory.MessageConsumed.TempQueue problem

Posted by Gary Tully <ga...@gmail.com>.
the purge is necessary to release the resources associated with the
temp queue. see: https://issues.apache.org/jira/browse/AMQ-2616

but I think you have a good point here. the advisory for consumed
should be conditional on the message getting acked by a consumer.

It should be easy enough to fix because subscribers are removed before
the queue is purged, so
making the advisory conditional on having some consumers should do it.

Can you open a jira issue to track this. If you have a junit test case
that can verify the behavior you want it would be a great help.


On 9 May 2011 20:08, marcelcasado <ma...@ucar.edu> wrote:
> Hi,
>
> I have enabled  <policyEntry tempQueue="true" advisoryForConsumed="true" />
> in the broker  so I can subscribe to
> "ActiveMQ.Advisory.MessageConsumed.TempQueue.>" to get notified of message
> consumed on a tempQueue/s. I see looking at the code for TempQueue that
> remaining messages on the tempQueues get "acknowledge()" when the tempQueue
> is disposed for example when a client shutdown.
>
> TempQueue.dispose(context) --> purge --> removeMessage -> acknowledge -->
> messageConsumed()
>
>  In my code I need to know if a message is consumed by a client but I can
> not differentiate between a client "ack" massage and one "ack" by the broker
> when the tempQueue is "disposed" looking to the message sent to the
> ActiveMQ.Advisory.MessageConsumed.TempQueue... .
>
> Why is the reason to make messages ack when the tempQueue is disposed or
> purged?
>
> is there a way that the Advisory messages for  "MessageConsumed" include the
> "ack" type so I can differentiate between them.
>
> Thanks,
>
> -Marcel
>
> -Marcel
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Advisory-MessageConsumed-TempQueue-problem-tp3510067p3510067.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://blog.garytully.com
http://fusesource.com