Alex your response about queue attribute 'messageDurability' isn't what I had
set to NEVER - it was the Persist Messages? attribute that I set to NEVER.  
I want to make sure I'm on the same page as you guys and I'll provide some
screen shots to show what I did and saw.

Firstly, my original post was referring to the attribute 'Message persistent
override' from this documentation:
https://qpid.apache.org/releases/qpid-broker-j-7.0.2/book/Java-Broker-Management-Managing-Queues.html.

There is a 'Durable' attribute documented on that page also and my current
setting is enabled (checked on the admin UI) but that wasn't what I wanting
to change/test.

Using the web admin UI I changed a queue's Persist Messages? value to NEVER
- see this screen shot 
<http://qpid.2158936.n2.nabble.com/file/t396334/broker-j-queue-persist.png> 

I then ran this Java code using Qpid JMS 0.30.0 jars:
ConnectionFactory connectionFactory = new JmsConnectionFactory(brokerUrl);
Connection connection = connectionFactory.createConnection(user, pwd);
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination destination =
session.createQueue("app_attach_ehcacheReplicateQueue");
MessageProducer messageProducer = session.createProducer(destination);
TextMessage message = session.createTextMessage("Hello world! " + new
Timestamp(System.currentTimeMillis()));
messageProducer.send(message);
 
It published the message to the queue and when I view the message via the
web admin UI it has Persistent: true - see this screen shot 
<http://qpid.2158936.n2.nabble.com/file/t396334/broker-j-msg-persist.png> . 
I expected it to be Persistent: false based upon my change to NEVER and what
I understood from the documentation.

Also, when I ran this Java code (using JMS 0.30.0 again), it returned a
value of 2 which indicates it is a persistent message:
MessageConsumer messageConsumer = session.createConsumer(destination);
TextMessage message = (TextMessage)messageConsumer.receive();
System.out.println(String.format("persist?: %s",
message.getJMSDeliveryMode()));

However, after reading Alex's response of ' Thus, on broker restart the
queue entries would be removed. ' I thought I would see what would happen to
the message after the broker restart.  When I restarted the broker the
message was gone.

So now I'm actually a little more confused that I originally was but perhaps
I'm not fully understanding this.   Being that the message was marked as
Persistent (even though I didn't want it to be) and the Queue is marked as
Durable (the checkbox is checked on the web admin UI), the message was lost
which doesn't seem right?
 
The virtual host environment I have is a 3 VirtualHostNode setup for HA.  I
didn't test this on a single VirualHost node.

Thanks
Bryan



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to