There are a few places in the book where I recommended putting a userId attribute inside of metadata. I consider that advice a mistake now.
metadata is about the mechanics of messaging, and if a user’s id matters to a component’s domain, then it belongs in the data and not the metadata.
Sorry for the confusion, and happy coding!