Right now, upcasting is limited to the event data itself. We have a case now, where we would like to upcast headers (add tenant information). As we are using our own serializers, we added the support for this in our own headers serializer.
Wondering though if it makes sense to add this as a general feature - or just pass the entire Message to upcasters instead? The later would keep the implementation cleaner (no separation between different kinds of upcasters).
Right now, upcasting is limited to the event data itself. We have a case now, where we would like to upcast headers (add tenant information). As we are using our own serializers, we added the support for this in our own headers serializer.
Wondering though if it makes sense to add this as a general feature - or just pass the entire
Messageto upcasters instead? The later would keep the implementation cleaner (no separation between different kinds of upcasters).