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

(cherry picked from commit 2cef43d)
  • Loading branch information
OleksandrVidinieiev committed Apr 8, 2021
1 parent 0dd3314 commit cdf07a9
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 cdf07a9

Please sign in to comment.