-
Notifications
You must be signed in to change notification settings - Fork 49
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
Properties set on messages should override those on publisher #26
Comments
I concur; I would expect the hierarchy to be
However, it's tough to make a behavior change like that in a maintenance release. We (Spring) typically handle cases like that with a boolean that retains the previous behavior in the current release and switches to the new behavior in the next release. That avoids breaking existing apps that are leveraging the current behavior. |
We can do it in 2.0 or introduce a swappable strategy for property merging. |
Well, according to the JMS specification, the current behavior is correct, e.g. for
And the Javadoc:
Same thing for expiration and delivery mode. I suggest we keep this behavior as the default one, but provide a flag to switch to the non-compliant but more natural behavior. |
Priority, delivery mode, and expiration aren't taken into account on sending when set in the JMS message. This is compliant with the specifiation though. This commit provide a flag in RMQConnectionFactory to make the RMQMessageProducer use the message properties if set. This is non-compliant with the specification but more natural. The existing and spec-compliant behavior is still the default. Fixes #26
Priority, delivery mode, and expiration aren't taken into account on sending when set in the JMS message. This is compliant with the specifiation though. This commit provide a flag in RMQConnectionFactory to make the RMQMessageProducer use the message properties if set. This is non-compliant with the specification but more natural. The existing and spec-compliant behavior is still the default. Fixes #26
onMessageTimeoutMs: references rabbitmq/rabbitmq-jms-client#5 preferProducerMessageProperty: references rabbitmq/rabbitmq-jms-client#26 requeueOnMessageListenerException: references rabbitmq/rabbitmq-jms-client#23
See this rabbitmq-users thread, originally posted as a question in #25.
Doing it the other way around seems odd. I cannot think of a reason for that.
@acogoluegnes @artembilan @garyrussell perhaps you can?
The text was updated successfully, but these errors were encountered: