Particular / NServiceBus.RabbitMQ

RabbitMQ transport for NServiceBus
https://docs.particular.net/nservicebus/rabbitmq/
Other
89 stars 58 forks source link

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

Open ydie22 opened 3 years ago

ydie22 commented 3 years ago

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.

boblangley commented 3 years ago

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.