[ 
https://issues.apache.org/jira/browse/QPID-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750908#action_12750908
 ] 

chenta lee commented on QPID-1766:
----------------------------------

I finally have sometime to look into this problem.

This problem is cause by the way we requeue messages. After enabled selector, 
the position property of  consumer will be varying.
However, after requeue the message, which might caused by message rollback, 
release ... I forgot to update the position property of consumer, so the client 
won't receive any requeued message.

When I try to add code to update the position property, I found out that I have 
to insert code before invoking requeue, e.g. in SemanticState::recover, 
SemanticState::rollback and SemanticState::release. That is not an elegant way.
So I am thinking if we can retrieved the consumer information in Queue::requeue 
then I only need to update the position property at one place, and it is more 
efficient.

But to do that I have to add a share pointer pointed to consumer to the 
structure of QueuedMessage, and update the consumer info when dispatching the 
message. Do you think it is a correct way to solve this problem?

> Implemention of selector using Xquery
> -------------------------------------
>
>                 Key: QPID-1766
>                 URL: https://issues.apache.org/jira/browse/QPID-1766
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker, C++ Client
>         Environment: Linux
>            Reporter: chenta lee
>         Attachments: chenta.diff, Makefile.patch, Makefile.patch, 
> message_selector_pytest.patch, selector.diff, selector.diff, selector.patch, 
> selector.patch, selector_broker.patch, selector_client.patch, 
> selector_client.patch, selector_example.zip
>
>
> I implemented the message selector for C++ broker and client using Xquery.
> I will attach an example later.

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to