use of io.smallrye.reactive.messaging.kafka.base.KafkaMapBasedConfig in project smallrye-reactive-messaging by smallrye.
the class KafkaSourceWithLegacyMetadataTest method myKafkaSourceConfigWithoutAck.
private KafkaMapBasedConfig myKafkaSourceConfigWithoutAck(String suffix, boolean shorterTimeouts) {
KafkaMapBasedConfig config = kafkaConfig("mp.messaging.incoming.data");
config.put("group.id", "my-group-starting-on-fifth-" + suffix);
config.put("value.deserializer", IntegerDeserializer.class.getName());
config.put("enable.auto.commit", "false");
config.put("auto.offset.reset", "earliest");
config.put("topic", "legacy-data-starting-on-fifth-" + suffix);
if (shorterTimeouts) {
config.put("max.poll.interval.ms", "2000");
}
return config;
}
use of io.smallrye.reactive.messaging.kafka.base.KafkaMapBasedConfig in project smallrye-reactive-messaging by smallrye.
the class KafkaSourceWithLegacyMetadataTest method myKafkaSourceConfig.
private KafkaMapBasedConfig myKafkaSourceConfig(String topic, String group) {
KafkaMapBasedConfig config = kafkaConfig("mp.messaging.incoming.data");
config.put("group.id", group);
config.put("value.deserializer", IntegerDeserializer.class.getName());
config.put("enable.auto.commit", "false");
config.put("auto.offset.reset", "earliest");
config.put("topic", topic);
return config;
}
use of io.smallrye.reactive.messaging.kafka.base.KafkaMapBasedConfig in project smallrye-reactive-messaging by smallrye.
the class KafkaSinkTest method testConnectorWithMultipleUpstreams.
@Test
public void testConnectorWithMultipleUpstreams() {
ConsumerTask<String, Integer> consumed = companion.consumeIntegers().fromTopics(topic, 20);
KafkaMapBasedConfig config = getKafkaSinkConfigWithMultipleUpstreams(topic);
runApplication(config, BeanWithMultipleUpstreams.class);
await().until(this::isReady);
await().until(this::isAlive);
assertThat(consumed.awaitCompletion(Duration.ofMinutes(1)).count()).isEqualTo(20);
assertThat(consumed.getRecords()).extracting(ConsumerRecord::value).contains(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19);
}
use of io.smallrye.reactive.messaging.kafka.base.KafkaMapBasedConfig in project smallrye-reactive-messaging by smallrye.
the class KafkaSinkWithLegacyMetadataTest method getKafkaSinkConfigForRecordProducingBean.
private KafkaMapBasedConfig getKafkaSinkConfigForRecordProducingBean(String t) {
KafkaMapBasedConfig config = kafkaConfig("mp.messaging.outgoing.output-record");
config.put("key.serializer", IntegerSerializer.class.getName());
config.put("value.serializer", StringSerializer.class.getName());
if (t != null) {
config.put("topic", t);
}
return config;
}
use of io.smallrye.reactive.messaging.kafka.base.KafkaMapBasedConfig in project smallrye-reactive-messaging by smallrye.
the class KafkaSinkWithLegacyMetadataTest method getKafkaSinkConfigWithMultipleUpstreams.
private KafkaMapBasedConfig getKafkaSinkConfigWithMultipleUpstreams(String t) {
KafkaMapBasedConfig config = kafkaConfig("mp.messaging.outgoing.data");
config.put("key.serializer", StringSerializer.class.getName());
config.put("value.serializer", IntegerSerializer.class.getName());
config.put("merge", true);
if (t != null) {
config.put("topic", t);
}
return config;
}
Aggregations