You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by mrh <mr...@gmail.com> on 2008/04/23 23:17:46 UTC
Re: Message persistence
I've noticed the same thing in JMX when trying to set the persistent="false"
in the <broker> tag. Is this a bug or are messages still sent as persistent
/ durable even when persistence is disabled by the broker?
Thanks,
mrh
Džiugas Baltrūnas-3 wrote:
>
> Hello,
>
> I want messages send by producer to the queue to be non persistent.
> For this, I'm setting JMSDeliveryMode to DeliveryMode.NON_PERSISTENT.
> However, this still makes the message persistent as seen via JMX. Only
> calling setDeliveryMode(DeliveryMode.NON_PERSISTENT) makes the message
> to be non persistent. I'm using Apache ActiveMQ 4.1.1 with the default
> configuration (shipped with distro).
>
> The whole code fragment looks like this:
>
> ///
> ActiveMQConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory("tcp://localhost:61616");
> connection = connectionFactory.createConnection()
> connection.start();
>
> session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
> Destination destination = session.createQueue("testing.out");
> MessageProducer producer = session.createProducer(destination);
>
> Message msg = session.createMessage()
> msg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
> producer.send(msg);
>
> session.close();
> connection.close();
> ///
>
> The same problem is relevant also for Spring's jmsTemplate. Setting
> deliveryPersistent property to false on JmsTemplate bean does not make
> outgoing messages non persistent.
>
> Thanks in advance.
>
> Regards,
> Dzugas Baltrunas
>
>
--
View this message in context: http://www.nabble.com/Message-persistence-tp12012737s2354p16834827.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Message persistence
Posted by Rob Davies <ra...@gmail.com>.
marking the broker as non persistent (persistent=false) - means the
broker uses an in memory store - it doesn't affect the delivery mode
of the messages sent to it - they will still be placed in the store
(just not on disk)
cheers,
Rob
On 23 Apr 2008, at 22:17, mrh wrote:
>
> I've noticed the same thing in JMX when trying to set the
> persistent="false"
> in the <broker> tag. Is this a bug or are messages still sent as
> persistent
> / durable even when persistence is disabled by the broker?
>
> Thanks,
> mrh
>
>
> Džiugas Baltrūnas-3 wrote:
>>
>> Hello,
>>
>> I want messages send by producer to the queue to be non persistent.
>> For this, I'm setting JMSDeliveryMode to DeliveryMode.NON_PERSISTENT.
>> However, this still makes the message persistent as seen via JMX.
>> Only
>> calling setDeliveryMode(DeliveryMode.NON_PERSISTENT) makes the
>> message
>> to be non persistent. I'm using Apache ActiveMQ 4.1.1 with the
>> default
>> configuration (shipped with distro).
>>
>> The whole code fragment looks like this:
>>
>> ///
>> ActiveMQConnectionFactory connectionFactory = new
>> ActiveMQConnectionFactory("tcp://localhost:61616");
>> connection = connectionFactory.createConnection()
>> connection.start();
>>
>> session = connection.createSession(false,
>> Session.CLIENT_ACKNOWLEDGE);
>> Destination destination = session.createQueue("testing.out");
>> MessageProducer producer = session.createProducer(destination);
>>
>> Message msg = session.createMessage()
>> msg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
>> producer.send(msg);
>>
>> session.close();
>> connection.close();
>> ///
>>
>> The same problem is relevant also for Spring's jmsTemplate. Setting
>> deliveryPersistent property to false on JmsTemplate bean does not
>> make
>> outgoing messages non persistent.
>>
>> Thanks in advance.
>>
>> Regards,
>> Dzugas Baltrunas
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Message-persistence-tp12012737s2354p16834827.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>