问题
I am trying to find the simplest and quickest way of creating streamed payload in a mule flow. Ideally this would be a java component.
The whole reason is I have a datamapper right next to this and mapping in stream mode. So I would prefer this payload will be a streamed pojo collection. I have tried just implement the Callable interface, but it seems difficult for me to find a proper way to output a stream payload and let Mule go on processing next step in flow while with this stream.
Thanks!
回答1:
Make your component produce a java.io.InputStream
payload.
来源:https://stackoverflow.com/questions/25679598/customised-mule-component-that-creates-streamed-payload