Skip to content

Commit

Permalink
extend logging for unsubscribing from pubsub;
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
  • Loading branch information
Stefan Maute committed Sep 9, 2022
1 parent 9415fd9 commit 6d99389
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,15 @@ private void decrementQueryCounter(final Control decrementOpCounter) {
}

private void serviceUnbind(final Control serviceUnbind) {
log.info("{}: unsubscribing from pubsub", serviceUnbind);
log.info("{}: unsubscribing from pubsub for {}", serviceUnbind, ACTOR_NAME);
final var unsubscribe =
DistPubSubAccess.unsubscribeViaGroup(ThingSearchCommand.TYPE_PREFIX, ACTOR_NAME, getSelf());
final var unsubscribeTask =
Patterns.ask(pubSubMediator, unsubscribe, SHUTDOWN_ASK_TIMEOUT).thenApply(ack -> Done.getInstance());
Patterns.ask(pubSubMediator, unsubscribe, SHUTDOWN_ASK_TIMEOUT)
.thenApply(ack -> {
log.info("{}: unsubscribing from pubsub completed successful for {}", ack, ACTOR_NAME);
return Done.getInstance();
});
Patterns.pipe(unsubscribeTask, getContext().getDispatcher()).to(getSender());
}

Expand Down

0 comments on commit 6d99389

Please sign in to comment.