如果我们使用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);