On 08/05/2019 8:18 pm, Michael Ivanov wrote:
I hope this is the right place to ask about qpid jms.
I use qpid jms client 0.41.0 with qpidd broker 1.38.
I'm creating created a fanout exchange (qpid-config add exchange fan ABC)
and subscribe to it from java client using Topic and a MessageConsumer.
On server side a queue is created for each client with name like
"ID:84f6157f-8da4-42b4-a62a-dcc789f05806:1_qpid-jms:receiver:ID:71243772-61c8-4efc-9e85-eaca07de97e2:1:1:1:ABC"
which is not temporary (no autDel flag set).
If client crashes this queue remains on server side and is still filled
with messages.
How can we make the queue on server side temporary and deleted as soon as
client terminates?
This is an issue with the broker. At present it is not setting the queue
to be auto-delete if the sender settlement mode is unsettled. Given the
source defines durable=NONE and expiryPolicy=LINK_DETACH that seems
wrong as those values indicate that the receiver never expects to resume
the subscription if disconnected. (I *think* the motivation was matching
the behaviour of qpid::messaging and qpidd over amqp 0-10 when switching
to 1.0 but it was a long time ago(!) so I can't be sure).
However you can work around it by creating a 'topic' matching the
exchange name with the appropriate policy set on it.
E.g. qpid-config add topic ABC --argument exchange=ABC --argument
qpid.lifetime-policy=delete-if-unused
If the exchange is durable and you want the topic to be also, you can
add --argument durable=true.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]