Hi,
I have spring configuration:
In message-driven-channel-adapter I have acknowledge="client" and that's works so that when no runtime exception is thrown in outbound-channel-adapter method (logMessage) than every message is consumed. When runtime exception is thrown then messages that wasn't delivered are not lost and remain in a queue. That's fine, but I would like to have possibility to steer with it for instance by invoking message.acknowledge();Code:<int:gateway id="gatewayAsynchService" service-interface="pl.firstdata.maqc.integration.GatewayAsynchService" > <int:method name="process" request-channel="requestChannel" /> </int:gateway> <int:poller default="true" fixed-delay="250"/> <int:channel id="requestChannel"> <int:dispatcher task-executor="simpleAsyncTaskExecutor"/> </int:channel> <bean id="simpleAsyncTaskExecutor" class="org.springframework.core.task.SimpleAsyncTaskExecutor" /> <int-jms:outbound-gateway request-channel="requestChannel" request-destination="requestQueue" connection-factory="connFactory"/> <int-jms:message-driven-channel-adapter acknowledge="client" id="mdChannel" connection-factory="connFactory" selector="imie='ania'" destination="replyQueue" channel="replyChannel" /> <int:outbound-channel-adapter id="replyChannel" ref="integrationAsynchService" method="logMessage" /> <bean id="integrationAsynchService" class="pl.firstdata.maqc.integration.IntegrationAsynchService"/> <jee:jndi-lookup id="requestQueue" expected-type="javax.jms.Destination" jndi-name="jms/queue/req"/> <jee:jndi-lookup id="replyQueue" expected-type="javax.jms.Destination" jndi-name="jms/queue/reply"/> <bean id="myTargetConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="jms/RemoteConnectionFactory"/> </bean> <bean id="connFactory" class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter"> <property name="targetConnectionFactory" ref="myTargetConnectionFactory"/> <property name="username" value="robert"/> <property name="password" value="sys"/> </bean>
I would like not to acknowledge process untill I get all messages for example.
How can I do it by using Spring Integration in a client?


Reply With Quote
