Skip to content

Commit

Permalink
Add fallback to parentProps messageId
Browse files Browse the repository at this point in the history
  • Loading branch information
John Kelly committed Apr 6, 2015
1 parent 0154fea commit 2cf5ea5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,13 @@ protected AMQP.BasicProperties getProperties() {
AMQP.BasicProperties parentProps = super.getProperties();

int deliveryMode = getPersistent() ? 2 : 1;
String messageId = getMessageId().isEmpty() ? parentProps.getMessageId() : getMessageId();

AMQP.BasicProperties publishProperties =
new AMQP.BasicProperties(parentProps.getContentType(), parentProps.getContentEncoding(),
parentProps.getHeaders(), deliveryMode, parentProps.getPriority(),
getCorrelationId(), getReplyToQueue(), parentProps.getExpiration(),
getMessageId(), parentProps.getTimestamp(), getMessageType(),
messageId, parentProps.getTimestamp(), getMessageType(),
parentProps.getUserId(), parentProps.getAppId(), parentProps.getClusterId());

return publishProperties;
Expand Down

0 comments on commit 2cf5ea5

Please sign in to comment.