You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Martin Chan Shu Ching (JIRA)" <ji...@apache.org> on 2012/07/30 05:21:33 UTC

[jira] [Created] (AMQ-3949) Why ActiveMQMessageConsumer.dispatch copies message per listener

Martin Chan Shu Ching created AMQ-3949:
------------------------------------------

             Summary: Why ActiveMQMessageConsumer.dispatch copies message per listener
                 Key: AMQ-3949
                 URL: https://issues.apache.org/jira/browse/AMQ-3949
             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 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQ-3949) Why ActiveMQMessageConsumer.dispatch copies message per listener

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13430517#comment-13430517 ] 

Timothy Bish commented on AMQ-3949:
-----------------------------------

Its also needed for transacted redelivery or session recover where you want to redeliver the original unaltered message which you can't guarantee if you don't copy it. 
                
> Why ActiveMQMessageConsumer.dispatch copies message per listener
> ----------------------------------------------------------------
>
>                 Key: AMQ-3949
>                 URL: https://issues.apache.org/jira/browse/AMQ-3949
>             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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (AMQ-3949) Why ActiveMQMessageConsumer.dispatch copies message per listener

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish closed AMQ-3949.
-----------------------------

    Resolution: Not A Problem
    
> Why ActiveMQMessageConsumer.dispatch copies message per listener
> ----------------------------------------------------------------
>
>                 Key: AMQ-3949
>                 URL: https://issues.apache.org/jira/browse/AMQ-3949
>             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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQ-3949) Why ActiveMQMessageConsumer.dispatch copies message per listener

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13424788#comment-13424788 ] 

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: https://issues.apache.org/jira/browse/AMQ-3949
>             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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AMQ-3949) Why ActiveMQMessageConsumer.dispatch copies message per listener

Posted by "Martin Chan Shu Ching (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Chan Shu Ching updated AMQ-3949:
---------------------------------------

    Description: 
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);

  was:
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 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);

    
> Why ActiveMQMessageConsumer.dispatch copies message per listener
> ----------------------------------------------------------------
>
>                 Key: AMQ-3949
>                 URL: https://issues.apache.org/jira/browse/AMQ-3949
>             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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira