Package io.smallrye.reactive.messaging
Interface IncomingInterceptor
- All Superinterfaces:
jakarta.enterprise.inject.spi.Prioritized
@Experimental("Smallrye-only feature")
public interface IncomingInterceptor
extends jakarta.enterprise.inject.spi.Prioritized
Interceptor for incoming 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 incoming channel.
When multiple interceptors are available, implementation should override the getPriority() method.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Message<?> afterMessageReceive(Message<?> message) Called after message receiveddefault intvoidonMessageAck(Message<?> message) Called after message acknowledgmentvoidonMessageNack(Message<?> message, Throwable failure) Called after message negative-acknowledgement
-
Method Details
-
getPriority
default int getPriority()- Specified by:
getPriorityin interfacejakarta.enterprise.inject.spi.Prioritized
-
afterMessageReceive
Called after message received- Parameters:
message- received message- Returns:
- the message to dispatch for consumer methods, possibly mutated
-
onMessageAck
Called after message acknowledgment- Parameters:
message- acknowledged message
-
onMessageNack
Called after message negative-acknowledgement- Parameters:
message- message to negative-acknowledgefailure- failure
-