gaohoward commented on a change in pull request #2846: ARTEMIS-2500 CoreMessage
doesn't make a ful copy of its props
URL: https://github.com/apache/activemq-artemis/pull/2846#discussion_r327118652
##########
File path:
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
##########
@@ -461,7 +461,7 @@ public void copyHeadersAndProperties(final Message msg) {
priority = msg.getPriority();
if (msg instanceof CoreMessage) {
- properties = ((CoreMessage) msg).getProperties();
+ properties = new TypedProperties(((CoreMessage) msg).getProperties());
Review comment:
@franz1981 @michaelandrepearce guys,
Currently this method is used to make a copy of a large message.
(LargeServerMessageImpl.copy(long). And it is used in Queue to send a message
into DLA (or Expiry i think). So it's not used alone. It is used as part of
copy and the buffer is not shared.
This creates problem when a large message for a topic (i.e. multicast) and
multiple references of the same message is being sent to DLA concurrently.
During the "send to DLA" action it will clean up certain internal properties of
the copied message (i.e. _AMQ_ROUTE_TO etc) during reroute to DLA. However if
the DLA is clustered, some of the copied messages may be routed to remote DLA,
in which case an internal property (_AMQ_ROUTE_TOsf....) will be added to the
message. You can see one is adding and one is removing. If the sequence happens
at the right order and right moment, the messages routed to remote DLA will get
their internal property removed and cause problem when the bridge forwards
these messages to remote queue. See ClusterConnectionBridge.beforeForward()
method. It would throw "no queueIDs defined" exception. If that happens the
bridge will be removed from the queue's consumer list as bad consumers and the
store and forward queue will have messages accumulated and never get forwarded.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services