long position = startPosition;
for (QueueEntry queueEntry : messages)
{
ServerMessage serverMsg = queueEntry.getMessage();
AMQMessageHeader header = serverMsg.getMessageHeader();
String[] headerAttributes =
{"reply-to = " + header.getReplyTo(),
"propertyFlags = ",
"ApplicationID = " + header.getAppId(),
"ClusterID = ",
"UserId = " + header.getUserId(),
"JMSMessageID = " + header.getMessageId(),
"JMSCorrelationID = " + header.getCorrelationId(),
"JMSDeliveryMode = " + (serverMsg.isPersistent() ? "Persistent" : "Non_Persistent"),
"JMSPriority = " + header.getPriority(),
"JMSType = " + header.getType(),
"JMSExpiration = " + (header.getExpiration() == 0 ? null : FAST_DATE_FORMAT.format(header.getExpiration())),
"JMSTimestamp = " + (header.getTimestamp() == 0 ? null : FAST_DATE_FORMAT.format(header.getTimestamp()))
};
Object[] itemValues = new Object[]{ serverMsg.getMessageNumber(),
headerAttributes,
serverMsg.getSize(),