weida / nginx_mqtt_preread_module

get some information from the CONNECT message of MQTT
GNU Affero General Public License v3.0
2 stars 1 forks source link

Is it possible to preread pub/sub request and forward to different MQTT broker? #1

Open tsigcn opened 2 months ago

tsigcn commented 2 months ago

I have seen that nginx_mqtt_preread_module can read mqtt_conn infomation well. So is it possible for nginx to preread pub/sub request and forward them to different MQTT broker in one connection?

For example, pub request forward to port 1883 and sub request forward to port 8883?

Thanks and regards.

weida commented 2 weeks ago

NGINX doesn't support dynamic upstream selecttion based on message types by default, Additionally, you will need to manage long connections for each broker to ensure efficient reuse, which reuires developing or extending the stream module.