Search code examples
xmljmsactivemq-classicmq

activeMQ timeBeforePurgeTempDestinations milliseconds or seconds?


I think setting cacheTempDestinations="true" and timeBeforePurgeTempDestinations="?" should smooth out some issue i am having

I have read that the default for timeBeforePurgeTempDestinations is 5 seconds.

if I want to set the timeBeforePurgeTempDestinations to 30 seconds is it, mills or seconds ? in the xml config file,

  <broker xmlns="http://activemq.apache.org/schema/core"
              brokerName="localhost"
              dataDirectory="${activemq.data}"
              deleteAllMessagesOnStartup="true"
              cacheTempDestinations="true"
              timeBeforePurgeTempDestinations="30000">

or

  <broker xmlns="http://activemq.apache.org/schema/core"
              brokerName="localhost"
              dataDirectory="${activemq.data}"
              deleteAllMessagesOnStartup="true"
              cacheTempDestinations="true"
              timeBeforePurgeTempDestinations="30">

Thanks

I think i could also do with more info on

jms.watchTopicAdvisories=false, and ActiveMQ.Advisory.TempQueue

I would think that, a client could not be advised that the temp queue destroyed until after timeBeforePurgeTempDestinations has expired.

if this is true in my case, this should ok. and i would not need to use

  tcp://"+brokerIp+":61616?jms.watchTopicAdvisories=false

in my connection ULR, if indeed the above connection URL is correct

Thanks

however i have this url for connection's

<transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=80000&amp;wireFormat.maxFrameSize=104857600&amp;transport.useInactivityMonitor=false&amp;wireFormat.maxInactivityDuration=0&amp;jms.prefetchPolicy.all=0"/>

where i have

transport.useInactivityMonitor=false

so i am not sure how that effect temp queue's


Solution

  • It's in milliseconds as code viewed on github https://github.com/apache/activemq/blob/master/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java