Skip to content

MQTT Configuration builder is not setting the Client Id #3

@samubura

Description

@samubura

https://github.com/wldt/mqtt-digital-adapter-java/blob/a3e06bd8255641391f8914bebff53b6c8f564601/src/main/java/it/wldt/adapter/mqtt/digital/MqttDigitalAdapterConfigurationBuilder.java#L51C1-L55C6

The method is accepting a clientId as parameter but it is not setting it on the MQTT adapter, this means that the client is ignored.

Also the generation of the ClientID is done with

"wldt.mqtt.digital.adapter.client."+new Random(System.currentTimeMillis()).nextInt()

Which apparently is creating issues and potential clashes when a lot of DTs on the same process are launched at the same time.

Maybe we should simply make the clientID mandatory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions