I have almost similar use case in my current application. here is how I will do this (of course there would be better ways! )
Using the pubSubConverter I am unmarshalling the response coming from queueDestination.
id="jmsIn" connection-factory="connectionFactory" message-converter="pubSubConverter"
2. Since the message is to be audited after putting on the queue, I will put a wiretap around this channel, and there I will send it to queue. Something like:
3. Then, an activator on toJMSChannel for converting to whatever format, and passing it to exampleChannel:
<wire-tap channel="toJMSChannel" />
4. Lastly, after this has completed, I will audit:
<jms:outbound-channel-adapter id="jmsOut" destination="outQueue" channel="exampleChannel"/>
If I use direct channels everywhere, this all would happen in the same thread, and the audit / writing to file would happen only after the message been sent to queue. Again, there might be better ways of doing this.