reuse correlationId, if avail, when sending

This commit is contained in:
2025-02-20 15:45:29 -05:00
parent 5aef2d4446
commit e593d50bb8

View File

@@ -54,6 +54,7 @@ public class MqPublishDelegate extends AbstractMqDelegate {
* @field mq_payloadMimeType [optional] The MIME type of the body of the MQ message.
* @field mq_replyQueueName [optional] The name of an MQ destination (queue or topic). This tells the processor of the message where to send a reply.
* @field mq_statusQueueName [optional] The name of an MQ destination (queue or topic). This tells the processor of the message where to send status updates.
* @varIn mq_correlationId [optional] The correlationId of the message to send.
* @varOut mq_correlationId The correlationId of the message sent.
* @throws BPMNError timeout The MQ connection timed out connecting or waiting for a message.
* @throws BPMNError network The MQ connection experienced network issues.
@@ -73,6 +74,8 @@ public class MqPublishDelegate extends AbstractMqDelegate {
MqCommunicator communicator = this.getCommunicator(mqExecution.getConnectorIdFromModel());
PreparedMessage<String> message = communicator.createPreparedMessage();
if (mqExecution.getCorrelationId() != null)
message.setCorrelationId(mqExecution.getCorrelationId());
if (mqExecution.getStatusQueueNameFromModel() != null)
message.setProperty("inteligr8.statusQueueName", mqExecution.getStatusQueueNameFromModel());
message.setReplyToQueueName(mqExecution.getReplyQueueNameFromModel());