From 171545ab298cfe7014eeaf8c678c5d5165523d31 Mon Sep 17 00:00:00 2001 From: mukesh-ctds <151806568+mukesh-ctds@users.noreply.github.com> Date: Wed, 14 Aug 2024 11:06:30 +0530 Subject: [PATCH] Update pulsar-jms/src/main/java/com/datastax/oss/pulsar/jms/PulsarJMSProducer.java Co-authored-by: Andrey Yegorov <8622884+dlg99@users.noreply.github.com> --- .../datastax/oss/pulsar/jms/PulsarJMSProducer.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pulsar-jms/src/main/java/com/datastax/oss/pulsar/jms/PulsarJMSProducer.java b/pulsar-jms/src/main/java/com/datastax/oss/pulsar/jms/PulsarJMSProducer.java index 702f11eb..dff5e97b 100644 --- a/pulsar-jms/src/main/java/com/datastax/oss/pulsar/jms/PulsarJMSProducer.java +++ b/pulsar-jms/src/main/java/com/datastax/oss/pulsar/jms/PulsarJMSProducer.java @@ -194,14 +194,14 @@ private void getProducerAndSend(Destination destination, Message message) throws if (message.getJMSPriority() != Message.DEFAULT_PRIORITY) { message.setJMSPriority(priority); } - if (message.getJMSCorrelationIDAsBytes() != null) { - message.setJMSCorrelationIDAsBytes(message.getJMSCorrelationIDAsBytes()); + if (message.getJMSCorrelationIDAsBytes() == null || correlationID != null) { + message.setJMSCorrelationIDAsBytes(correlationID); } - if (message.getJMSType() != null) { - message.setJMSType(message.getJMSType()); + if (message.getJMSType() == null || jmsType != null) { + message.setJMSType(jmsType); } - if (message.getJMSReplyTo() != null) { - message.setJMSReplyTo(message.getJMSReplyTo()); + if (message.getJMSReplyTo() == null || jmsReplyTo != null) { + message.setJMSReplyTo(jmsReplyTo); } if (completionListener != null) {