feature: add bank account mongo projection

This commit is contained in:
Alexander
2022-04-14 10:20:51 +03:00
parent 0e1f096542
commit fbab3a0f23

View File

@@ -27,6 +27,7 @@ public class BankAccountMongoProjection {
groupId = "${microservice.kafka.groupId}",
concurrency = "${microservice.kafka.default-concurrency}")
public void bankAccountMongoProjectionListener(@Payload byte[] data, ConsumerRecordMetadata meta, Acknowledgment ack) {
log.info("(BankAccountMongoProjection) topic: {}, offset: {}, partition: {}, timestamp: {}", meta.topic(), meta.offset(), meta.partition(), meta.timestamp());
log.info("(BankAccountMongoProjection) data: {}", new String(data));
try {
@@ -35,6 +36,7 @@ public class BankAccountMongoProjection {
log.info("ack events: {}", Arrays.toString(events));
} catch (Exception e) {
ack.nack(100);
log.error("(BankAccountMongoProjection) topic: {}, offset: {}, partition: {}, timestamp: {}", meta.topic(), meta.offset(), meta.partition(), meta.timestamp());
log.error("bankAccountMongoProjectionListener: {}", e.getMessage());
}
}