activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <tb...@alumni.duke.edu>
Subject Re: Non-Persistent Queue
Date Tue, 20 Jan 2015 15:47:49 GMT
Queues don't work like that; a message on a queue will be there until it is
consumed, it expires, or the broker is restarted (for a non-persistent
broker like yours; that's what persistence means: whether the messages will
survive a broker restart).

But you can use JMSExpiration to ensure that messages are expired quickly
if no consumer is connected...  It's not quite what you're asking for, but
it might be close enough to meet your needs.
On Jan 20, 2015 7:49 AM, "nelsoncc" <nelson.cintra@novabase.pt> wrote:

> Hi,
>
> I'm trying to use a non-persistent queue, but when no consumer is connected
> the message stays in activemq. If I connect a consumer after a while the
> message is delivered.
>
> What I want is the same logic of Topic but in a Queue, if no consumer is
> connected the message is discarded.
> This is because I can have 2 consumers, if the message failed to deliver to
> one consumer, the message is delivered to the second one.
>
> Kind Regards,
> Nelson Cintra.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Non-Persistent-Queue-tp4690148.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message