Skip to content

Commit

Permalink
group id test
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitolo-Andrea committed Jan 15, 2025
1 parent 2e75cc1 commit 56afa5a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions src/main/java/it/gov/pagopa/notifier/EmdNotifierSender.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 56afa5a

Please sign in to comment.