OptionaldedupeA key that makes this occurrence unique.
The answer to the most common production failure of any notification system: the same message twice, because a queue is at-least-once, because a retry half succeeded, or because two events describe one fact. Return a key and the second attempt is dropped.
What this notice says, for this person.
Called once per recipient, never once per channel, so a name in the body is rendered once and a channel-specific body is chosen from what it returns.
OptionalrecipientsWho learns about it.
Required when the notice reacts to an event, because nobody else can say: the event carries the account, and only the notice knows which field that is. Unused when a caller names the recipient itself.
A notice: a class that knows what to say, and to whom.
The decorator declares what a notice is; the class holds what it says. That separation is the point: metadata belongs on the declaration, content belongs in code, where it can read the event, translate, format a date, or ask a service for a link.