NServiceBus.RabbitMQ icon indicating copy to clipboard operation
NServiceBus.RabbitMQ copied to clipboard

The message expiration time is not set correctly when the timespan duration is a fractional number of milliseconds

Open ydie22 opened this issue 2 years ago • 1 comments

It seems that RabbitMQ accepts only integer values for the message expiration header. However, the header value is currently set using TotalMilliseconds.ToString(CultureInfo.InvariantCulture). We have a service that sends messages with a computed expiration time, but that does not round the duration to an integer number of milliseconds. It would probably be better if the transport takes care of this rounding. In case the value is not an integer, RabbitMQ sends back a 406 Precondition Failed response.

ydie22 avatar Sep 27 '21 07:09 ydie22

Thanks for the request. When we start working on this we will update the issue. As of now, it is not scheduled and there is no ETA.

boblangley avatar Sep 27 '21 18:09 boblangley