You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org> on 2007/11/27 19:11:43 UTC

[jira] Commented: (QPID-621) A message be acknowledged after its message consumer is closed but don't think we allow that.

    [ https://issues.apache.org/jira/browse/QPID-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545945 ] 

Martin Ritchie commented on QPID-621:
-------------------------------------

Committed to M2.1.1 

> A message be acknowledged after its message consumer is closed but don't think we allow that.
> ---------------------------------------------------------------------------------------------
>
>                 Key: QPID-621
>                 URL: https://issues.apache.org/jira/browse/QPID-621
>             Project: Qpid
>          Issue Type: Bug
>    Affects Versions: M2, M2.1, M3
>            Reporter: Martin Ritchie
>            Assignee: Martin Ritchie
>             Fix For: M2.1
>
>         Attachments: QPID-621-tk2.patch, QPID-621.patch
>
>
> When looking up something about acking noticed this in the JMS FAQ:
> Q: Can a message be acknowledged after its message consumer is closed?
> A: Yes. Since message acknowledgment processing is performed at the session level, message acknowledgement is still relevant after a consumer is closed. All messages consumed by the session are acknowledged for the following two examples:
> // CLIENT_ACKNOWLEDGE session
> Message msg1 = topicSubscriber1.receive();
> Message msg2 = topicSubscriber2.receive();
> topicSubscriber1.close();
> msg2.acknowledge();
> // transacted session
> Message msg1 = queueReceiver.receive();
> queueReceiver.close();
> session.commit();
> From our code msg2.acknowledge will call session close which acks on all the consumers.. but the consumer if closed will throw an exception... in the above snippet the consumer will have been removed from the session so I *think* the ack will not be accepted. 
> Especially as the consumer.close() will reject messages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.