Slow subscriber causing solace spool quota blow up

Hi @Rajesh, it’s good news you are thinking about disposing of your objects properly.

However, there’s still some confusion here. If you are using a flow that means you are either creating a temporary queue, or connecting (binding) to an existing queue. I don’t know how your subscription is being called but I suspect it is being called with this flow’s endpoint as an argument. This endpoint would then persist messages flowing on this topic, which explains why your persistent spool is filling up.

If you call session.dispose() the session will be closed, perhaps you could call session.disconnect() first. If you do this you will get errors from your other threads when they try to access the session, but since these other threads appear to be locked, this probably isn’t a concern.

So, I think the approach should be:

  1. Try session.disconnect() and dispose() from your main thread to ensure the session is disconnected properly as a trial to see if it resolves the problem;
  2. Review your use of flow. I don’t think you need any flows at all. Have you seen the SolaceSamples .Net TopicSubscriber? If you have a look at that, you can see you create a private void to receive the messages and pass that to createSession(). Then you subscribe() on the session. Messages start flowing in to the private void - there are no flow objects anywhere.