messageProps.setCorrelationId(origHeader.getCorrelationId().getBytes());
}
final String origReplyTo = origHeader.getReplyTo();
if(origReplyTo != null && !origReplyTo.equals(""))
{
ReplyTo replyTo;
if(origReplyTo.startsWith("/"))
{
replyTo = new ReplyTo("",origReplyTo);
}
else if(origReplyTo.contains("/"))
{
String[] parts = origReplyTo.split("/",2);
replyTo = new ReplyTo(parts[0],parts[1]);
}
else if(vhost.getExchange(origReplyTo) != null)
{
replyTo = new ReplyTo(origReplyTo,"");
}
else
{
replyTo = new ReplyTo("",origReplyTo);
}
messageProps.setReplyTo(replyTo);
}
Map<String, Object> appHeaders =