public void createConsensusPipe(Peer senderPeer, Peer receiverPeer) throws Exception {
    ConsensusPipeName consensusPipeName = new ConsensusPipeName(senderPeer, receiverPeer);
    // The third parameter is only used when region migration. Since this method is not called by
    // region migration, just pass senderPeer in to get the correct result.
    Triple<ImmutableMap<String, String>, ImmutableMap<String, String>, ImmutableMap<String, String>>
        params = buildPipeParams(senderPeer, receiverPeer);
    dispatcher.createPipe(
        consensusPipeName.toString(),
        params.getLeft(),
        params.getMiddle(),
        params.getRight(),
        false);
  }
This method is used except region migration.
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/consensuspipe/ConsensusPipeManager.java