infoChannel.sendShardAssignedEvent(partition);
shardingPublisherStrategy
.publishOwnership(partition)
- .map(instanceId -> "Instance "
- + instanceId
- + " was published as owner of shard "
- + partition)
- .doOnError(e -> log.error("Could not publish ownershit for shard " + partition + ": " + e))
+ .doOnNext(instanceId -> log.info(
+ "Instance {} was published as owner of shard {}",
+ instanceId,
+ partition))
.subscribe();
});