-
Notifications
You must be signed in to change notification settings - Fork 38
Description
We had a set of discussions where we mentioned headers attached to messages.
Right now, the Message interface does not have headers. However, we give the possibility to use Event which can have headers.
Looking at the current set of message-oriented middleware, most of them (if not all) support headers as a first-class citizen. So, I think we can add headers to the Message class. These headers would be represented as a Map<String, Object>. Whether or not the Object should be serializable, I don't have a strong opinion. It might be a limitation when we want to pass container-related objects (but should we?).
Would that reduce the interest of Event? I don't think so as typically the Events that have been studied so far (Cloud Event) are more about defining the header key and how the payload and header are encoded.