I have a requirement where on receipt of a JMS message I need to delete all the data from a table before repopulating with the data in the message. It's very important that the deletes occur first and I'd like the pipeline structure to capture this. I'd also like to make use of the jdbc support in SI .
I've tried using a <wiretap> to send the message to <jdbc:outbound-adapter> to perform the delete but I'm not sure if this is in the spirit of the wiretap or if there is a guarentee that the <wiretap> flow will always execute before any of the handlers attached to the 'tapped channel.
I might be able to use the <jdbc:outbound-gateway/> to perform the deletes but I need to return the original payload so I can pass onto the next processing step - I dont really care about the number of rows deleted. I can add the orginal payload as a header for later use and this is what I will do, but I wondered if there was a better way of doing this? (I quite often find that I need to invoke a single component, or a sub-flow, but on success of that component or flow I want to continue with the original message and I resort to putting the payload into a header for later use)