Results 1 to 2 of 2

Thread: HttpInboundGateway send input stream to response channel

  1. #1
    Join Date
    Nov 2012
    Posts
    2

    Default HttpInboundGateway send input stream to response channel

    Hello everyone and thanks in advance for reading this.

    I wonder if I can get a recommendation from you on how to design the following solution:

    I have a simple workflow:

    • Http Inbound Gateway - which mapped to URL in order to retrieve a resource from the server.
    • Request Channel - Where all request messages are sent.
    • Service Activator - Receives all messages from the request channel and calls my 'persistence service'.
    • Persistence Service - Resolves 'some resource' and returns an InputStream in order to be consumed.
    • Response Channel - Where the resource is send for the gateway to generate a HTTP response and send it back to the client.


    Here are my questions:

    1. Not sure if I can send an InputStream as a message payload to the response channel and the gateway will read the input stream and write the response. Would it work?
    2. I could read the stream to a byte array and send that to the response channel. But what happens with BIG files?


    Is there any recommendation you could share?

    Thanks.

  2. #2
    Join Date
    Nov 2012
    Posts
    2

    Default

    Any ideas on this?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •