How can I kill a background thread which was created as part of a Service Task

Hi all,
I have a process flow where Inside a service task, I am creating a thread and is a pub sub, so now whenever I want to suspend, the process and create a new process, the thread which I created belongs to older execution, and that execution has been suspended, but the thread still listens that execution, and within this, I am trying to correlate to a message start event, but since the execution has been suspended/termination, I get Execution Id is null, whenever i try to correlate.

How can I kill the thread when my process/execution has been suspended in Sping boot context?

ParentMqttProcess.bpmn (3.2 KB)

Thanks In Advance