JMS2.0规范中文版

JMS定义的属性

JMS reserves the 'JMSX' property name prefix for JMS defined properties. The full set of these properties is provided in Table 3-3. This table defines: • The name of the property • The type of the property (integer or string) • Whether support for the property is mandatory or optional. • Whether the property is set by the sending client, by the provider when the message is sent, or by the provider when the message is received. • The purpose of the property

Table 3-3 JMS defined properties Name Type Optional or mandatory Set By Use JMSXUserID String Optional Provider on Send The identity of the user sending the message JMSXAppID String Optional Provider on Send The identity of the application sending the message JMSXDeliveryCount int Mandatory Provider on Receive The number of message delivery attempts. See section 3.5.11 “JMSXDeliveryCount”. JMSXGroupID String Optional Client The identity of the message group this message is part of JMSXGroupSeq int Optional Client The sequence number of this message within the group; the first message is 1, the second 2,... JMSXProducerTXID String Optional Provider on Send The transaction identifier of the transaction within which this message was produced JMSXConsumerTXID String Optional Provider on Receive The transaction identifier of the transaction within which this message was consumed JMSXRcvTimestamp long Optional Provider on Receive The time JMS delivered the message to the consumer JMSXState int Optional Provider Assume there exists a message warehouse that contains a separate copy of each message sent to each consumer and that these copies exist from the time the original message was sent. Each copy’s state is one of: 1(waiting), 2(ready), 3(expired) or 4(retained) Since state is of no interest to producers and consumers it is not provided to either. It is only of relevance to messages looked up in a warehouse and JMS provides no API for this. New JMS defined properties may be added in later versions of JMS. The Enumeration ConnectionMetaData.getJMSXPropertyNames() method returns the names of the JMSX properties supported by a connection. JMSX properties may be referenced in message selectors whether or not they are supported by a connection. If they are not present in a message, they are treated like any other absent property. The effect of setting a message selector on a property which is set by the provider on receive is undefined. The existence, in a particular message, of optional JMS defined properties that are set by a JMS Provider depends on how a particular provider controls use of the property. It may choose to include them in some messages and omit them in others depending on administrative or other criteria. JMSX properties ‘set by provider on send’ are available to both the producer and the consumers of the message. JSMX properties set by the provider on receive are only available to the consumers. JMSXGroupID and JMSXGroupSeq are standard properties clients should use if they want to group messages. All providers must support them. The case of these JMSX property names must be as defined in the table above. Unless specifically noted, the values and semantics of the JMSX properties are undefined.

新的JMS定义的属性可能会在以后的版本中的JMS加入。 枚举ConnectionMetaData.getJMSXPropertyNames()方法返回一个连接所支持的JMSX属性的名称。 JMSX属性可能在消息选择引用不论他们是由一个连接的支持。如果它们不存在于一个消息,他们像对待其他任何缺席的财产。在其上通过在接收的提供者设置一个属性设置消息选择器的作用是不确定的。 的存在,一个特定的消息中,可选的JMS是由一个JMS提供者设置定义的属性依赖于一个特定的供应商控制如何使用该物业。它可能会选择将它们包括在一些消息并忽略他们在其他人根据行政或其他标准。 JMSX性质“由供应商对发送设置'可兼顾生产者和消息的消费者。只提供给消费者JSMX性质由提供者在收到设置。 JMSXGroupID和了JMSXGroupSeq是标准属性的客户端应该使用,如果他们想组消息。所有供应商必须支持他们。 这些JMSX属性名称的情况下,必须在以上表格来定义。 除非特别说明,本JMSX属性值和语义是不确定的。