Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Apache nifi : MQTT Bokerr consumer need help

Highlighted

Apache nifi : MQTT Bokerr consumer need help

New Contributor

Hello all ,

I am struggling in configuring mqtt consumer process . i am able to get stream data in command prompt by using mosquitto_sub -t "*******" -d -h ******* -p 8883 --psk ****** --psk-identity ****** --insecure --tls-version tlsv1 .....

these parameters are optional --insecure --tls-version tlsv1 , without them mosquitto_sub is working fine.

Now i am using nifi to subcribe mqtt broker but strugglinng in it. please note here psk and psk-identity is compulsory without these we cannot connect to broker.

i am assuming psk and psk-identity as username and password but i tried without them also but got error

Please guide me if some one can

Thanks

91392-112233.png

91391-1233.png

1 REPLY 1

Re: Apache nifi : MQTT Bokerr consumer need help

New Contributor

Hi Inam,

Please find below link for reference :

https://community.hortonworks.com/articles/178747/mqtt-with-apache-nifi.html (I have tested it and worked fine for me)

Also as you are using psk-identity please check for "use_identity_as_username" value in your mosquitto.conf file.

I am not very much sure about psk-identity but you can use mosquitto_passwd to set password for particular user and redirect the password to a file which file can be used for authentication to publish MQTT messages.