Hi Michal,
I tried the above command and got this result:
rabbitmqctl list_bindings --vhost vhost_name
Listing bindings for vhost vhost_name...
source_name source_kind destination_name destination_kind routing_key arguments
exchange mqtt-subscription-ClientID1qos1 queue mqtt-subscription-ClientID1qos1 []
exchange mqtt-subscription-ClientID2qos1 queue mqtt-subscription-ClientID2qos1 []
The above bindings automatically occured during first time "connect" only. I don't do any subscription when connecting the client to broker.
Not sure why, I didn't get the "amq.topic" under "source_name". But that's ok, because it's working though, by publishing the message using the appropriate routing_key to get to the specific client.
The problem is, when I subscribe from MQTT Client to "vhost_name/fanout/ClientID1" from client2 (client3, client4, etc), I don't see any binding using the above command. Perhaps there is a problem with the MQTT client part, I'll find out about that.
That's why I tried the "exchange-to-queue" bindings using the REST API, to make sure when I publish the message to
"vhost_name.fanout.ClientID1" exchange, all the bounded clients' queues will receive the message. Unfortunately, I don't know how to UNBIND it.
Regards,
Jac