ActiveMQ 配置延时队列

conf/activemq.xml 新增配置

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

jmsMessagingTemplate.convertAndSend(QUEUE, new HashMap<String, String>() {{
	put("parmas1","");
	put("params2", "");
}}, new HashMap<String, Object>(2) {{
	put(ScheduledMessage.AMQ_SCHEDULED_DELAY, 12 * 3600 * 1000);
}});
posted @ 2023-11-16 10:21  Kllin  阅读(94)  评论(0编辑  收藏  举报