Skip to content

The MQTT protocol doesn't allow an empty topic value nor for publisihng neither for subscribing #8720

Closed
@qq2429979710

Description

@qq2429979710

In what version(s) of Spring Integration are you seeing this issue?

For example:

6.0.7

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

AbstractMqttMessageDrivenChannelAdapter#initTopics
The initTopics method of the AbstractMqttMessageDrivenChannelAdapter class does not check if the topic is an empty string

if empty string

MqttPahoMessageDrivenChannelAdapter#subscribe
The subscription part in the subscribe method in the MqttPahoMessageDrivenChannelAdapter class will report an error
IMqttToken subscribeToken = this.client.subscribe(topics, requestedQos, listeners);

Expected behavior

A verification mechanism should be added

Sample

IMqttToken subscribeToken = this.client.subscribe(topics, requestedQos, listeners);
Will report an error

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions