java.io.EOFException with paho

后端 未结 7 1455
慢半拍i
慢半拍i 2021-02-09 11:23

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:13

    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.

提交回复
热议问题