Skip to content
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

JMSExpiration should be zero for non-expiring messages #112

Closed
siviae opened this issue Jun 14, 2019 · 1 comment · Fixed by #113
Closed

JMSExpiration should be zero for non-expiring messages #112

siviae opened this issue Jun 14, 2019 · 1 comment · Fixed by #113
Assignees
Milestone

Comments

@siviae
Copy link

siviae commented Jun 14, 2019

The value for infinite message TTL in RabbitMQ is null.
However, according to specification, page 31),

If the time-to-live is specified as zero, expiration is set to zero which indicates
the message does not expire.

So, when RMQMessage#setJMSPropertiesFromAmqpProperties is called, it does not fill the JMSExpiration since message expiration is null. Thus, later invocation of getJMSExpiration produces java.lang.NumberFormatException: Null is not a valid long.

@michaelklishin michaelklishin changed the title JMSExpiration property is not filled according to JMS specification JMSExpiration should be zero for non-expiring messages Jun 14, 2019
@michaelklishin
Copy link
Member

You are welcome to contribute a PR.

acogoluegnes added a commit that referenced this issue Jun 18, 2019
This would break only for AMQP messages converted in to JMS messages.

Fixes #112
acogoluegnes added a commit that referenced this issue Jun 18, 2019
This would break only for AMQP messages converted in to JMS messages.

Fixes #112

(cherry picked from commit 5725e0b)
acogoluegnes added a commit that referenced this issue Jun 18, 2019
@acogoluegnes acogoluegnes added this to the 1.11.3 milestone Jun 18, 2019
@acogoluegnes acogoluegnes self-assigned this Jun 18, 2019
@acogoluegnes acogoluegnes modified the milestones: 1.11.3, 1.12.0 Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants