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.

Reply via email to