NO-JIRA Add ability to set message reply-to for in tests

This commit is contained in:
Timothy Bish 2016-10-06 15:51:31 -04:00
parent a2995b7614
commit 1316b57edb
1 changed files with 25 additions and 0 deletions

View File

@ -238,6 +238,31 @@ public class AmqpMessage {
return message.getProperties().getTo(); return message.getProperties().getTo();
} }
/**
* Sets the address which is applied to the AMQP message ReplyTo field in the message properties
*
* @param replyTo
* The address that should be applied in the Message ReplyTo field.
*/
public void setReplyTo(String replyTo) {
checkReadOnly();
lazyCreateProperties();
getWrappedMessage().setReplyTo(replyTo);
}
/**
* Return the set address that was set in the Message ReplyTo field.
*
* @return the set address String form or null if not set.
*/
public String getReplyTo() {
if (message.getProperties() == null) {
return null;
}
return message.getProperties().getReplyTo();
}
/** /**
* Sets the MessageId property on an outbound message using the provided String * Sets the MessageId property on an outbound message using the provided String
* *