ActiveMQ訊息特性:訊息屬性

來源:互聯網
上載者:User
訊息屬性的說明:
  • queue的訊息預設是持久化的
  • 訊息的優先順序預設是4
  • 訊息發送時設定了時間戳記
  • 訊息的到期時間預設是永不到期,到期的訊息進入DLQ,可以配置DLQ及其處理策略
  • 如果訊息時重發的,將會標記出來
  • JMSReplyTo標識響應訊息發送到哪個queue
  • JMSCorelationID標識此訊息相關聯的訊息id,可以用這個標識把多個訊息串連起來
  • JMS同時也記錄了訊息重發的次數,預設是6次
  • 如果有一組關聯的訊息需要處理,可以分組:只需要設定訊息組的名字和這個訊息時第幾個訊息
  • 如果訊息中一個事務環境,則TXID將被設定
  • 此外ActiveMQ在伺服器端額外設定了訊息入列和出列的時間戳記
  • 其實還添加了一個屬性JMSMimeType,值為jms/message
  • ActiveMQ裡訊息屬性的值,不僅可以用基本類型,還可以用List或Map類型(http://activemq.apache.org/structured-message-properties-and-mapmessages.html)
訊息屬性:
Property Name type default value description
JMSDestination javax.jms.Destination set by the producer Destination used by the producer
JMSReplyTo javax.jms.Destination null user defined
JMSType String empty user defined
JMSDeliveryMode int DeliveryMode.PERSISTENT indicator if messages should be persisted
JMSPriority int 4 value from 0-9
JMSMessageID String unique unique identifier for the message
JMSTimestamp long time the message was sent time in milliseconds
JMSCorrelationID String null user defined
JMSExpiration long 0 time in milliseconds to expire the message - 0 means never expire
JMSRedelivered boolean false true if the message is being resent to the consumer
JMS定義的屬性:
Property Name type default value description
JMSXDeliveryCount int 0 number of attempts to send the message
JMSXGroupID String null identity of the message group
JMSXGroupSeq int 0 sequence number of the message
JMSXProducerTXID String null transaction identifier
ActiveMQ 額外定義的:
Property Name type default value description
JMSActiveMQBrokerInTime long 0 訊息到達broker的時間戳記
JMSActiveMQBrokerOutTime long 0 訊息離開broker的時間戳記

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.