0
votes

I implemented a custom <inbound-channel-adapter> that extends MessageProducerSupport, a little bit like ImapIdleChannelAdapter from spring integration. The goal of this inbound channel adapter is to launch a persistent search on LDAP, and each time there's a new change in LDAP, it sends the change to a channel afterwards to an <int-http:outbound-channel-adapter>. However I would like to when the message is successfully sent to be able to log it into a database as processed. Would you please help me to accomplish this task with some ideas? Thank you very much!

1
If you have some additional question you can simply comment to the answer and I'll take care about further explanation.Artem Bilan

1 Answers

0
votes

The simplest way to achieve that make channel for that <int-http:outbound-channel-adapter> as publish-subscribe and add one more <int-jdbc:outbound-channel-adapter> to it.

This second subscriber will be invoked only when the first one has finished its work. And in this case the same Message will be sent to the DB adapter.

Another option is based on the <request-handler-advice-chain> together with ExpressionEvaluatingRequestHandlerAdvice, when you can specify the onSuccessExpression together with successChannel to send something to another channel on good result of adapter handling.