接收消息和确认消息之间的超时间隔

时间:2016-07-19 11:24:33

标签: spring activemq

如果我们使用ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE,我们可以配置它的超时间隔(接收消息和确认消息之间)是多少?

队列的Spring代码是

ActiveMQConnectionFactory amqConnectionFactory = new ActiveMQConnectionFactory();     CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory(amqConnectionFactory);     ActiveMQQueue activeMQQueue = new ActiveMQQueue(“CR.DEFAULT.QUEUE”);     JmsTemplate jmsTemplate = new JmsTemplate();     jmsTemplate.setConnectionFactory(cachingConnectionFactory);     jmsTemplate.setDefaultDestination(activeMQQueue);     jmsTemplate.setSessionAcknowledgeMode(ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE);     jmsTemplate.setReceiveTimeout(JmsDestinationAccessor.RECEIVE_TIMEOUT_NO_WAIT);

0 个答案:

没有答案