Commit 8920f55a authored by Alex Pinto's avatar Alex Pinto

added logger on kafka

parent 63ccba08
......@@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: afp-warehouse-container
image: nexus.mynisum.com/afp-warehouse-backend:11
image: nexus.mynisum.com/afp-warehouse-backend:12
imagePullPolicy: Always
ports:
- containerPort: 8088
......
......@@ -40,7 +40,7 @@ public class Receiver {
log.error("Caught error", e);
}
})
.doOnError(throwable -> System.out.println(throwable.getMessage()))
.doOnError(throwable -> log.info("Receiver: {}", throwable.getMessage()))
.subscribe();
}
}
......@@ -28,7 +28,7 @@ public class Sender {
private static final String OMS = "OMS_ORDER_UPDATE";
public void sendOrder(WarehouseOrderRequest currentOrder) {
ProducerRecord<String, WarehouseOrderRequest> record = new ProducerRecord<>(TOPIC, currentOrder);
ProducerRecord<String, WarehouseOrderRequest> record = new ProducerRecord<>(OMS, currentOrder);
Flux<SenderResult<WarehouseOrderRequest>> sendToKafka = kafkaOMSProducer.send(Mono.just(SenderRecord.create(record, currentOrder)))
.doOnError(throwable -> System.out.println(throwable))
.doOnNext(t -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment