-
Notifications
You must be signed in to change notification settings - Fork 605
Serialize sequence number as long
#1806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Sorry with fever in bed and can't think straight |
@danielmarbach no worries, get well soon! Some more context in this comment of mine: |
Out of curiosity, wouldn't it be better to actually encode the header as the number type directly, rather than going through a string? I believe headers do support numbers as value directly (at least I recall banging my head against that for a Rebus.rabbitmq bug a while ago) Though I guess allocation-wise it won't matter much as it's either a string allocation or a boxing allocation? I'm asking mainly to learn, as there might be some delicious knowledge to be had :) Either way thank you for the extremely quick response time on the issue! |
Yep, it would be, but RabbitMQ and QPid stray from the AMQP 0.9.1 spec when it comes to unsigned long long values: https://www.rabbitmq.com/amqp-0-9-1-errata Notice that the spec specifies that ...but RabbitMQ does not work that way: |
882980d
to
4506de7
Compare
@zlepper your suggestion made me consider an alternative.
Considering that it would take publishing one message per millisecond over the next 292,471,208 years to exceed |
long
Fixes issue raised in #1805 Encode publish sequence number in x-dotnet-pub-seq-no as a `long` instead of ASCII string, unless value is greater than `long.MaxValue`.
4506de7
to
b057ca2
Compare
There's always |
Just tested this master branch locally and it seems to be a much better solution. In our case a SAP pi po rest adapter is having a lot of trouble with the previous value of the x-dotnet-pub-seq-no header while transforming it to XML. @lukebakken any idea when a new (alpha) release will be made? Many thanks for this fix, a saved us from a big headache. |
As soon as I can fix this issue - #1802 It is difficult to reason about. |
Fixes issue raised in #1805