spring-projects / spring-integration

Spring Integration provides an extension of the Spring programming model to support the well-known Enterprise Integration Patterns (EIP)
http://projects.spring.io/spring-integration/
Apache License 2.0
1.54k stars 1.11k forks source link

spring-integration-mqtt: Any plan to integrate with org.eclipse.paho.mqttv5.client #3432

Closed UpCareer closed 3 years ago

UpCareer commented 3 years ago

Expected Behavior

Spring-integration-mqtt supports mqtt protocol version 5. (Currently, it only support mqtt protocol version 3)

Current Behavior

Latest spring-integration-mqtt still support mqtt version 3 by integrating with

<dependency>
<groupId>org.eclipse.paho</groupId>
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
<version>1.2.4</version>
<scope>compile</scope>
</dependency>

We have a project which requires a Spring Boot app integrate with mqttv5 client.

        <dependency>
            <groupId>org.eclipse.paho</groupId>
            <artifactId>org.eclipse.paho.mqttv5.client</artifactId>
            <version>1.2.5</version>
        </dependency>

I would like to check if we have the plan to have new release of spring-integration-mqtt which is able to support mqtt version 5.

How has this issue affected you? our team will develop a springboot app which need to support mqtt version 5. However, the current spring-integration-mqtt dependency only support mqtt version 3. What are you trying to accomplish? We would like to have a new release of spring-integration-mqtt which is able to support mqtt version 5. What other alternatives have you considered? Are you aware of any workarounds? I have two thoughts: 1. Write a full functional mqtt version 5 client, but it need to handle all connect, reconnect, disconnet and other features. 2. Write a simplified spring-integration-mqtt dependency which integrate with org.eclipse.paho.mqttv5.client

I am looking forward to hearing from spring team soon.

Thanks

artembilan commented 3 years ago

Hi @UpCareer !

We have those plans, indeed. See https://github.com/spring-projects/spring-integration/issues/3102.

The long term is indeed to move to Hive library with its reactive support. However with the org.eclipse.paho.mqttv5.client artifact we may consider to extend existing functionality for MQTT v5 sooner than later.

If you have any ideas in mind how to implement the AbstractMqttMessageDrivenChannelAdapter and AbstractMqttMessageHandler for org.eclipse.paho.mqttv5.client, I'd be glad to review your contribution and probably have it merged into the current 5.4.x version rather than wait until the next 5.5 or 6.0 release.

Whisper40 commented 3 years ago

Hello ! Is there news for MqttV5 ? (I need to create groups for multiple pods)

artembilan commented 3 years ago

Hi @Whisper40 !

Thank you for an interest in the feature for this project!

Unfortunately we didn't have a chance to look into this recently.

The contribution is welcome: https://github.com/spring-projects/spring-integration/blob/main/CONTRIBUTING.adoc

Whisper40 commented 3 years ago

@artembilan Hi, sry i'm not a java dev :( This is a really old feature, because mqtt 5 is there for a long time now :)

smpshehan commented 3 years ago

Does Spring boot support MQTT V5 yet or not? I assume not by reading this thread :-(

artembilan commented 3 years ago

We definitely have those plans for next 6.0 version, but since it has got enough community attention, I'm going to investigate it ASAP, so we could implement it and release quickly after we start that version.

artembilan commented 3 years ago

For some correlation: https://github.com/mqtt/mqtt.org/wiki/Differences-between-3.1.1-and-5.0

artembilan commented 3 years ago

FYI: https://github.com/spring-projects/spring-integration/pull/3639

If that goes OK with review, we will have some MQTT v5 support in the upcoming 5.5.5 release in a couple weeks.

Thanks.