Fixes a couple of things that broke down with the update
This commit is contained in:
@@ -35,7 +35,7 @@ public class ItemEventConsumer {
|
||||
this.eventHandler = eventHandler;
|
||||
}
|
||||
|
||||
@KafkaListener(topics = "${gtd.topic}", groupId = "getting-things-done")
|
||||
@KafkaListener(topics = "${gtd.topic}", groupId = "${gtd.groupId}")
|
||||
public void consume(final AvroItemEvent itemEvent, final Acknowledgment ack) {
|
||||
final ItemEvent event = converter.to(itemEvent);
|
||||
log.debug("Received event {}. Trying to apply it to the latest state of aggregate with ID {}.", event, event.getItemId());
|
||||
|
||||
@@ -24,7 +24,7 @@ public class TransactionalItemEventPublisherConfig {
|
||||
@Bean
|
||||
public ProducerFactory<String, AvroItemEvent> producerFactory() {
|
||||
final Map<String, Object> config = new HashMap<>();
|
||||
config.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "kafka:9092");
|
||||
config.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
|
||||
config.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
|
||||
config.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, ItemEventSerializer.class);
|
||||
config.put(ProducerConfig.MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION, 1);
|
||||
|
||||
@@ -13,7 +13,6 @@ spring:
|
||||
kafka:
|
||||
bootstrapServers: localhost:9092
|
||||
consumer:
|
||||
groupId: getting-things-done-command
|
||||
keyDeserializer: org.apache.kafka.common.serialization.StringDeserializer
|
||||
valueDeserializer: net.mguenther.gtd.kafka.serialization.ItemEventDeserializer
|
||||
autoOffsetReset: earliest
|
||||
@@ -21,9 +20,13 @@ spring:
|
||||
isolationLevel: read_committed
|
||||
listener:
|
||||
ackMode: MANUAL
|
||||
producer:
|
||||
bootstrapServers: localhost:9092
|
||||
transaction-id-prefix: gtd-es
|
||||
|
||||
gtd:
|
||||
topic: topic-getting-things-done
|
||||
groupId: getting-thigns-done-command
|
||||
|
||||
eureka:
|
||||
client:
|
||||
|
||||
Reference in New Issue
Block a user