🎄 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.
Should the FlowReceiver be closed before recreating a new FlowReceiver?
I am following along with this solace tutorial.
I am now testing and handling this portion of the tutorial where I handle REPLAY_START_TIME_NOT_AVAILABLE: .I have added a System.out.println(consumer.isClosed()); before I recreate a new FlowReceiver to replay from the beginning. This is printing out false.
consumerFlowProperties.setReplayStartLocation(JCSMPFactory.onlyInstance().createReplayStartLocationBeginning());
System.out.println(consumer.isClosed());
consumer = session.createFlow(this, consumerFlowProperties, null, replayFlowEventHandler);
consumer.start();
Should I close this FlowReceiver before instantiating a new FlowReceiver? I am concerned that leaving a FlowReceiver open throughout the lifecycle of the application could be wasting resources of some sort.
Best Answer
-
Hi @SeanTYH,
I think you may have found a bug in the documentation/tutorial. I'll follow up on that to get it resolved, but in the mean time if you are seeing it is still open I would recommend closing it before you open a new one.
thanks,
Marc
0
Answers
-
Hi @SeanTYH,
I think you may have found a bug in the documentation/tutorial. I'll follow up on that to get it resolved, but in the mean time if you are seeing it is still open I would recommend closing it before you open a new one.
thanks,
Marc
0