Skip to content

Instantly share code, notes, and snippets.

@ddossot
Created May 7, 2013 22:59
Show Gist options
  • Save ddossot/5536875 to your computer and use it in GitHub Desktop.
Save ddossot/5536875 to your computer and use it in GitHub Desktop.
<flow name="fileToMqttBridge">
<file:inbound-endpoint path="/tmp/mule/in" />
<object-to-string-transformer />
<!-- extract attendee info and transform to JSON payload -->
<expression-transformer
expression="#[extractAttendeeData(message.payload, '${boothId}')]" />
<json:object-to-json-transformer />
<mqtt:publish topicName="scans/booths" />
<blink1:start-pattern deviceId="${blink1.device.id}" />
<logger level="INFO"
message="Booth ${boothId} has scanned attendee #[attendeeId]" />
<expression-component>Thread.sleep(1000);</expression-component>
<blink1:stop-pattern deviceId="${blink1.device.id}" />
<blink1:set-color deviceId="${blink1.device.id}" color="off" />
</flow>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment