ActiveMQ消息特性:消息属性

来源:互联网 发布:mysql 查询名次 编辑:程序博客网 时间:2024/05/09 04:28

消息属性的说明:

  • 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 Nametypedefault valuedescriptionJMSDestinationjavax.jms.Destinationset by the producerDestination used by the producerJMSReplyTojavax.jms.Destinationnulluser definedJMSTypeStringemptyuser definedJMSDeliveryModeintDeliveryMode.PERSISTENTindicator if messages should be persistedJMSPriorityint4value from 0-9JMSMessageIDStringuniqueunique identifier for the messageJMSTimestamplongtime the message was senttime in millisecondsJMSCorrelationIDStringnulluser definedJMSExpirationlong0time in milliseconds to expire the message - 0 means never expireJMSRedeliveredbooleanfalsetrue if the message is being resent to the consumer

JMS定义的属性:

Property Nametypedefault valuedescriptionJMSXDeliveryCountint0number of attempts to send the messageJMSXGroupIDStringnullidentity of the message groupJMSXGroupSeqint0sequence number of the messageJMSXProducerTXIDStringnulltransaction identifier

ActiveMQ 额外定义的:

Property Nametypedefault valuedescriptionJMSActiveMQBrokerInTimelong0消息到达broker的时间戳JMSActiveMQBrokerOutTimelong0消息离开broker的时间戳
原创粉丝点击