Learning Cloud Foundry - NATS
All Cloud Foundry components communicates with each other using NATS publish-subscribe mechanism. Lets see in detail what is NATS like. Cloud Foundry Router as NATS client During startup of Cloud Foundry Router ( router.rb ), there is a call to start NATS client below : NATS . start ( :uri => config [ 'mbus' ] ) It means that NATS client will be started with the uri parameter obtained from configuration parameter 'mbus'. config_path = ENV [ "CLOUD_FOUNDRY_CONFIG_PATH" ] || File . join ( File . dirname ( __FILE__ ), '../config' ) config_file = File . join ( config_path , 'router.yml' ) ... opts . on ( "-c" , "--config [ARG]" , "Configuration File" ) do | opt | config_file = opt end ... We find that the configuration parameter will be read from a YAML (yet Another Markup Language) that whose location could came from multiple sources, in these order : specified fro...