REQUIREMENT engine.qos.publish.priority |
Type | NEW |
Priority | LOW |
Status | CLOSED |
Topic | XmlBlaster supports message priorities |
Des cription |
Using the publish-QoS flag <priority> allows to set the priority of a message. A message with priority 9 has highest priority, 0 is lowest, default is 5. Message with higher priority may overtake such with lower, as the queues highest sorting criterion is priority followed by the timestamp. Keep in mind that only for messages with equal priority the message sequence is guaranteed |
Example XML |
<qos> <!-- publish QoS --> <priority>9<priority/> <!-- Highest priority --> </qos> |
Example Java |
import org.xmlBlaster.util.def.Constants; import org.xmlBlaster.util.MsgUnit; import org.xmlBlaster.client.key.PublishKey; import org.xmlBlaster.client.qos.PublishQos; ... PublishKey pk = new PublishKey(glob, "HelloMsg"); PublishQos pq = new PublishQos(glob); pq.setPriority(PriorityEnum.MAX_PRIORITY); MsgUnit msgUnit = new MsgUnit(pk, senderContent.getBytes(), pq); con.publish(msgUnit); |
Configure |
NOTE: Configuration parameters are specified on command line (-someValue 17) or in the
xmlBlaster.properties file (someValue=17). See requirement "util.property" for details. |
See API | org.xmlBlaster.client.qos.PublishQos |
See API | org.xmlBlaster.util.def.Constants |
This page is generated from the requirement XML file xmlBlaster/doc/requirements/engine.qos.publish.priority.xml