Closed rozaydin closed 6 years ago
I don't think it's intentional but without a way to reproduce I would rather not speculate. Can you provide a way to reproduce?
Also, in practice this plugin is used together with rabbitmq-auth-backend-cache which masks this behavior entirely.
I can reproduce this and am investigating why.
@rozaydin our working theory is that the MQTT plugin performs at least two operations when you begin consuming since it has to check for queue existence (and thus establish whether there's an existing session state). In that case it is expected that two authorization checks are performed.
@michaelklishin @rozaydin - yep, that is what is happening. This is the code that executes for a new subscription. Notice here that topic authorization is checked, and then the queue is declared and consumed from here, which will cause another check. I've attached a trace here:
Please use the cache backend to "resolve" this issue. Thanks!
Hi @michaelklishin @lukebakken, Thanks a lot for the clarification. Knowing that why it is behaving this way is a lot better. (I will enable the cache plugin as well)
Hello,
We are using the auth-backend-http along with mqtt plugin, everything is working fine, but we realized one thing. Whenever we sent an MQTT "Subscribe" or "Publish" the auth-backend-http is sending request to /auth/topic endpoint twice with same contents. Is there a specific reason why its doing this ?
You can find a wireshark capture from the machine, and a screenshot attached.
duplicate-msgs-pcap.zip
Thanks is advance