You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by andi welchlin <an...@gmail.com> on 2018/02/21 21:33:04 UTC
QPID Proton 0.19 connection.close() does not close remote connection
Hello all,
I connected a Proton MessagingHandler (Python3) to a QPID C++ Broker 0.37.
I want to close the handler gracefully but I could not manage to do so.
When I call connection.close() the state is afterwards: LOCAL_UNINIT,
REMOTE_ACTIVE
So it does not close the remote connection (or the broker does not close
it).
When I connect to the broker with qpid-tool, I can see that the client is
still there.
What is the right way to close a MessagingHandler and all its connections?
Kind Regards,
Andreas
Re: QPID Proton 0.19 connection.close() does not close remote
connection
Posted by Gordon Sim <gs...@redhat.com>.
On 22/02/18 07:53, andi welchlin wrote:
> Hello Gordon,
>
> thank you for the hint. This was exactly what I needed.
> Now I call close and in the method on_connection_closed() I stop the
> container.
> The connection is then closed remotely.
>
> Would be nice to reflect this in the Proton examples.
When the container has nothing left to do, e.g. if the last socket
closes and is removed from the loop and there are no timer actions
pending or anything, it will automatically exit. The examples mostly
rely on that.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: QPID Proton 0.19 connection.close() does not close remote connection
Posted by andi welchlin <an...@gmail.com>.
Hello Gordon,
thank you for the hint. This was exactly what I needed.
Now I call close and in the method on_connection_closed() I stop the
container.
The connection is then closed remotely.
Would be nice to reflect this in the Proton examples.
Kind Regards,
Andreas
On Wed, Feb 21, 2018 at 10:36 PM, Gordon Sim <gs...@redhat.com> wrote:
> On 21/02/18 21:33, andi welchlin wrote:
>
>> Hello all,
>>
>> I connected a Proton MessagingHandler (Python3) to a QPID C++ Broker 0.37.
>>
>> I want to close the handler gracefully but I could not manage to do so.
>>
>> When I call connection.close() the state is afterwards: LOCAL_UNINIT,
>> REMOTE_ACTIVE
>>
>> So it does not close the remote connection (or the broker does not close
>> it).
>>
>> When I connect to the broker with qpid-tool, I can see that the client is
>> still there.
>>
>> What is the right way to close a MessagingHandler and all its connections?
>>
>
> That is the right method to call. However it is asynchronous, so the
> connection won't be closed when the method returns. You will get a
> connection_closed event when the remote side echoes the close.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>
Re: QPID Proton 0.19 connection.close() does not close remote
connection
Posted by Gordon Sim <gs...@redhat.com>.
On 21/02/18 21:33, andi welchlin wrote:
> Hello all,
>
> I connected a Proton MessagingHandler (Python3) to a QPID C++ Broker 0.37.
>
> I want to close the handler gracefully but I could not manage to do so.
>
> When I call connection.close() the state is afterwards: LOCAL_UNINIT,
> REMOTE_ACTIVE
>
> So it does not close the remote connection (or the broker does not close
> it).
>
> When I connect to the broker with qpid-tool, I can see that the client is
> still there.
>
> What is the right way to close a MessagingHandler and all its connections?
That is the right method to call. However it is asynchronous, so the
connection won't be closed when the method returns. You will get a
connection_closed event when the remote side echoes the close.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org