'is it possible to prioritize orderer when submitting transactions through fabric-sdk-node?

I'm writing a fabric client application using nodejs and the latest fabric-network library. I have setup multiple orderer nodes running in VMs and want to prioritize which orderer node to be used when submitting transactions.

I wrote my own connection profile including the above orderer nodes and let the application use it to create gateway object. Then, I'm calling transaction#submit method to execute transactions. I want to use the nearest orderer node from the application but I don't know if it's possible.

I read through fabric-skd-node source code and found that commitment procedure is done at Commit.js#send method and it pick the first healthy orderer node from the orderer list retrieved using Channel.js#getTargetCommitters method. So, my rough guess is that the first orderer node listed in connection profile is used if it's connectable.

Please correct me if I'm wrong, I'd be very grateful.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source