Announcement Announcement Module
Collapse
No announcement yet.
file outbound-channel-adapter write payload only? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • file outbound-channel-adapter write payload only?

    Hello All,

    I have a file outbound channel adapter configured as below and am finding that the files generated have the complete message written to them including the header, e.g.

    Code:
    [Payload=Sat May 05 21:19:30 MDT 2012][Headers={timestamp=1353739161022, id=d677224a-6bca-4849-bdaa-be6d48891609, file_name=input/sample.fnv}]
    Given that the inbound messages are typed as Message<String> how can I configure such that only the payload is written? I've seen examples, for instance the STS template project, which seem to accomplish this w/o any apparent difference that what I'm attempting. In that case the channel-adapter is connected to a header-value-router, but the message type should be the same.

    Thanks for any help!

    --john

    Code:
    <int-file:outbound-channel-adapter
    		id="multibeamFilesOut" directory="file:target/output/multibeam"
    		delete-source-files="false" channel="channel4"/>
    		 
    <int:channel id="channel1">

  • #2
    It looks like something upstream of the adapter is doing this conversion (message.toString()); the adapter can only handle File, byte[] and String payloads; otherwise it throws an exception. The adapter never writes a String representation of the message it receives.

    I suggest you run with DEBUG logging and you will see the message as it progresses through your flow.

    Comment


    • #3
      Thanks Gary, that's just what I was looking for!

      --john

      Comment

      Working...
      X