ASF GitHub Bot commented on ARTEMIS-1803:

Github user cshannon commented on the issue:

    I understand wanting to keep memory low but there's a point where you take 
things too far.  At some point usability and correctness is more important.  
Having just a consumerId is just not correct, end of story.  It is not a unique 
value and will be duplicated. The client library is responsible for creating 
that consumerId per session so there's no way to go back and make the 
consumerId unique (can't change old client libraries).  I wish there were, that 
would solve this problem.
    I do not agree that refactoring is the best approach.  At the end of the 
day if we can't add a reference to a String I think we are taking trying to 
limit memory usage too far.

> MessageReference should include sessionId
> -----------------------------------------
>                 Key: ARTEMIS-1803
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1803
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>    Affects Versions: 2.5.0
>            Reporter: Christopher L. Shannon
>            Assignee: Christopher L. Shannon
>            Priority: Minor
> Right now a MessageReference will track a consumerId (in certain scenarios) 
> but the sessionId is not included.  This is a problem because consumerIds are 
> not unique and are duplicated across sessions.  In order to find a unique 
> consumer you need the sessionId and consumerId as well. 
> A use case for when this is important is when writing custom plugins.  Some 
> of the callbacks pass a message reference and it would be good to be able to 
> figure out which consumer the reference belonged to such as in the 
> messageAcknowledged callback.

This message was sent by Atlassian JIRA

Reply via email to