@ApplicationScoped public class KafkaConnector extends Object implements IncomingConnectorFactory, OutgoingConnectorFactory, HealthReporter
| Modifier and Type | Field and Description |
|---|---|
static String |
CONNECTOR_NAME |
static io.opentelemetry.api.trace.Tracer |
TRACER |
CHANNEL_NAME_ATTRIBUTE, CONNECTOR_ATTRIBUTE, CONNECTOR_PREFIX, INCOMING_PREFIX, OUTGOING_PREFIX| Constructor and Description |
|---|
KafkaConnector() |
| Modifier and Type | Method and Description |
|---|---|
<K,V> KafkaConsumer<K,V> |
getConsumer(String channel) |
HealthReport |
getLiveness() |
<K,V> KafkaProducer<K,V> |
getProducer(String channel) |
org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<? extends Message<?>> |
getPublisherBuilder(org.eclipse.microprofile.config.Config config)
Creates a channel for the given configuration.
|
HealthReport |
getReadiness() |
HealthReport |
getStartup() |
org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder<? extends Message<?>,Void> |
getSubscriberBuilder(org.eclipse.microprofile.config.Config config)
Creates a channel for the given configuration.
|
void |
terminate(Object event) |
public static final String CONNECTOR_NAME
public static io.opentelemetry.api.trace.Tracer TRACER
public void terminate(@Observes(notifyObserver=IF_EXISTS) @Priority(value=50) @BeforeDestroyed(value=javax.enterprise.context.ApplicationScoped.class) Object event)
public org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<? extends Message<?>> getPublisherBuilder(org.eclipse.microprofile.config.Config config)
IncomingConnectorFactoryconnector, using the Connector qualifier's parameter indicating a key to
which IncomingConnectorFactory to use.
Note that the connection to the transport or broker is generally postponed until the subscription occurs.
getPublisherBuilder in interface IncomingConnectorFactoryconfig - the configuration, must not be null, must contain the ConnectorFactory.CHANNEL_NAME_ATTRIBUTE
attribute.PublisherBuilder, will not be null.public org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder<? extends Message<?>,Void> getSubscriberBuilder(org.eclipse.microprofile.config.Config config)
OutgoingConnectorFactoryconnector, using the Connector qualifier's parameter indicating a key to
which Outgoing to use.
Note that the connection to the transport or broker is generally postponed until the subscription.
getSubscriberBuilder in interface OutgoingConnectorFactoryconfig - the configuration, never null, must contain the ConnectorFactory.CHANNEL_NAME_ATTRIBUTE
attribute.SubscriberBuilder, must not be null.public HealthReport getStartup()
getStartup in interface HealthReporterpublic HealthReport getReadiness()
getReadiness in interface HealthReporterpublic HealthReport getLiveness()
getLiveness in interface HealthReporterpublic <K,V> KafkaConsumer<K,V> getConsumer(String channel)
public <K,V> KafkaProducer<K,V> getProducer(String channel)
Copyright © 2018–2021 SmallRye. All rights reserved.