publishIntegrationEvent<T>(runtime: IRuntimeServices,broker: IMessageBroker,definition: IntegrationEventDefinition<T>,payload: T,metadata?: IntegrationEventMetadata): Promise<void>
Publishes one integration event: builds the envelope from the caller's
already-typed payload and hands it to broker.publish on the definition's
topic.
The definition's parse function is deliberately NOT run here. parse is a
narrowing function unknown → T, and a realistic one (a schema with
defaults, coercion, or stripping) returns a different object than it was
given — running it on publish would silently change what the producer asked
to send. It also would not buy the guarantee it appears to: what the
consumer parses is the value after a JSON round trip, which this call has
not seen. The consequence is honest and documented: a producer CAN publish a
payload its own consumers reject, and that surfaces at the consumer as a
reason: 'parse' rejection.
broker: IMessageBroker
The broker to publish through
definition: IntegrationEventDefinition<T>
The contract being published
payload: T
The event payload, carried verbatim
metadata: IntegrationEventMetadata
Optional causal metadata