🎄 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.
JCSMP: Disconnect flow consumer from Queue to make possible other to connect
Best Answers
-
Hi @spyroid, well you can just call .close() on the flow (if you're using Java, for instance).
Alternatively, if you don't need to worry about the order of the messages, you could change the queue type to "non-exclusive." This would allow multiple applications to read from the same queue at the same time - which of course means message ordering can't be guaranteed.1 -
Hi @spyroid , you can call session.createFlow() multiple times and each time a new flow receiver with different FlowId will be created. These can be independently started/stopped and closed. With exclusive queue, the first flow receiver receives all the messages until it is closed. Then messages are sent to the next flow receiver and so on. With non-exclusive queue, as @TomF said, messages will be distributed across flow receivers.
1
Answers
-
Hi @spyroid, well you can just call .close() on the flow (if you're using Java, for instance).
Alternatively, if you don't need to worry about the order of the messages, you could change the queue type to "non-exclusive." This would allow multiple applications to read from the same queue at the same time - which of course means message ordering can't be guaranteed.1 -
Hi @spyroid , you can call session.createFlow() multiple times and each time a new flow receiver with different FlowId will be created. These can be independently started/stopped and closed. With exclusive queue, the first flow receiver receives all the messages until it is closed. Then messages are sent to the next flow receiver and so on. With non-exclusive queue, as @TomF said, messages will be distributed across flow receivers.
1