From 6c6975518ce839a6a77b4435c8cddc0fb147b72b Mon Sep 17 00:00:00 2001
From: Allain Magyar <allain.magyar@iohk.io>
Date: Wed, 20 Nov 2024 15:44:40 -0300
Subject: [PATCH] fix: revert changes

Signed-off-by: Allain Magyar <allain.magyar@iohk.io>
---
 cloud-agent/service/server/src/main/resources/logback.xml      | 3 +++
 .../shared/messaging/kafka/ZKafkaMessagingServiceImpl.scala    | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/cloud-agent/service/server/src/main/resources/logback.xml b/cloud-agent/service/server/src/main/resources/logback.xml
index 9121c1c22d..a91551a3d1 100644
--- a/cloud-agent/service/server/src/main/resources/logback.xml
+++ b/cloud-agent/service/server/src/main/resources/logback.xml
@@ -13,6 +13,9 @@
   <logger name="io.getquill" level="WARN">
     <appender-ref ref="STDOUT" />
   </logger>
+  <logger name="org.apache.kafka.clients" level="WARN">
+    <appender-ref ref="STDOUT" />
+  </logger>
   <root level="info">
     <appender-ref ref="STDOUT"/>
   </root>
diff --git a/shared/core/src/main/scala/org/hyperledger/identus/shared/messaging/kafka/ZKafkaMessagingServiceImpl.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/messaging/kafka/ZKafkaMessagingServiceImpl.scala
index 9180fc4d62..14e5ab0491 100644
--- a/shared/core/src/main/scala/org/hyperledger/identus/shared/messaging/kafka/ZKafkaMessagingServiceImpl.scala
+++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/messaging/kafka/ZKafkaMessagingServiceImpl.scala
@@ -9,6 +9,7 @@ import zio.kafka.consumer.{
   ConsumerSettings as ZKConsumerSettings,
   Subscription as ZKSubscription
 }
+import zio.kafka.consumer.Consumer.{AutoOffsetStrategy, OffsetRetrieval}
 import zio.kafka.producer.{Producer as ZKProducer, ProducerSettings as ZKProducerSettings}
 import zio.kafka.serde.{Deserializer as ZKDeserializer, Serializer as ZKSerializer}
 
@@ -80,7 +81,7 @@ class ZKafkaConsumerImpl[K, V](
         .withMaxPollInterval(maxPollInterval) // Should be max.poll.records x 'max processing time per record'
         // 'pollTimeout' default is 50 millis. This is a ZIO Kafka property.
         .withPollTimeout(pollTimeout)
-        // .withOffsetRetrieval(OffsetRetrieval.Auto(AutoOffsetStrategy.Earliest))
+        .withOffsetRetrieval(OffsetRetrieval.Auto(AutoOffsetStrategy.Earliest))
         .withRebalanceSafeCommits(rebalanceSafeCommits)
         // .withMaxRebalanceDuration(30.seconds)
     )