The various MQTT settings are not relevant when the gateway is used with TTN
When used with TTN, the gateway’s only role is to exchange data between the UDP protocol and the radio.
In that case, the gateway has no knowledge of applications or devices at all, it merely passes packets between the Internet and the airwaves which it has no ability to decode or understand. When using TTN applications and device are things you work out between you nodes, the TTN servers, and any software you interface to TTN. So for example, if you want to use MQTT with TTN to get your application data, you would be using TTN’s MQTT, which is entirely distinct from the fact that the gateway uses its own MQTT when running in self-contained (non TTN) mode.