Henning Sudbrock created CAMEL-20754:
----------------------------------------
Summary: Support MQTT5 Publish Properties in Paho-MQTT5 component
Key: CAMEL-20754
URL: https://issues.apache.org/jira/browse/CAMEL-20754
Project: Camel
Issue Type: New Feature
Components: camel-paho-mqtt5
Reporter: Henning Sudbrock
Currently, for publishing MQTT5 messages, the camel-paho-mqtt5 supports setting
the desired topic, QoS, and retained flag. It does not support adding the
additional publish properties that were introduced with MQTT5. Those additional
publish properties include, i.a., content type, response topic, message expiry
interval, and a list of user properties (cf. section 3.3.2.3 in the [MQTT5
spec|https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html]).
These MQTT5-specific properties should be made available as message headers in
camel-paho-mqtt5 (both for extracting them from incoming MQTT5 messages, and
for setting them in outgoing MQTT5 messages).
Technically, the underlying library, Eclipse Paho, supports setting these
properties (cf.
[MqttMessage#setProperties|https://github.com/eclipse/paho.mqtt.java/blob/master/org.eclipse.paho.mqttv5.client/src/main/java/org/eclipse/paho/mqttv5/common/MqttMessage.java#L278]),
but they should be exposed as Camel message headers and, in case of outgoing
messages, be added to the message passed to Eclipse Paho
[here|https://github.com/apache/camel/blob/ba4bf712e66e17fd8c47536e9c45564b6637bb99/components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Producer.java#L50-L52].
--
This message was sent by Atlassian Jira
(v8.20.10#820010)