java.io.EOFException with paho

后端 未结 7 885
感动是毒
感动是毒 2021-02-09 11:47

i want to make stress test on mosquitto, so i create some code as below

for (int i = 0; i < 800; i++) {
        final int j = i;
        Thread t = new Thread         


        
7条回答
  •  我在风中等你
    2021-02-09 12:11

    In my case this was because I was accidentally using a tcp://... URL instead of ssl://... and the server was configured not to allow insecure connections.

    I also had to do as @Aidan said and reduce the QoS from 2 to 1.

    Edit: I'm not 100% sure, but I think the server I'm using is RabbitMQ, and that assigns a non-standard meaning to the QoS values. It's probably a more sensible meaning to be honest:

    Transient (QoS0) subscription use non-durable, auto-delete queues that will be deleted when the client disconnects.

    Durable (QoS1) subscriptions use durable queues. Whether the queues are auto-deleted is controlled by the client's clean session flag. Clients with clean sessions use auto-deleted queues, others use non-auto-deleted ones.

提交回复
热议问题