You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Jakub Scholz <ja...@scholz.cz> on 2015/10/22 16:44:32 UTC

Receiver is not closed until txn session is closed in Qpid-JMS 0.7.0

Hi,

Some of my tests which are using the Qpid JMS library started failing
with 0.7.0 snapshots. It looks like the main reason is that when a receiver
which was created on top of transacted session is closed using the close()
method, the Detach is not sent immediately but only when the underlying
session is closed. The version 0.6.0 didn't behave this way.

I was wondering ... is this a known issue related to one of the "in
progress" JIRAs related to transactions? Or should I enter a new JIRA? (I
assume this is not the intended behavior)

Thanks & Regards
JAkub

Re: Receiver is not closed until txn session is closed in Qpid-JMS 0.7.0

Posted by Jakub Scholz <ja...@scholz.cz>.
Great, all seems to work as before now.

Thanks for the fix.

Regards
Jakub

On Fri, Oct 23, 2015 at 6:03 PM, Timothy Bish <ta...@gmail.com> wrote:

> Tracked down the reason for the change and added a fix and some tests to
> master, should be sorted now if you want to test it out again.
>
> On 10/23/2015 09:57 AM, Jakub Scholz wrote:
> > I prepared a simple test:
> > https://gist.github.com/scholzj/45dfc385a06c7ac971a8
> >
> > You should be able to copy it to the qpid-jms-interop-tests and run
> against
> > the ActiveMQ broker. It is passing in 0.6.0 and failing in master
> (0.7.0).
> >
> > Basically, in 0.7.0 the receiver2.close() doesn't close the reciever. As
> a
> > result it aquires again the message which cannot be received by
> receiver3.
> > In 0.6.0, the receiver2.close() really closed the receiver and as a
> result
> > it can be read by receiver3.
> >
> > Thanks
> > JAkub
> >
> > On Thu, Oct 22, 2015 at 5:15 PM, Timothy Bish <ta...@gmail.com>
> wrote:
> >
> >> On 10/22/2015 11:14 AM, Jakub Scholz wrote:
> >>> On Thu, Oct 22, 2015 at 4:59 PM, Timothy Bish <ta...@gmail.com>
> >> wrote:
> >>>> If the receiver had transactional
> >>>> work then it would remain open until the session closed, otherwise if
> >>>> should close down immediately.
> >>>>
> >>> Ah, ok. In my case, the receiver received some messages, but the
> >>> transaction was rolled back. There should be no outstanding messages
> >> which
> >>> were received in my code using the receive() method or using a
> listener.
> >>>
> >>> So it sounds like it works as it should, only differently compared to
> >> 0.6.0.
> >>> Thanks & Regards
> >>> Jakub
> >>>
> >> If you want to write a small test case I would be happy to validate that
> >> it is working as intended, things are in flux in the TX bits right now
> >> so good to check that nothing gets broken.
> >>
> >> --
> >> Tim Bish
> >> Sr Software Engineer | RedHat Inc.
> >> tim.bish@redhat.com | www.redhat.com
> >> twitter: @tabish121
> >> blog: http://timbish.blogspot.com/
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> >> For additional commands, e-mail: dev-help@qpid.apache.org
> >>
> >>
>
>
> --
> Tim Bish
> Sr Software Engineer | RedHat Inc.
> tim.bish@redhat.com | www.redhat.com
> twitter: @tabish121
> blog: http://timbish.blogspot.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> For additional commands, e-mail: dev-help@qpid.apache.org
>
>

Re: Receiver is not closed until txn session is closed in Qpid-JMS 0.7.0

Posted by Timothy Bish <ta...@gmail.com>.
Tracked down the reason for the change and added a fix and some tests to
master, should be sorted now if you want to test it out again. 

