MsgUnit[] sentArr = new MsgUnit[numPub];
PublishReturnQos[] sentQos = new PublishReturnQos[numPub];
for(int i=0; i<numPub; i++) {
PublishKey pk = new PublishKey(globPub, oid, "text/xml", "1.0");
pk.setClientTags("<org.xmlBlaster><demo/></org.xmlBlaster>");
PublishQos pq = new PublishQos(globPub);
pq.setPriority(PriorityEnum.NORM_PRIORITY);
pq.setPersistent(false);
pq.setLifeTime(60000L);
if (i == 0) {
TopicProperty topicProperty = new TopicProperty(globPub);
topicProperty.setDestroyDelay(60000L);
topicProperty.setCreateDomEntry(true);
topicProperty.setReadonly(false);
topicProperty.getHistoryQueueProperty().setMaxEntries(numPub+5);
pq.setTopicProperty(topicProperty);
log.info("Added TopicProperty on first publish: " + topicProperty.toXml());
}
byte[] content = "Hello".getBytes();
MsgUnit msgUnit = new MsgUnit(pk, content, pq);