Hi JB, I have to disagree with this view.

The JMS delivery mode should be honoured by ActiveMQ, it should not 'improve' 
or change the delivery mode in any way. There's no reason such a message should 
survive a broker re-start, in fact I'm pretty sure most everyone will expect to 
loose such a message.

In my case it is perfectly reasonable for a non-persistent message to go to 
DLQ, having a server-side retry configured, to pass the message to another 
consumer that can perhaps handle the message. There's no reason for DLQ to have 
'stronger' persistence requirements.

If the current behaviour makes sense for anyone, then please at least can we 
make it configurable? I'm happy to help.

- Martin


On 30.01.2020 17:41, Jean-Baptiste Onofré wrote:
Hi,

If you enable DLQ to non-persistent message (it's disabled by default),
then, IMHO, any message stored in DLQ should survive to broker restart
(else it's not really a DLQ).
Again, as non-persistent messages are not supposed to go in DLQ. To send
the non-persistent messages to DLQ, you have to use for instance:

  <sharedDeadLetterStrategy processNonPersistent="true" />

In that case, it makes sense to "store" the message persistently in the DLQ.

Regards
JB

On 30/01/2020 17:35, Martin Lichtin wrote:
Can somone help me understand why a non-persistent message is
"converted" into a persistent message on entering DLQ?
It happens in RegionBroker, around line 733:

                             if (!message.isPersistent()) {
                                 message.setPersistent(true);
message.setProperty("originalDeliveryMode", "NON_PERSISTENT");
                             }

I'm puzzled as to why this would make sense.

A non-persistent message, even if configured to use DLQ, should stay
non-persistent, i.e. not survive broker restarts.

- Martin

Reply via email to