On 15/02/17 11:26, Robbie Gemmell wrote:
On 15 February 2017 at 11:06, Jeremy Gooch <[email protected]> wrote:
Hi Gordon,
Many thanks - I thought it would be simple. Did I miss where this is
documented?
It is documented in
http://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/book/overview.html#proton.reactor.Container,
but not in the actual API reference so easy to miss.
With the change you've suggested in place, I notice that the subscription is only durable
when I ctrl-C my script. If it finishes normally then the subscription seems to be
deleted. Presumably this is a feature of Proton. What do I need to do so that my script
can exit elegantly but still leave the subscription in place? Do I need to do something
in the "on_disconnected" method?
J.
You are presumably closing the receiver (in AMQP terms, detaching the
receiving link with 'closed=true') somewhere in your code, an action
which explicitly ends the subscription on the broker. You need to
either detach the receiver without closing it,
which you can do my just calling detach on the receiver
or simply close the
session or connection without doing anything to the receiver which
will implicitly detach it and should leave the subscription in place,
the same as exiting the process without doing any of these does.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]