Я новичок в интеграции с JMS и Spring, я пытаюсь отправить сообщение в очередь, которая позже используется для вызова службы покоя и работает нормально.
Моя конфигурация. xml как следующим образом:
<bean id="amqConnectionFactorySendLensVisibiityEvents" parent="amqConnectionFactoryBase">
<property name="brokerURL" value="${jms-broker-internal-orchestration}" />
<property name="clientIDPrefix" value="#{activeMQHelper.buildClientIDPrefix('Engine-send-ibility-event')}" />
</bean>
<bean id="jmsConnectionFactorySendLensVisibilityEvent" parent="jmsConnectionFactoryBase">
<constructor-arg ref="amqConnectionFactorySendLensVisibiityEvents" />
<property name="connectionName" value="jmsConnectionFactorySend" />
</bean>
<!-- Send message to Lens visibiity event queue -->
<int:channel id="outputChannelSendMessageToQueue" />
<int-jms:outbound-channel-adapter id="adapterSendMessageToQueue" channel="outputChannelSendMessageQueue"
connection-factory="jmsConnectionFactory"
destination-name="${container-events}"
<!-- Listener for receiving requests from Lens visibility event queue -->
<int-jms:message-driven-channel-adapter id="adapterInputChannelLensVisibilityEvent" channel="inputChannelLensVisibilityEventReceiver" error-channel="errorChannel"
connection-factory="jmsConnectionFactorySendLensVisibilityEvent" acknowledge="auto"
destination-name="${container-queue-lens-visibility-events}"
concurrent-consumers="${jms-consumer-count-lens-visibility-from-engine}"
max-concurrent-consumers="${jms-consumer-count-lens-visibility-from-engine}" />
<!-- Handle Lens visibility event requests -->
<int:chain id="chainLensVisibilityEventReceiver" input-channel="inputChannelEventReceiver" output-channel="nullChannel">
<int:header-enricher default-overwrite="true">
<int:header name="flowType" type="java.lang.String" value="#{T(com.gxs.orch.engine.dto.FlowType).LensVisibilityEventReceiver}" />
</int:header-enricher>
<int:service-activator id="activatorResetDefaultLogLevelForEngine" ref="resetDefaultLogLevelForEngine" method="doReset" />
<int:service-activator id="activatorLensRestClient" method="consumeVisibilityMessage">
<bean class="com.springrest.client.xxx" />
</int:service-activator>
</int:chain>
Это метод: publi c void consumerVisibilityMessage (строковая задача Json) throws Exception {.... throw new Exception (); }
Когда метод takeVisibilityMessage выдает исключение, сообщение удаляется из очереди, но как мне убедиться, что сообщение остается в очереди до тех пор, пока потребление не выполнится успешно или не исчерпан no.of jms-redelivery.
Пожалуйста, помогите мне с этим, когда я бью головой об стену.
Заранее спасибо.