ASF GitHub Bot commented on ARTEMIS-1803:

Github user cshannon commented on the issue:

    @michaelandrepearce  - because 1) there can be more than just that use case 
for having sessionId part of the reference in the future and 2) the acknowledge 
code is not part of the consumer and is handled later by the QueueImpl...see 
the acknowledge method inside QueueImpl..it just gets the reference and does 
the acking and doesn't know the consumer by that point because the 
ServerConsumer calls ack on the ref but doesn't pass itself to it...there would 
have to be a good amount of refactoring to change this along with changes to 
public interfaces

> 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