Skip to content

Commit

Permalink
Fix for Pulsar-JMS library producer.send() method
Browse files Browse the repository at this point in the history
  • Loading branch information
mukesh-ctds committed Aug 12, 2024
1 parent ccf0188 commit 936133c
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,18 @@ private void getProducerAndSend(Destination destination, Message message) throws
for (Map.Entry<String, Object> prop : properties.entrySet()) {
message.setObjectProperty(prop.getKey(), prop.getValue());
}
message.setJMSPriority(priority);
message.setJMSCorrelationIDAsBytes(correlationID);
message.setJMSType(jmsType);
message.setJMSReplyTo(jmsReplyTo);
if (message.getJMSPriority() != Message.DEFAULT_PRIORITY) {
message.setJMSPriority(priority);
}
if (message.getJMSCorrelationIDAsBytes() != null) {
message.setJMSCorrelationIDAsBytes(message.getJMSCorrelationIDAsBytes());
}
if (message.getJMSType() != null) {
message.setJMSType(message.getJMSType());
}
if (message.getJMSReplyTo() != null) {
message.setJMSReplyTo(message.getJMSReplyTo());
}

if (completionListener != null) {
producer.send(destination, message, deliveryMode, priority, timeToLive, completionListener);
Expand Down

0 comments on commit 936133c

Please sign in to comment.