Task stop not being called when connector is stopped

Hi All,

It looks like when stop is called on a Connector, the tasks being managed by that Connector are not actually stopped (the stop() methods of the tasks are never called). I understand that when the Connector is stopped it stops calling the poll() method for its tasks but for tasks which are subscribed to an active sources (e.g. your AMPS connector) - these tasks continue to consume messages from their active sources and eventually run out of memory as their Connector is not draining messages from them. I’ve looked thru the connect code and I can’t see anything which would ever call the stop() method of a task.

Is there a way to actually stop a task cleanly, or can anyone suggest a pattern which would could be used to signal a stop to a task?

The only workaround I can see at the moment is to delete these types of connectors
with active tasks when we want to pause them, and then recreate them when we want to resume them, but this seems overly arduous and not the correct approach.