Lee
November 14, 2017, 12:14pm
1
Hi,
I have a web api sending a command to an NServiceBus endpoint and the message delivery_mode is set to persistent as I would expect. However, when that message gets processed and publishes out events, the delivery_mode on those messages is set to non-persistent which is not expected. We have the outbox functionality enabled, so I guess it could be something to do with that.
What causes this to happen? What is the fix?
Thanks.
What type of outbox persistence are you using?
Can you confirm that the data stored for each operation does not contain the “NonDurable” option?
Also what version of the RabbitMQ transport adapter are you using?
Lee
November 14, 2017, 12:39pm
3
We are using NServiceBus.NHibernate version 6.2.7. The version of NServiceBus.RabbitMQ is 3.1.0.
Got it, can you look at the “TransportOperations” column for one of the problematic messages and see what metadata is in there?
Lee
November 14, 2017, 12:43pm
5
Sure, I have one. What metadata in particular?
Look to see if there is a “NonDurable” option in there?
Lee
November 14, 2017, 12:45pm
7
There is nothing in there that says NonDurable.
Thanks for confirming, I think this might be a bug in NServiceBus v5, will keep you posted.
We’ve confirmed this to be a v5 bug and will release a patch shortly, see Messages are sent as non-durable if outbox is enabled on Version 5 · Issue #5074 · Particular/NServiceBus · GitHub for more details.
Thanks for bringing this to our attention.
Cheers,
Andreas
Lee
November 14, 2017, 4:20pm
10
Thank you, do you have an estimated time on this patch please?
We have a PR that fixes the issue and we’ll release as soon as we’re done testing the patch. Releasing sometime tomorrow GMT+1 is my best estimate at the moment.
Does that timeline work out for you?
Cheers,
Andreas
Lee
November 14, 2017, 9:40pm
12
Oh yes, that is quicker than I expected! I appreciate the quick turnaround. Thank you.
bording
(Brandon Ording)
November 15, 2017, 5:46pm
13
Hi Lee,
I wanted to let you know that we’ve released NServiceBus 5.2.25, which has the fix for the issue you reported:
Hi everyone,
We’ve just released NServiceBus 5.2.25.
Fixed bugs
#5047 Messages are sent as non-durable if Outbox is enabled on Version 5
How to know if you are affected
You are affected if you are using NServiceBus Version 5 with the RabbitMQ transport and the Outbox enabled.
Symptoms
Messages sent from message handlers will be marked as non-durable. This can lead to message loss on transports with support for non-durable messages when there is an infrastructure failure with the queuing…
Lee
November 15, 2017, 6:53pm
14
Perfect. Thanks very much for the fast response.