Skip to content

Commit

Permalink
fix: multiple mqtt as the same
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasBousselin committed Jul 12, 2024
1 parent d207be0 commit d53f460
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import org.eclipse.paho.mqttv5.client.MqttConnectionOptions
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Service
import java.util.*
import org.eclipse.paho.client.mqttv3.MqttException as MqttExceptionV3
import org.eclipse.paho.mqttv5.common.MqttException as MqttExceptionV5

Expand Down Expand Up @@ -49,7 +50,7 @@ class MqttNotificationService(
message = MqttNotificationData.MqttMessage(notification, headers),
connection = MqttConnectionData(
brokerUrl = brokerUrl,
clientId = clientId,
clientId = "${clientId}_${UUID.randomUUID()}",
username = username,
password = password
)
Expand Down

0 comments on commit d53f460

Please sign in to comment.