Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
Labels (1)
avatar
Master Guru

Using MQTT From MiniFi Java Agent

From a standard Apache NiFi 1.5 download.

Copy

  • nifi-standard-services-api-nar-1.5.0.3.1.1.0-35.nar
  • nifi-mqtt-nar-1.5.0.3.1.1.0-35.nar

To minifi 0.40. lib directory.

PublishMQTT


Publish Sensor Data Via MQTT

64999-minifijetsonflow1.png

This is our example MiniFi flow. We can drop out the GetFile (to grab images) and push to NiFi Flow if we just want to do a simple MQTT use case.

64998-configuremqtt.png

I am using CloudMQTT, you can use any MQTT broker like Mosquitto or HiveMQ.


Ingest in Apache NiFi 1.5

64996-mqttingest.png

We can process data from MQTT and/or standard Apache NiFi S2S HTTPS.

64997-minifiprocessingjetson.png

Processing continues as regular. I add another route for mqtt source.

References:

If you are doing SSL, see https://community.hortonworks.com/articles/47854/accessing-facebook-page-data-from-apache-nifi.html

2,988 Views
Comments

I am getting below error :2018-11-12 16:37:28,189 WARN [pool-2-thread-1] o.a.n.m.b.c.i.PullHttpChangeIngestor Hit an exception while trying to pull http://java.net.ConnectException: Failed to connect to /127.0.0.1:10080 Jira tkt for the same issuehttp://mail-archives.apache.org/mod_mbox/nifi-commits/201805.mbox/%3CJIRA.13157686.1525721467000.15178.1525721820467@Atlassian.JIRA%3E

How to resolve above issue.Please help.