String topic,
Producer<String, AbstractMessageTo> producer,
Consumer<String, AbstractMessageTo> infoChannelConsumer,
+ int numShards,
URI instanceUri)
{
log.debug(
this.producer = producer;
this.chatRoomInfo = new HashMap<>();
- this.numShards = consumer
- .partitionsFor(topic)
- .size();
+ this.numShards = numShards;
this.shardOwners = new String[numShards];
this.currentOffset = new long[numShards];
this.nextOffset = new long[numShards];