code: public static void reconfigure(Iterable<QueueName> consumerQueues, long groupId, int instances,
                                   QueueAdmin queueAdmin) throws Exception {
      // Then reconfigure stream/queue
      for (QueueName queueName : consumerQueues) {
        queueAdmin.configureInstances(queueName, groupId, instances);
      }
    }
docs: Reconfigures stream / queue consumer due to instances change.
  
  @param consumerQueues all queues that need to reconfigure
  @param groupId consumer group id
  @param instances consumer instance count