Added support for dynamically assigning service id and shard id to EXS.