🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
How long does temporary queue last after client disconnects?
Hi.
I would like to use temporary queues to make a client more robust so even if the client disconnects for a short period of time it won't lose any messages thanks to the queue.
It's also desirable that temporary queues are destroyed if the client doesn't reconnect so too old messages don't waste space of the broker.
Unfortunately I'm unable to detect whether temporary queue was destroyed and then recreated after reconnect (and messages were lost) or not.
Can I configure time after which temporary queue is destroyed or detect that queue was recreated when flow reconnected?
Thanks
Answers
-
I found some solution. According to Reapplying Subscriptions on Reconnect
If a client is using a Temporary Queue and disconnects for over a minute, the Temporary Queue will be removed from the event broker, and automatically recreated once the client reconnects. However, the subscription will not be re-applied even if
REAPPLY_SUBSCRIPTIONS
is enabled.my temporary queue won't have any subscriptions if it was recreated.
So I'll initially add dummy subscription immediately after creating a flow. Then after reconnect I can try adding the dummy subscription again and if I get error
SubscriptionAlreadyPresent
then I know for sure that the queue wasn't destroyed.With this solution I could still lose messages because they don't fit into the queue because of small quota.
Wondering whether there's a better solution?
0