Class KafkaConnector
- java.lang.Object
-
- io.helidon.messaging.connectors.kafka.KafkaConnector
-
- All Implemented Interfaces:
Stoppable
,ConnectorFactory
,IncomingConnectorFactory
,OutgoingConnectorFactory
@ApplicationScoped public class KafkaConnector extends Object implements IncomingConnectorFactory, OutgoingConnectorFactory, Stoppable
Implementation of Kafka Connector as described in the MicroProfile Reactive Messaging Specification.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.microprofile.reactive.messaging.spi.ConnectorFactory
CHANNEL_NAME_ATTRIBUTE, CONNECTOR_ATTRIBUTE, CONNECTOR_PREFIX, INCOMING_PREFIX, OUTGOING_PREFIX
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KafkaConfigBuilder
configBuilder()
Custom config builder for Kafka connector.static KafkaConnector
create()
Creates a new instance of KafkaConnector with empty configuration.static KafkaConnector
create(Config config)
Creates a new instance of KafkaConnector with the required configuration.PublisherBuilder<? extends Message<?>>
getPublisherBuilder(Config config)
SubscriberBuilder<? extends Message<?>,Void>
getSubscriberBuilder(Config config)
void
stop()
Stops the KafkaConnector and all the jobs and resources related to it.
-
-
-
Method Detail
-
getPublisherBuilder
public PublisherBuilder<? extends Message<?>> getPublisherBuilder(Config config)
- Specified by:
getPublisherBuilder
in interfaceIncomingConnectorFactory
-
getSubscriberBuilder
public SubscriberBuilder<? extends Message<?>,Void> getSubscriberBuilder(Config config)
- Specified by:
getSubscriberBuilder
in interfaceOutgoingConnectorFactory
-
create
public static KafkaConnector create(Config config)
Creates a new instance of KafkaConnector with the required configuration.- Parameters:
config
- Helidonconfig
- Returns:
- the new instance
-
create
public static KafkaConnector create()
Creates a new instance of KafkaConnector with empty configuration.- Returns:
- the new instance
-
stop
public void stop()
Stops the KafkaConnector and all the jobs and resources related to it.
-
configBuilder
public static KafkaConfigBuilder configBuilder()
Custom config builder for Kafka connector.- Returns:
- new Kafka specific config builder
-
-