This improvement concerns multiple aspects of Petals, including the kernel and the CDK, this issue is here to gather all of these together.
Basically, when a component wants to create an exchange based on another one and copies its properties (for example the Gateway does this, but also when the Provides of an SU has forward-message-properties set), there can be problem when copying the properties that are strictly related to the sending operation.
These properties include:
- CDK's send async metadata
- JBI send sync metadata
- Petals flow attribute metadata
All of these should NOT be copied, or at least should not interfere with those of the new exchange created.
The solution chosen is to add to the property name the exchangeId of the exchange: like this, even if the property is copied, the new exchange won't confuse it with its own (that will have its exchangeId added to it).
This will be applied to the 3 aforementioned situations, but this approach should be kept in mind for future properties that are similar.