Bi-direction MQTT Data Bridge Loop Issue

I need help to setup ingress and egress MQTT data bridge please.

tldl; having ingress and egress setup causes a message loop.

I’m just set up Solar Assistant which uses Mosquitto and I’m trying to bridge it to EMQX 5.0 where Home Assistant connects to.

Following this guide for Mosquitto to Mosquitto I was able to setup ingress with the following settings in the UI:

Remote MQTT Broker:
Topic: #
QoS: 0

Local MQTT Broker
Topic: ${topic}
QoS: $(qos)
Retain: false
Payload: ${payload}

An restart later and it’s receiving messages.

Egress settings:

Remote MQTT Broker:
Topic: ${topic}
QoS: $(qos)
Retain: false
Payload: ${payload}

Local MQTT Broker:
Topic: solar_assistant/#

TIA.