org.apache.kafka.streams.KafkaClientSupplier Java Examples

The following examples show how to use org.apache.kafka.streams.KafkaClientSupplier. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KafkaStreamsTopologyManager.java    From quarkus with Apache License 2.0 6 votes vote down vote up
@Inject
public KafkaStreamsTopologyManager(Instance<Topology> topology, Instance<KafkaClientSupplier> kafkaClientSupplier,
        Instance<StateListener> stateListener, Instance<StateRestoreListener> globalStateRestoreListener) {
    // No producer for Topology -> nothing to do
    if (topology.isUnsatisfied()) {
        LOGGER.debug("No Topology producer; Kafka Streams will not be started");
        this.executor = null;
        return;
    }

    this.executor = Executors.newSingleThreadExecutor();
    this.topology = topology;
    this.kafkaClientSupplier = kafkaClientSupplier;
    this.stateListener = stateListener;
    this.globalStateRestoreListener = globalStateRestoreListener;
}
 
Example #2
Source File: TestKafkaStreams.java    From kafka-streams-machine-learning-examples with Apache License 2.0 4 votes vote down vote up
public TestKafkaStreams(Topology topology, Properties props, KafkaClientSupplier clientSupplier) {
    super(topology, props, clientSupplier);
}
 
Example #3
Source File: TestKafkaStreams.java    From kafka-streams-machine-learning-examples with Apache License 2.0 4 votes vote down vote up
public TestKafkaStreams(Topology topology, Properties props, KafkaClientSupplier clientSupplier, Time time) {
    super(topology, props, clientSupplier, time);
}
 
Example #4
Source File: TestKafkaStreams.java    From kafka-streams-machine-learning-examples with Apache License 2.0 4 votes vote down vote up
public TestKafkaStreams(Topology topology, Properties props, KafkaClientSupplier clientSupplier) {
    super(topology, props, clientSupplier);
}
 
Example #5
Source File: TestKafkaStreams.java    From kafka-streams-machine-learning-examples with Apache License 2.0 4 votes vote down vote up
public TestKafkaStreams(Topology topology, Properties props, KafkaClientSupplier clientSupplier, Time time) {
    super(topology, props, clientSupplier, time);
}
 
Example #6
Source File: TestKafkaStreams.java    From kafka-streams-machine-learning-examples with Apache License 2.0 4 votes vote down vote up
public TestKafkaStreams(Topology topology, Properties props, KafkaClientSupplier clientSupplier) {
    super(topology, props, clientSupplier);
}
 
Example #7
Source File: TestKafkaStreams.java    From kafka-streams-machine-learning-examples with Apache License 2.0 4 votes vote down vote up
public TestKafkaStreams(Topology topology, Properties props, KafkaClientSupplier clientSupplier, Time time) {
    super(topology, props, clientSupplier, time);
}
 
Example #8
Source File: TestKafkaStreams.java    From kafka-streams-machine-learning-examples with Apache License 2.0 4 votes vote down vote up
public TestKafkaStreams(Topology topology, Properties props, KafkaClientSupplier clientSupplier) {
    super(topology, props, clientSupplier);
}
 
Example #9
Source File: TestKafkaStreams.java    From kafka-streams-machine-learning-examples with Apache License 2.0 4 votes vote down vote up
public TestKafkaStreams(Topology topology, Properties props, KafkaClientSupplier clientSupplier, Time time) {
    super(topology, props, clientSupplier, time);
}
 
Example #10
Source File: SleuthKafkaStreamsConfigurationIntegrationTests.java    From spring-cloud-sleuth with Apache License 2.0 4 votes vote down vote up
@Test
void should_set_KafkaClientSupplier_on_StreamsBuilderFactoryBean() {
	this.contextRunner.run(context -> verify(UserConfig.streamsBuilderFactoryBean)
			.setClientSupplier(any(KafkaClientSupplier.class)));
}
 
Example #11
Source File: SleuthKafkaStreamsConfigurationIntegrationTests.java    From spring-cloud-sleuth with Apache License 2.0 4 votes vote down vote up
@Test
void should_not_complain_about_eager_initialization() {
	this.contextRunner.withUserConfiguration(EagerInitializationConfig.class)
			.run(context -> verify(UserConfig.streamsBuilderFactoryBean)
					.setClientSupplier(any(KafkaClientSupplier.class)));
}
 
Example #12
Source File: SleuthKafkaStreamsConfigurationTest.java    From spring-cloud-sleuth with Apache License 2.0 4 votes vote down vote up
@Override
public void setClientSupplier(KafkaClientSupplier clientSupplier) {
	this.clientSupplierInvoked = true;
	super.setClientSupplier(clientSupplier);
}
 
Example #13
Source File: KafkaStreamsTracing.java    From brave with Apache License 2.0 2 votes vote down vote up
/**
 * Provides a {@link KafkaClientSupplier} with tracing enabled, hence Producer and Consumer
 * operations will be traced.
 *
 * This is mean to be used in scenarios {@link KafkaStreams} creation is not controlled by the
 * user but framework (e.g. Spring Kafka Streams) creates it, and {@link KafkaClientSupplier} is
 * accepted.
 */
public KafkaClientSupplier kafkaClientSupplier() {
  return new TracingKafkaClientSupplier(kafkaTracing);
}