Skip to content

Commit

Permalink
[MODPUBSUB-158] Initialize headers map when registering subscribers d…
Browse files Browse the repository at this point in the history
…uring module initialization
  • Loading branch information
OleksandrVidinieiev committed Apr 7, 2021
1 parent f3cb9b3 commit 2cef43d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.HashMap;

import static org.folio.rest.jaxrs.model.MessagingModule.ModuleRole.SUBSCRIBER;

Expand Down Expand Up @@ -45,6 +46,7 @@ public void initSubscribers() {
OkapiConnectionParams params = new OkapiConnectionParams(vertx);
params.setOkapiUrl(kafkaConfig.getOkapiUrl());
params.setTenantId(messagingModule.getTenantId());
params.setHeaders(new HashMap<>());
kafkaTopicService.createTopics(Collections.singletonList(messagingModule.getEventType()), messagingModule.getTenantId())
.compose(ar -> consumerService.subscribe(Collections.singletonList(messagingModule.getEventType()), params));
});
Expand Down

0 comments on commit 2cef43d

Please sign in to comment.