On 10/23/2015 09:57 AM, Jakub Scholz wrote:
> I prepared a simple test:
> https://gist.github.com/scholzj/45dfc385a06c7ac971a8
>
> You should be able to copy it to the qpid-jms-interop-tests and run against
> the ActiveMQ broker. It is passing in 0.6.0 and failing in master (0.7.0).
>
> Basically, in 0.7.0 the receiver2.close() doesn't close the reciever. As a
> result it aquires again the message which cannot be received by receiver3.
> In 0.6.0, the receiver2.close() really closed the receiver and as a result
> it can be read by receiver3.
>
> Thanks
> JAkub
>
> On Thu, Oct 22, 2015 at 5:15 PM, Timothy Bish <ta...@gmail.com> wrote:
>
>> On 10/22/2015 11:14 AM, Jakub Scholz wrote:
>>> On Thu, Oct 22, 2015 at 4:59 PM, Timothy Bish <ta...@gmail.com>
>> wrote:
>>>> If the receiver had transactional
>>>> work then it would remain open until the session closed, otherwise if
>>>> should close down immediately.
>>>>
>>> Ah, ok. In my case, the receiver received some messages, but the
>>> transaction was rolled back. There should be no outstanding messages
>> which
>>> were received in my code using the receive() method or using a listener.
>>>
>>> So it sounds like it works as it should, only differently compared to
>> 0.6.0.
>>> Thanks & Regards
>>> Jakub
>>>
>> If you want to write a small test case I would be happy to validate that
>> it is working as intended, things are in flux in the TX bits right now
>> so good to check that nothing gets broken.
>>
>> --
>> Tim Bish
>> Sr Software Engineer | RedHat Inc.
>> tim.bish@redhat.com | www.redhat.com
>> twitter: @tabish121
>> blog: http://timbish.blogspot.com/
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>> For additional commands, e-mail: dev-help@qpid.apache.org
>>
>>


-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.redhat.com 
twitter: @tabish121
blog: http://timbish.blogspot.com/


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


Re: Receiver is not closed until txn session is closed in Qpid-JMS 0.7.0

Posted by Timothy Bish <ta...@gmail.com>.
Great, thanks for that.  I will take a look today and see what might be
going on. 

On 10/23/2015 09:57 AM, Jakub Scholz wrote:
> I prepared a simple test:
> https://gist.github.com/scholzj/45dfc385a06c7ac971a8
>
> You should be able to copy it to the qpid-jms-interop-tests and run against
> the ActiveMQ broker. It is passing in 0.6.0 and failing in master (0.7.0).
>
> Basically, in 0.7.0 the receiver2.close() doesn't close the reciever. As a
> result it aquires again the message which cannot be received by receiver3.
> In 0.6.0, the receiver2.close() really closed the receiver and as a result
> it can be read by receiver3.
>
> Thanks
> JAkub
>
> On Thu, Oct 22, 2015 at 5:15 PM, Timothy Bish <ta...@gmail.com> wrote:
>
>> On 10/22/2015 11:14 AM, Jakub Scholz wrote:
>>> On Thu, Oct 22, 2015 at 4:59 PM, Timothy Bish <ta...@gmail.com>
>> wrote:
>>>> If the receiver had transactional
>>>> work then it would remain open until the session closed, otherwise if
>>>> should close down immediately.
>>>>
>>> Ah, ok. In my case, the receiver received some messages, but the
>>> transaction was rolled back. There should be no outstanding messages
>> which
>>> were received in my code using the receive() method or using a listener.
>>>
>>> So it sounds like it works as it should, only differently compared to
>> 0.6.0.
>>> Thanks & Regards
>>> Jakub
>>>
>> If you want to write a small test case I would be happy to validate that
>> it is working as intended, things are in flux in the TX bits right now
>> so good to check that nothing gets broken.
>>
>> --
>> Tim Bish
>> Sr Software Engineer | RedHat Inc.
>> tim.bish@redhat.com | www.redhat.com
>> twitter: @tabish121
>> blog: http://timbish.blogspot.com/
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>> For additional commands, e-mail: dev-help@qpid.apache.org
>>
>>


-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.redhat.com 
twitter: @tabish121
blog: http://timbish.blogspot.com/


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


Re: Receiver is not closed until txn session is closed in Qpid-JMS 0.7.0

Posted by Jakub Scholz <ja...@scholz.cz>.
I prepared a simple test:
https://gist.github.com/scholzj/45dfc385a06c7ac971a8

You should be able to copy it to the qpid-jms-interop-tests and run against
the ActiveMQ broker. It is passing in 0.6.0 and failing in master (0.7.0).

