Update mqtt.go

remove mandatory "-producer" to clientId

Signed-off-by: mandarj123 <mandar.jogalekar@capgemini.com>
This commit is contained in:
mandarj123 2022-09-21 16:53:53 +05:30 committed by GitHub
parent 388d2bce2e
commit 7ea805a83e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ func (m *mqttPubSub) Init(metadata pubsub.Metadata) error {
m.ctx, m.cancel = context.WithCancel(context.Background())
// mqtt broker allows only one connection at a given time from a clientID.
producerClientID := fmt.Sprintf("%s-producer", m.metadata.clientID)
producerClientID := m.metadata.clientID
connCtx, connCancel := context.WithTimeout(m.ctx, defaultWait)
p, err := m.connect(connCtx, producerClientID)
connCancel()