I have a method which sends some data to a MQTT broker. This data has to reach 100 and then the method is finished. But I want to be able to interrupt the method, for example, a