docs: @Override
      public void setPartitions(Partitions partitions) {
  
          boolean reconfigurePartitions = false;
  
          synchronized (stateLock) {
              if (this.partitions != null) {
                  reconfigurePartitions = true;
              }
              this.partitions = partitions;
              this.connectionFactory.setPartitions(partitions);
          }
  
          if (reconfigurePartitions) {
              reconfigurePartitions();
          }
      }