A function to optionally wrap or replace the original topic's subscription handler.
This method is invoked before the topic's subscriber handler executes. Implementations can transform the message payload, inject behavior (such as logging or timing), or completely replace the handler logic.
The returned value, or resolved promise value, becomes the handler's result.
The topic being published to.
The original MessageHandler registered for the topic. The interceptor may call it to invoke the next handler in the chain.
The message payload associated with the publication.
Optional additional message handler arguments injected by the interceptor chain.
OptionalisAn optional function to determine whether a message for the given topic should be vetoed (prevented from being dispatched to subscribers).
If this method returns or resolves to true, the message will not be dispatched
to any subscribers, and other interceptors will not be evaluated.
A message interceptor that allows observing, modifying, or preventing message dispatch before messages are dispatched to topic subscribers.
A
MessageInterceptorcan:Message interceptors are registered using MessageBus.addInterceptor.