GitXplorerGitXplorer
a

spring-int-mqtt

public
30 stars
3 forks
0 issues

Commits

List of commits on branch master.
Unverified
9666f129f8ff3da986346c305aae76153a8ea4af

tweaking gitignore

aandypiper committed 11 years ago
Unverified
3de161c5f17de12204d12ab70227e653225cae1d

Updated to Spring Integration 4.0.0.RELEASE

aandypiper committed 11 years ago
Unverified
a89db6e32a83609b88f125abf0261c951d2ad1b2

spring boot rc4

aandypiper committed 11 years ago
Unverified
f9ce4ee0479627bf0105311f7be0440c9bb992ae

Add inbound flow and some other fixes

aandypiper committed 11 years ago
Unverified
f4778fb5adc49c3f8f9c595a62c2751bf211275a

bump to Boot RC3 and start on second flow example

aandypiper committed 11 years ago
Unverified
ba2f2c77d796a170e1568248e520c58f52c32886

Move bean declaration for clientFactory into JavaConfig to match Twitter config

aandypiper committed 11 years ago

README

The README file for this repository.

Using Spring Integration with MQTT

Simple Spring Integration example with MQTT.

Based on the Spring Integration guide. Uses Spring Boot to create a standalone executable jar.

Extends the guide example by:

  • (outbound MQTT) publishing received tweets on an MQTT topic (tweets/spring-integration) on the iot.eclipse.org public test broker, instead of writing to a file. The tweets are published with the retained flag set, QoS 0.
  • (inbound MQTT) subscribing to an MQTT topic (inbound) on the iot.eclipse.org public test broker, and writing messages from there to the file ./si/MQTT_INPUT.

Build

./gradlew build

Run

The Spring Integration app requires that clientId and clientSecret (Twitter app values) are set in the environment, e.g.:

java -DclientId=YourClientId -DclientSecret=YourClientSecret -jar build/libs/mqtt-integration-0.4.0.jar

To obtain the clientId and clientSecret values, create an application on the Twitter Application Management page, and use the API key and API secret values in your environment.

outbound MQTT

To see results, subscribe to the relevant topic, e.g.

mosquitto_sub -h iot.eclipse.org -t "tweets/#" -v

inbound MQTT

To see results, publish to any part of the relevant topic tree, e.g.

mosquitto_pub -h iot.eclipse.org -t "inbound/messages" -m "This is a message"

Then tail the file ./si/MQTT_INPUT - each entry will be prepended with a timestamp and the topic used.