Skip to content

Commit

Permalink
create kafka topics
Browse files Browse the repository at this point in the history
  • Loading branch information
surabhi-mahawar committed Aug 9, 2022
1 parent 6e772e6 commit 7d9a623
Showing 1 changed file with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ public class AppConfigOrchestrator {
@Value("${inboundProcessed}")
private String inboundProcessedTopic;

@Value("${broadcast-transformer}")
private String broadcastTransformerTopic;

@Value("${generic-transformer}")
private String genericTransformerTopic;

@Autowired
public Cache<Object, Object> cache;

Expand Down Expand Up @@ -149,11 +155,33 @@ KafkaTemplate<String, String> kafkaTemplate() {
return (KafkaTemplate<String, String>) kafkaTemplate;
}

/**
* Create process outbound topic, if does not exists
* @return
*/
@Bean
public NewTopic topic1() {
public NewTopic createProcessOutboundTopic() {
return new NewTopic(processOutboundTopic, 1, (short) 1);
}


/**
* Create broadcast transformer topic, if does not exists
* @return
*/
@Bean
public NewTopic createBroadcastTransformerTopic() {
return new NewTopic(broadcastTransformerTopic, 1, (short) 1);
}

/**
* Create generic transformer topic, if does not exists
* @return
*/
@Bean
public NewTopic createGenericTransformerTopic() {
return new NewTopic(genericTransformerTopic, 1, (short) 1);
}

// @Bean
// public HealthService healthService() {
// return new HealthService();
Expand Down

0 comments on commit 7d9a623

Please sign in to comment.