Basically, in 0.7.0 the receiver2.close() doesn't close the reciever. As a
result it aquires again the message which cannot be received by receiver3.
In 0.6.0, the receiver2.close() really closed the receiver and as a result
it can be read by receiver3.

Thanks
JAkub

On Thu, Oct 22, 2015 at 5:15 PM, Timothy Bish <ta...@gmail.com> wrote:

> On 10/22/2015 11:14 AM, Jakub Scholz wrote:
> > On Thu, Oct 22, 2015 at 4:59 PM, Timothy Bish <ta...@gmail.com>
> wrote:
> >
> >> If the receiver had transactional
> >> work then it would remain open until the session closed, otherwise if
> >> should close down immediately.
> >>
> > Ah, ok. In my case, the receiver received some messages, but the
> > transaction was rolled back. There should be no outstanding messages
> which
> > were received in my code using the receive() method or using a listener.
> >
> > So it sounds like it works as it should, only differently compared to
> 0.6.0.
> >
> > Thanks & Regards
> > Jakub
> >
> If you want to write a small test case I would be happy to validate that
> it is working as intended, things are in flux in the TX bits right now
> so good to check that nothing gets broken.
>
> --
> Tim Bish
> Sr Software Engineer | RedHat Inc.
> tim.bish@redhat.com | www.redhat.com
> twitter: @tabish121
> blog: http://timbish.blogspot.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> For additional commands, e-mail: dev-help@qpid.apache.org
>
>

Re: Receiver is not closed until txn session is closed in Qpid-JMS 0.7.0

Posted by Timothy Bish <ta...@gmail.com>.
On 10/22/2015 11:14 AM, Jakub Scholz wrote:
> On Thu, Oct 22, 2015 at 4:59 PM, Timothy Bish <ta...@gmail.com> wrote:
>
>> If the receiver had transactional
>> work then it would remain open until the session closed, otherwise if
>> should close down immediately.
>>
> Ah, ok. In my case, the receiver received some messages, but the
> transaction was rolled back. There should be no outstanding messages which
> were received in my code using the receive() method or using a listener.
>
> So it sounds like it works as it should, only differently compared to 0.6.0.
>
> Thanks & Regards
> Jakub
>
If you want to write a small test case I would be happy to validate that
it is working as intended, things are in flux in the TX bits right now
so good to check that nothing gets broken. 

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.redhat.com 
twitter: @tabish121
blog: http://timbish.blogspot.com/


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


Re: Receiver is not closed until txn session is closed in Qpid-JMS 0.7.0

Posted by Jakub Scholz <ja...@scholz.cz>.
On Thu, Oct 22, 2015 at 4:59 PM, Timothy Bish <ta...@gmail.com> wrote:

> If the receiver had transactional
> work then it would remain open until the session closed, otherwise if
> should close down immediately.
>

Ah, ok. In my case, the receiver received some messages, but the
transaction was rolled back. There should be no outstanding messages which
were received in my code using the receive() method or using a listener.

So it sounds like it works as it should, only differently compared to 0.6.0.

Thanks & Regards
Jakub

Re: Receiver is not closed until txn session is closed in Qpid-JMS 0.7.0

Posted by Timothy Bish <ta...@gmail.com>.
On 10/22/2015 10:44 AM, Jakub Scholz wrote:
> Hi,
>
> Some of my tests which are using the Qpid JMS library started failing
> with 0.7.0 snapshots. It looks like the main reason is that when a receiver
> which was created on top of transacted session is closed using the close()
> method, the Detach is not sent immediately but only when the underlying
> session is closed. The version 0.6.0 didn't behave this way.
>
> I was wondering ... is this a known issue related to one of the "in
> progress" JIRAs related to transactions? Or should I enter a new JIRA? (I
> assume this is not the intended behavior)
>
> Thanks & Regards
> JAkub
>
Could be related to work in progress, you are welcome to open an issue
though so that it can be investigated. If the receiver had transactional
work then it would remain open until the session closed, otherwise if
should close down immediately. 

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.redhat.com 
twitter: @tabish121
blog: http://timbish.blogspot.com/


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