Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix or Usage Issue
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Core: Streaming
-
Labels:None
-
Similar Issues:None
Description
By specifying an endpoint as a 'stream' we can make some configuration and behavioural choices about processing events that we currently do by setting flags for each different transport (this File connector, where we pass the File object arround or Tcp when we have many options for managing the stream).
This change is powerful as we will be able to turn streaming on/off per endpoint (default will be off), but there are a number of changes that need to be made to support this feature.
1. Add a new Messages Adapter type to the ConnectorServiceDescriptor called stream.message.adapter Where we can have a default stream message adapter implementation.
2. The StreamMessageAdapter should wrap the in and out stream.
3. Add a flag to the UMOEvent isStream()
3. Calls to the message adapter getMessageAsString and getMessageAsBytes should throw an exception say StreamOperationNotSupportedException. Maybe we can add new methods called getStreamAsString and getStreamAsBytes...
4. Everywhere that getMessageAsString and getMessageAsBytes is called in the codebase should check for event.isStream first. (These methods are only called by mule when logger the event payload)
Streaming is initiated by the MessageReceiver and streams are now handled implicitly by Mule