Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fixing AMQJS0008I Socket closed error in PAHO JS + Activemq

Sometimes I am getting AMQJS0008I Socket closed error very frequently on onConnectionLost. I am using latest Activemq version.

Does it happens because of some wrong formatted message received because sometime it go all messages nicely and sometimes in between it show the error

like image 562
Manish Kumar Avatar asked Mar 17 '16 18:03

Manish Kumar


1 Answers

I was receiving this message when the user that I logged in with did not have permission to access a topic that I tried to subscribe to.

The easiest solution to try would be to make sure that the user your MQTT client is connecting with has permission to read that topic if the client is subscribing. If the client is trying to publish then make sure that user has permission to write to that topic.

If you have already added the necessary permissions then make sure you have typed the topic name correctly.

like image 188
Brandon Avatar answered Oct 15 '22 17:10

Brandon