ActiveMQ使用延迟消息,需要在activemq.xml配置文件中添加这项:
schedulerSupport="true"
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" schedulerSupport="true" dataDirectory="${activemq.base}/data" destroyApplicationContextOnStop="true">