JMS 消息被接收後是否可以修改

摘自 JMS2.0 規範 3.10. Changing the value of a received message

A consumer can modify a received message after calling either the clearBody or clearProperties method to make the body or properties writable. If the consumer modifies a received message, and the message is subsequently redelivered, the redelivered message must be the original, unmodified message (except for headers and properties modified by the JMS provider as a result of the redelivery, such as the JMSRedelivered header and the JMSXDeliveryCount property).

 

在調用clearBody 或者 clearProperties方法之後使得消息體和消息屬性變成可寫後,消息消費者可以修改一個已經接收到的消息.如果修改後的消息緊接着需要被重新發送,則即將重新發送的消息必須是原始的we未被修改的消息(但因重新發送而需要被JMS提供者修改的消息頭信息和屬性除外,比如JMSRedelivered 頭信息 和 JMSXDeliveryCount屬性就可以修改).

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章