activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <>
Subject [jira] [Commented] (AMQ-3949) Why ActiveMQMessageConsumer.dispatch copies message per listener
Date Mon, 30 Jul 2012 10:41:34 GMT


Gary Tully commented on AMQ-3949:

that copy is to protect access to the message content which is unmarshalled on demand without
sync, eg: the message properties.
Also, transformers are per consumer.

If each consumer wants to see a single readonly instance of the message, doing a single unmarshal
in-place of a copy would work, but would require a sync on connection dispatch for the duration.
> Why ActiveMQMessageConsumer.dispatch copies message per listener
> ----------------------------------------------------------------
>                 Key: AMQ-3949
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Improvement
>            Reporter: Martin Chan Shu Ching
>            Priority: Minor
> When the consumer receives a topic message, the message is copied in ActiveMQMessageConsumer.dispatch()
line 1294. If there are 10 consumers, the message will be copied 10 times. Wondering if that's
really necessary to copy the content because we are doing performance tuning in our applications
and found there is high memory usage in the MQ layer.
> line:1294
> ActiveMQMessage message = createActiveMQMessage(md);

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message