Description
Mark Fisher opened INT-576 and commented
IDs are currently created each time a new Message is created - even if that Message is created from another Message (using MessageBuilder.fromMessage(originalMessage)) and even when using the builder.copyHeaders(..) method. Therefore, the ID is too transient to be useful in many potential scenarios.
The Message ID is currently only used for correlation of asynchronous replies, and that works fine. However, in order to support tracking of a Message History, as an example, we should keep the ID constant as much as possible.
The new contract should be:
- every message is guaranteed to have an ID
- anytime you create from a Message or copy all headers from a message, the ID will be preserved
- if modified text (testing) #2 does not apply, a new UUID will be generated
Affects: 1.0 Final, 1.0.1
Issue Links:
-
equals method is missing from GenericMessage [INT-557] #4571 equals method is missing from GenericMessage
-
Message ID changes every time a message is recreated [INT-556] #4570 Message ID changes every time a message is recreated
("supersedes")