activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Gomes <e.se...@gmail.com>
Subject Re: unable to create non durable consumer
Date Fri, 30 Jan 2009 23:55:21 GMT
I think a couple of things should be clarified first.  Setting the
Persistent flag is not the same thing as a Durable Consumer.  A durable
consumer must be created with the CreateDurableConsumer() API.  A normal
consumer will consume messages flagged as persistent as well as
non-persistent.

If you are creating and publishing to a topic, and not a queue, any messages
published to the topic before the consumer is created should not be
delivered to that consumer.  However, if you are publishing messages to a
queue, then a consumer that is attached to the queue later on will have
those messages delivered to it.

A test case showing the problem would be helpful.

Best,
Jim

On Sun, Jan 11, 2009 at 10:27 PM, anujjain <anujjain1981@gmail.com> wrote:

>
> Hi I am using ActiveMQ 5.2.0 with NMS ver 1.1. I am trying to create a non
> durable consumer as below:
> =============
> this.consumer = this.session.CreateConsumer(topic);
> =============
> Whenever a message is published on that topic, and if I have no
> subscription
> to this topic. Message is persisted. And whenever i subscribe to that topic
> i get all the messages published before my subscription. Further to this I
> have also set the persistent property of my producer as well as
> NMSPersistent property on my producer and my message as false.
> ====================
> this.producer.Persistent = false;
> textMessage.NMSPersistent = false;
> ====================
> But even then it is creating a durable consumer. Can anyone suggest me
> wether I am missing any thing?
> --
> View this message in context:
> http://www.nabble.com/unable-to-create-non-durable-consumer-tp21409108p21409108.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

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