How to setup MQTT broker for read/write data via MQTTPUB/MQTTSUB block on Altair Activate

Aditap Khongjun_21800
Aditap Khongjun_21800 Altair Community Member
edited September 2022 in Community Q&A

I try to send/receive data via MQTTPUB and MQTTSUB with mqtt example file in Activate 

image

MQTT broker that I use is mosquitto broker 

image

When I run example to publish and subscribe data, then the error will occur that "Connection Refused: identifier rejected".

On Broker say that "Bad socket read/write on client MQTTPUB: Invalid arguments provided."

image 

image

I don't know why and how to solve it.

Could you please tell me why this problem occur and how to setup mosquitto mqtt broker to solve this problem?

 

Answers

  • João Marabisa
    João Marabisa
    Altair Employee
    edited September 2022

    Hi Aditap Khongjun,

    Could you please try to increase "Keep Alive" value on MQTTPUB block?

    image

    Thanks,

    João.