added support for multiple ports in the mock exchange