It would be beneficial if we adjust the MessageStream API to support other objects than only Message implementations.
One of the more apparent use cases of this flexibility is the opportunity to adjust the stream of TrackingEventMessages, as is used abundantly right now, into a stream of TrackingToken-to-Message instances.
In other words, to have the stream allow for pairs.
While working on #3101 and hitting the event streaming side of things, getting rid of the TrackedEventMessage would clean-up the API.
Furthermore, it would allow for distinct signals to live inside the stream, like the consistency marker, as is needed for event sourcing.
Current Behaviour
The MessageStream expects items that are implementations of the Message interface.
Enhancement Description
It would be beneficial if we adjust the
MessageStream
API to support other objects than onlyMessage
implementations. One of the more apparent use cases of this flexibility is the opportunity to adjust the stream ofTrackingEventMessages
, as is used abundantly right now, into a stream ofTrackingToken
-to-Message
instances. In other words, to have the stream allow for pairs.While working on #3101 and hitting the event streaming side of things, getting rid of the
TrackedEventMessage
would clean-up the API. Furthermore, it would allow for distinct signals to live inside the stream, like the consistency marker, as is needed for event sourcing.Current Behaviour
The
MessageStream
expects items that are implementations of theMessage
interface.Wanted Behaviour
That the
MessageStream
allows any generic type.Possible Workarounds
Not use the
MessageStream
.