Skip to content

Support for fine-grained configuration for each MqttSubscription in Spring Integration. #8850

Closed
@demiphea

Description

@demiphea

Expected Behavior

Be able to configure MqttSubscription with fine granularity in Spring Integration, allowing for the customization of MQTT options (such as qos, noLocal, retainAsPublished, etc) for each individual or multiple topics.

Current Behavior

I'm using org.eclipse.paho.mqttv5.client in Spring Integration, and Mqttv5PahoMessageDrivenChannelAdapter lacks a method to set MqttSubscription other than creating a MqttSubscription with only default parameters(topic and qos) .

MqttSubscription[] subscriptions = IntStream.range(0, topics.length)
.mapToObj(i -> new MqttSubscription(topics[i], requestedQos[i]))
.toArray(MqttSubscription[]::new);

Seems like it's the same in MQTT v3 version, where there is no method provided to configure MqttSubscription.

Context

Due to limitations in my coding skills, I have currently only been able to overwrite Mqttv5PahoMessageDrivenChannelAdapter and modifying the default configuration of MqttSubscription to address this issue.

Thank you for taking the time to review this issue. I appreciate your attention to it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions