turcsanyip commented on code in PR #7352:
URL: https://github.com/apache/nifi/pull/7352#discussion_r1277712005
##########
nifi-nar-bundles/nifi-mqtt-bundle/nifi-mqtt-processors/src/main/java/org/apache/nifi/processors/mqtt/PublishMQTT.java:
##########
@@ -139,11 +202,15 @@ public class PublishMQTT extends AbstractMQTTProcessor {
PROP_SESSION_EXPIRY_INTERVAL,
PROP_CLIENTID,
PROP_TOPIC,
+ PROP_TOPIC_IS_RECORD_PATH,
PROP_RETAIN,
PROP_QOS,
RECORD_READER,
RECORD_WRITER,
MESSAGE_DEMARCATOR,
+ PROP_RESPONSE_TOPIC,
+ PROP_CORRELATION_DATA,
+ PROP_CORRELATION_DATA_IS_RECORD_PATH,
Review Comment:
@nandorsoma Thanks for adding this new feature in the MQTT processors!
The functionality looks good, however the configuration of the new
properties is not really straightforward. E.g. when sending the response to a
request, the response topic (contained in the original request) needs to be set
in `Topic`, not `Response Topic` (`Response Topic` is relevant for request
messages, not responses). Also, the new properties may be confusing in the
"normal" (non request/response) mode, so in most of the cases.
That's why I would suggest to document the request/response scenarios in the
additional details page.
Also, introducing `Messaging Type` (or `Messaging Pattern`) property in
PublishMQTT seems useful for me with the following allowable values:
- **Standalone**: default/current logic (no `Correlation Data` or `Response
Topic` displayed)
- **Request**: sending a request message and expecting a response to it
(`Correlation Data` and `Response Topic` displayed)
- **Response**: sending a response message to a received request
(`Correlation Data` is displayed, but `Response Topic` is not)
The role/origin of `Correlation Data` is a bit different in the last 2
cases. For requests, it is the message sender's responsibility to generate a
unique correlation data. For responses, the message sender has to echo the
received correlation data back. It can be mentioned in the property description
or the additional details page.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]