diff --git a/src/main/java/it/gov/pagopa/notifier/EmdNotifierSender.java b/src/main/java/it/gov/pagopa/notifier/EmdNotifierSender.java index 0806c6a..c44fd76 100644 --- a/src/main/java/it/gov/pagopa/notifier/EmdNotifierSender.java +++ b/src/main/java/it/gov/pagopa/notifier/EmdNotifierSender.java @@ -16,14 +16,6 @@ public class EmdNotifierSender { public static void main(String[] args) { - SpringApplication application = new SpringApplication(EmdNotifierSender.class); - application.addInitializers(applicationContext -> { - ConfigurableEnvironment environment = applicationContext.getEnvironment(); - String dynamicGroup = "consumer-group-" + UUID.randomUUID(); - environment.getSystemProperties().put("KAFKA_MESSAGE_CORE_GROUP_IN_TEST", dynamicGroup); - log.info("Dynamically set Kafka group: " + dynamicGroup); - }); - SpringApplication.run(EmdNotifierSender.class, args); } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index ece6e75..1a0113c 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -60,7 +60,7 @@ spring: binder: kafka-message-core-in content-type: ${KAFKA_CONTENT_TYPE:application/json} destination: ${KAFKA_TOPIC_MESSAGE_CORE:emd-courtesy-message} - group: ${KAFKA_MESSAGE_CORE_GROUP_IN_TEST} + group: ${POD_NAME}-${NAMESPACE} messageSender-out-0: binder: kafka-message-core-out content-type: ${KAFKA_CONTENT_TYPE:application/json}