I've had this on my mind for some time, and it keeps cropping up in GitHub issues and discord.
So...Metadata propagation within PubSub is confusing because it intersects with built-in metadata behaviours, which creates ambiguity across the board.
I think there are 3 use-cases (possibly more, please let me know) that require 3 slightly different solutions, but all need to be considered and addressed as a group to make the whole thing worth-while and consistent, leading to a better, more predictable developer experience across all PubSub components.
See the attached Miro image for the use-cases and proposed solutions.
3 use-cases are on the left, read the Yellow blocks first to understand the requirement. Then move to the right hand column to see the proposed solution in the green block.
If I get enough positive feedback/support for this, I'll turn it into a proper proposal in the dapr/proposals repo.
Thanks folks 🙂