Cumulocity-IoT / cumulocity-dynamic-mapper

The ultimate Mapper for building the bridge between any Message Broker and Cumulocity IoT in a zero-code approach!
Apache License 2.0
10 stars 9 forks source link

Despite removing it, once you attach a broker with outbound mapping, the operation will still get published. #238

Closed vdiwe closed 1 month ago

vdiwe commented 1 month ago

Despite removing it, once you attach a broker with outbound mapping, the operation will still get published. Below find the steps to reproduce it.

  1. Create an outbound mapping.
  2. Attach the MQTT service broker.
  3. create an operation and it will published to the MQTT service broker—I'm receiving messages only in the MQTT service broker.
  4. Attach another external broker—create an operation and it will published to both the MQTT service broker and the external broker (this is the expected behavior).
  5. Remove the external broker from the outbound mapping, save, and activate it.
  6. If I create an operation, the message is still being published to both brokers (the MQTT service broker and the external broker).

Note - I guess it might be happening with inbound mapping as well, please validate once.

switschel commented 1 month ago

Good catch! Will try to fix it. It should only be sent to existing and active brokers. To fix this we should remove the connector from internal maps when deactivating, removing it (I think this is currently not the case).

switschel commented 1 month ago

Fixed with release v4.5.0