Class KafkaRemoteMessageDispatcherFactory
- java.lang.Object
-
- org.opennms.core.ipc.sink.common.AbstractMessageDispatcherFactory<String>
-
- org.opennms.core.ipc.sink.kafka.client.KafkaRemoteMessageDispatcherFactory
-
- All Implemented Interfaces:
MessageDispatcherFactory
public class KafkaRemoteMessageDispatcherFactory extends AbstractMessageDispatcherFactory<String>
-
-
Constructor Summary
Constructors Constructor Description KafkaRemoteMessageDispatcherFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
<S extends Message,T extends Message>
voiddispatch(SinkModule<S,T> module, String topic, T message)
org.osgi.framework.BundleContext
getBundleContext()
Identity
getIdentity()
Integer
getMaxBufferSize()
String
getMetricDomain()
com.codahale.metrics.MetricRegistry
getMetrics()
<S extends Message,T extends Message>
StringgetModuleMetadata(SinkModule<S,T> module)
Optionally build meta-data or state information for the module which will be passed on all the calls toAbstractMessageDispatcherFactory.dispatch(org.opennms.core.ipc.sink.api.SinkModule<S, T>, W, T)
.io.opentracing.Tracer
getTracer()
TracerRegistry
getTracerRegistry()
void
init()
void
setBundleContext(org.osgi.framework.BundleContext bundleContext)
void
setConfigAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)
void
setIdentity(Identity identity)
void
setMetrics(com.codahale.metrics.MetricRegistry metrics)
void
setTracerRegistry(TracerRegistry tracerRegistry)
-
Methods inherited from class org.opennms.core.ipc.sink.common.AbstractMessageDispatcherFactory
createAsyncDispatcher, createSyncDispatcher, createSyncDispatcher, onDestroy, onInit
-
-
-
-
Method Detail
-
getModuleMetadata
public <S extends Message,T extends Message> String getModuleMetadata(SinkModule<S,T> module)
Description copied from class:AbstractMessageDispatcherFactory
Optionally build meta-data or state information for the module which will be passed on all the calls toAbstractMessageDispatcherFactory.dispatch(org.opennms.core.ipc.sink.api.SinkModule<S, T>, W, T)
. This is useful for calculating things like message headers which are re-used on every dispatch.- Overrides:
getModuleMetadata
in classAbstractMessageDispatcherFactory<String>
- Returns:
-
dispatch
public <S extends Message,T extends Message> void dispatch(SinkModule<S,T> module, String topic, T message)
- Specified by:
dispatch
in classAbstractMessageDispatcherFactory<String>
-
init
public void init() throws IOException
- Throws:
IOException
-
destroy
public void destroy()
-
getMetricDomain
public String getMetricDomain()
- Specified by:
getMetricDomain
in classAbstractMessageDispatcherFactory<String>
-
getBundleContext
public org.osgi.framework.BundleContext getBundleContext()
- Specified by:
getBundleContext
in classAbstractMessageDispatcherFactory<String>
-
setConfigAdmin
public void setConfigAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)
-
setBundleContext
public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
-
getMaxBufferSize
public Integer getMaxBufferSize()
-
setTracerRegistry
public void setTracerRegistry(TracerRegistry tracerRegistry)
-
getTracerRegistry
public TracerRegistry getTracerRegistry()
-
getTracer
public io.opentracing.Tracer getTracer()
- Specified by:
getTracer
in classAbstractMessageDispatcherFactory<String>
-
getIdentity
public Identity getIdentity()
-
setIdentity
public void setIdentity(Identity identity)
-
getMetrics
public com.codahale.metrics.MetricRegistry getMetrics()
- Specified by:
getMetrics
in classAbstractMessageDispatcherFactory<String>
-
setMetrics
public void setMetrics(com.codahale.metrics.MetricRegistry metrics)
-
-