Package io.smallrye.reactive.messaging
Interface OutgoingInterceptor
- All Superinterfaces:
jakarta.enterprise.inject.spi.Prioritized
@Experimental("Smallrye-only feature")
public interface OutgoingInterceptor
extends jakarta.enterprise.inject.spi.Prioritized
Interceptor for outgoing messages on connector channels.
To register an outgoing interceptor, expose a managed bean, implementing this interface,
and qualified with @Identifier
with the targeted channel name.
Only one interceptor is allowed to be bound for interception per outgoing channel.
When multiple interceptors are available, implementation should override the getPriority()
method.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Message<?>
beforeMessageSend
(Message<?> message) Called before message transmissiondefault int
default Message<?>
Deprecated.void
onMessageAck
(Message<?> message) Called after message acknowledgmentvoid
onMessageNack
(Message<?> message, Throwable failure) Called after message negative-acknowledgement
-
Method Details
-
getPriority
default int getPriority()- Specified by:
getPriority
in interfacejakarta.enterprise.inject.spi.Prioritized
-
onMessage
Deprecated.Called before message transmission- Parameters:
message
- message to send- Returns:
- the message to send, possibly mutated
-
beforeMessageSend
Called before message transmission- Parameters:
message
- message to send- Returns:
- the message to send, possibly mutated
-
onMessageAck
Called after message acknowledgment- Parameters:
message
- acknowledged message
-
onMessageNack
Called after message negative-acknowledgement- Parameters:
message
- message to negative-acknowledgefailure
- failure
-
beforeMessageSend(Message)