You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Aleš Trček <Al...@halcom.si> on 2013/08/20 00:28:45 UTC

Qpid C++ broker & JMS rollback not working properly

Hi all,

I have a rather nasty problem I can't seem to be able to solve, using the following setup:
-qpidc-0.22 broker
-qpid JMS client (different versions tried)

I create a transacted session and consume messages from the queue. When I call commit(), the message on the broker gets commited all right. When I call rollback(), the message is not taken from the queue, but it isn't rolled back properly, since the same consumer (within the same session) gets the *next* message when calling receive(), instead of the *same one* (maxprefetch=1). The 'skipped' messages then stay in the queue and can never be retreived again, until the session & connection are reset. I used a simple (15 line) test program with only 1 input queue to eliminate all other possible reasons. The session is created like this:
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
which should be correct. I'm sure the messages are not the same, since I'm checking id with getJMSMessageID().

This used to work OK before I started working with qpid 0.22 on a new server, so I tried the same sample program on the old dev machine with qpidc-0.18, and sure enough, it works as expected there (taking the same message over and over again, until commited). Differences between the brokers are:
working:             qpidc-0.18; CentOS 6.3
not working:     qpidc-0.22; RHEL 6.3
As mentioned, the client program is the same, only the URL of the broker and queue name are different for these cases. Queues are created with options:
qpid-config add queue q1 --durable --argument=qpid.priorities=10. The broker is started with minimal configuration (qpidd --daemon --auth no) in both cases.

Is there something broken/changed in qpidc 0.22 or am I missing something?


Regards,
Ales

RE: Qpid C++ broker & JMS rollback not working properly

Posted by Aleš Trček <Al...@halcom.si>.
You're too fast for me :) (have seen your mail, but had meetings & stuff). Anyway, this was obviously the problem, since sure enough, with non-priority queues it worked, I just didn't try it before...
So, I applied the patch, rebuilt the broker and now it works again. Thank you very much for the swift solution.

Regards,
Ales

-----Original Message-----
From: Gordon Sim [mailto:gsim@redhat.com] 
Sent: Tuesday, August 20, 2013 2:20 PM
To: users@qpid.apache.org
Subject: Re: Qpid C++ broker & JMS rollback not working properly

On 08/20/2013 11:57 AM, Gordon Sim wrote:
> On 08/19/2013 11:28 PM, Aleš Trček wrote:
>> Is there something broken/changed in qpidc 0.22 or am I missing 
>> something?
>
> There were some major changes to qpidd between 0.18 and 0.22 and I can 
> see a bug that I think might be at the root of this. Can you send me 
> your reproducer or attach it to 
> https://issues.apache.org/jira/browse/QPID-5085, just to make sure I'm 
> seeing the same thing as you?

Alternatively (or as well as) you could try patching your broker with the change[1] I've just committed (which I think should fix the issue). 
I've verified that it works against 0.22 also.

[1]
https://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/PriorityQueue.cpp?r1=1515793&r2=1515792&pathrev=1515793&view=patch


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Qpid C++ broker & JMS rollback not working properly

Posted by Gordon Sim <gs...@redhat.com>.
On 08/20/2013 11:57 AM, Gordon Sim wrote:
> On 08/19/2013 11:28 PM, Aleš Trček wrote:
>> Is there something broken/changed in qpidc 0.22 or am I missing
>> something?
>
> There were some major changes to qpidd between 0.18 and 0.22 and I can
> see a bug that I think might be at the root of this. Can you send me
> your reproducer or attach it to
> https://issues.apache.org/jira/browse/QPID-5085, just to make sure I'm
> seeing the same thing as you?

Alternatively (or as well as) you could try patching your broker with 
the change[1] I've just committed (which I think should fix the issue). 
I've verified that it works against 0.22 also.

[1] 
https://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/PriorityQueue.cpp?r1=1515793&r2=1515792&pathrev=1515793&view=patch


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Qpid C++ broker & JMS rollback not working properly

Posted by Gordon Sim <gs...@redhat.com>.
On 08/19/2013 11:28 PM, Aleš Trček wrote:
> Hi all,
>
> I have a rather nasty problem I can't seem to be able to solve, using the following setup:
> -qpidc-0.22 broker
> -qpid JMS client (different versions tried)
>
> I create a transacted session and consume messages from the queue. When I call commit(), the message on the broker gets commited all right. When I call rollback(), the message is not taken from the queue, but it isn't rolled back properly, since the same consumer (within the same session) gets the *next* message when calling receive(), instead of the *same one* (maxprefetch=1). The 'skipped' messages then stay in the queue and can never be retreived again, until the session & connection are reset. I used a simple (15 line) test program with only 1 input queue to eliminate all other possible reasons. The session is created like this:
> Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
> which should be correct. I'm sure the messages are not the same, since I'm checking id with getJMSMessageID().
>
> This used to work OK before I started working with qpid 0.22 on a new server, so I tried the same sample program on the old dev machine with qpidc-0.18, and sure enough, it works as expected there (taking the same message over and over again, until commited). Differences between the brokers are:
> working:             qpidc-0.18; CentOS 6.3
> not working:     qpidc-0.22; RHEL 6.3
> As mentioned, the client program is the same, only the URL of the broker and queue name are different for these cases. Queues are created with options:
> qpid-config add queue q1 --durable --argument=qpid.priorities=10. The broker is started with minimal configuration (qpidd --daemon --auth no) in both cases.
>
> Is there something broken/changed in qpidc 0.22 or am I missing something?

There were some major changes to qpidd between 0.18 and 0.22 and I can 
see a bug that I think might be at the root of this. Can you send me 
your reproducer or attach it to 
https://issues.apache.org/jira/browse/QPID-5085, just to make sure I'm 
seeing the same thing as you?




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org