Announcement Announcement Module
Collapse
No announcement yet.
How to set message expiration? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to set message expiration?

    Hi,

    I'm trying to configure message expiration on jboss mq. I'm sending a jboss jms Object message using JmsTemplate. For JmsTemplate i've set the property timeToLive to appropriate long ms. But when i send message, it doent expire after that time.

    I also tried setting objectMessage.setJMSExpiration(30000). This doesn't work either. with this approach, When I print the content of message, I get this:
    org.jboss.mq.SpyObjectMessage {
    Header {
    jmsDestination : null
    jmsDeliveryMode : -1
    jmsExpiration : 30000
    jmsPriority : -1
    jmsMessageID : null
    jmsTimeStamp : 0
    jmsCorrelationID: null
    jmsReplyTo : null
    jmsType : null
    jmsRedelivered : false
    jmsProperties : {timeToLive=30000, MGR_MSG_SELECTOR=All}
    jmsPropReadWrite: true
    msgReadOnly : false
    producerClientId: ID:26
    }
    }

    But when I list the message using jmx console, it shows :
    [org.jboss.mq.SpyObjectMessage {
    Header {
    jmsDestination : QUEUE.printManagerQueue
    jmsDeliveryMode : 2
    jmsExpiration : 0
    jmsPriority : 4
    jmsMessageID : ID:26-12462843548211
    jmsTimeStamp : 1246284354821
    jmsCorrelationID: null
    jmsReplyTo : null
    jmsType : null
    jmsRedelivered : false
    jmsProperties : {MGR_MSG_SELECTOR=All, timeToLive=30000}
    jmsPropReadWrite: false
    msgReadOnly : true
    producerClientId: ID:26
    }
    }]

    Please suggest me a solution for this.

  • #2
    duplicate

    http://forum.springsource.org/showthread.php?t=74154

    Comment

    Working...
    X