The traffic between modules is separated by default, by using separate configurations.
The upstream protocol configuration is part of the container create options and environment variables of the EdgeHub.
In the create options, alternative ports can be set.
In the environment variables, you can disable unused (or unwanted) protocols
amqpSettings__enabled
mqttSettings__enabled
httpSettings__enabled
(Note: the formatting corrupts the double underscored needed!)
Keep in mind that this must be on par with the initial edgeAgent settings within the config,yaml. If you want to use eg. WebSockets, you need to specify is there also.