In the latter case, the transport analyzes all types in the assembly to identify which are events, using marker interface IEvent or the configured DefiningEventsAs()message convention. Then for each event type, the transport registers a mapping between the type and the publisher name.

In the snippets the publisherName is the name of the endpoint that will publish messages.