Package org.opennms.core.ipc.sink.api
Interface MessageConsumerManager
-
- All Known Implementing Classes:
AbstractMessageConsumerManager
,CamelMessageConsumerManager
,KafkaMessageConsumerManager
,MockMessageConsumerManager
,OpennmsGrpcServer
,OsgiIpcManager
public interface MessageConsumerManager
Handles dispatching of messages to the registered consumer(s).- Author:
- jwhite
-
-
Field Summary
Fields Modifier and Type Field Description static String
LOG_PREFIX
static String
METRIC_DISPATCH_TIME
static String
METRIC_MESSAGE_SIZE
static String
METRIC_MESSAGES_RECEIVED
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <S extends Message,T extends Message>
voiddispatch(SinkModule<S,T> module, T message)
static com.codahale.metrics.Timer
getDispatchTimerMetric(com.codahale.metrics.MetricRegistry metricRegistry, String location, String moduleId)
<S extends Message,T extends Message>
voidregisterConsumer(MessageConsumer<S,T> consumer)
<S extends Message,T extends Message>
voidunregisterConsumer(MessageConsumer<S,T> consumer)
static void
updateMessageSize(com.codahale.metrics.MetricRegistry metricRegistry, String location, String moduleId, int messageSize)
-
-
-
Field Detail
-
LOG_PREFIX
static final String LOG_PREFIX
- See Also:
- Constant Field Values
-
METRIC_MESSAGES_RECEIVED
static final String METRIC_MESSAGES_RECEIVED
- See Also:
- Constant Field Values
-
METRIC_MESSAGE_SIZE
static final String METRIC_MESSAGE_SIZE
- See Also:
- Constant Field Values
-
METRIC_DISPATCH_TIME
static final String METRIC_DISPATCH_TIME
- See Also:
- Constant Field Values
-
-
Method Detail
-
dispatch
<S extends Message,T extends Message> void dispatch(SinkModule<S,T> module, T message)
-
registerConsumer
<S extends Message,T extends Message> void registerConsumer(MessageConsumer<S,T> consumer) throws Exception
- Throws:
Exception
-
unregisterConsumer
<S extends Message,T extends Message> void unregisterConsumer(MessageConsumer<S,T> consumer) throws Exception
- Throws:
Exception
-
updateMessageSize
static void updateMessageSize(com.codahale.metrics.MetricRegistry metricRegistry, String location, String moduleId, int messageSize)
-
-