private String[] getMessageTransferMessageHeaderProps(MessageTransferMessage msg)
{
List<String> list = new ArrayList<String>();
AMQMessageHeader header = msg.getMessageHeader();
MessageProperties msgProps = msg.getHeader().getMessageProperties();
String appID = null;
String userID = null;
if(msgProps != null)
{
appID = msgProps.getAppId() == null ? "null" : new String(msgProps.getAppId());
userID = msgProps.getUserId() == null ? "null" : new String(msgProps.getUserId());
}
list.add("reply-to = " + header.getReplyTo());
list.add("propertyFlags = "); //TODO
list.add("ApplicationID = " + appID);
list.add("ClusterID = "); //TODO
list.add("UserId = " + userID);
list.add("JMSMessageID = " + header.getMessageId());
list.add("JMSCorrelationID = " + header.getCorrelationId());
list.add("JMSDeliveryMode = " + (msg.isPersistent() ? "Persistent" : "Non_Persistent"));
list.add("JMSPriority = " + header.getPriority());
list.add("JMSType = " + header.getType());
final long expirationDate = header.getExpiration();
final long timestampDate = header.getTimestamp();
addStringifiedJMSTimestamoAndJMSExpiration(list, expirationDate, timestampDate);
return list.toArray(new String[list.size()]);
}