public interface ProducerInterceptor
ProducerInterceptor is used to intercept send operations of producer.
The interceptor is able to view or modify the message being transmitted and collect the send record.
| Modifier and Type | Method and Description |
|---|---|
void |
postSend(Message message,
KeyValue attributes)
Invoked immediately after the successful send invocation.
|
void |
postSend(Message message,
KeyValue attributes,
OMSException sendException)
Invoked immediately after the failed send invocation.
|
void |
preSend(Message message,
KeyValue attributes)
Invoked before the message is actually sent to the network.
|
void preSend(Message message, KeyValue attributes)
This allows for modification of the message if necessary.
message - a message will be sentattributes - the extensible attributes delivered to the intercept threadvoid postSend(Message message, KeyValue attributes)
message - the message is actually sentattributes - the extensible attributes delivered to the intercept threadvoid postSend(Message message, KeyValue attributes, OMSException sendException)
message - the message is actually sentattributes - the extensible attributes delivered to the intercept threadsendException - the occurred exception in the send invocationCopyright © 2017–2018 OpenMessaging. All rights reserved.