GH-3432: Add MQTT v5 channel adapters (#3639)

* GH-3432: Add MQTT v5 channel adapters

Fixes https://github.com/spring-projects/spring-integration/issues/3432

* Add `optional` dependency for `org.eclipse.paho:org.eclipse.paho.mqttv5.client`
* Add `MqttProtocolErrorEvent` and emit it from the `mqttErrorOccurred()` callback of the MQTT v5 client
* Add `MqttHeaderMapper` since MQTT v5 has introduced user properties pair to transfer over the protocol
* Add `Mqttv5PahoMessageHandler` as one more extension of the `AbstractMqttMessageHandler`
* Add more convenient `MqttHeaders` constants for easier headers mapping configuration
* Ensure via `Mqttv5BackToBackTests` that MQTT v5 is supported by the provided components
* Change `pr-build-workflow.yml` to use `eclipse-mosquitto` container for testing all the MQTT interactions
* Change `cyrilix/rabbitmq-mqtt` service to the `rabbitmq:management` since RabbitMQ does not support MQTT v5

* * Handle manual acks
* Add `Mqttv5PahoMessageDrivenChannelAdapter.persistence` property

* * Add documentation
* Add `MosquittoContainerTest` for TestContainers support with Mosquitto image

* Fix language in the docs after review

Co-authored-by: Gary Russell <grussell@vmware.com>

Co-authored-by: Gary Russell <grussell@vmware.com>
This commit is contained in:
Artem Bilan
2021-10-06 11:38:52 -04:00
committed by GitHub
parent b8e414d4f6
commit e7c0d8dafa
15 changed files with 1401 additions and 138 deletions

View File

@@ -12,4 +12,5 @@
<suppress files="[\\/]test[\\/]" checks="Javadoc*"/>
<suppress files="[\\/]test[\\/]" checks="EqualsHashCode"/>
<suppress files="[\\/]test[\\/]" checks="Atclause*"/>
<suppress files="[\\/]test[\\/]" checks="InterfaceIsType"/>
</suppressions>