[ 
https://issues.apache.org/jira/browse/AMQ-8299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17362914#comment-17362914
 ] 

Christopher L. Shannon commented on AMQ-8299:
---------------------------------------------

If you need ordering then you could send a bytes message and do your own 
serialization of the message body with whatever format you want.

> ActiveMQMapMessage data corruption- should use LinkedHashMap to preserve 
> original order
> ---------------------------------------------------------------------------------------
>
>                 Key: AMQ-8299
>                 URL: https://issues.apache.org/jira/browse/AMQ-8299
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.16.2
>            Reporter: Piotr Klimczak
>            Priority: Major
>
> The core principle of messaging system is that payload sent by producer is 
> received exactly same (unmodified) on consumer side.
> However due to ActiveMQMapMessage using HashMap for map data, the order of 
> entries is not guaranteed effectively causing data corruption.
>  This is especially true when we are sending LinkedHashMap on producer side. 
> Then the consumer side will receive out of order data.
> This is not newly introduced bug, looks like it is there for many years- 
> surprisingly.
> From what I have seen in client implementation, it is perfectly ready to work 
> with LinkedHashMap. So it might be just one line change to fix + test 
> coverage.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to