Skip to content

Instantly share code, notes, and snippets.

@ddossot
Last active December 16, 2015 09:49
Show Gist options
  • Save ddossot/5415856 to your computer and use it in GitHub Desktop.
Save ddossot/5415856 to your computer and use it in GitHub Desktop.
<configuration>
<expression-language>
<global-functions file="qrcode_data_to_map.mel" />
</expression-language>
</configuration>
<mqtt:config name="mqttClient"
brokerServerUri="${mqttBrokerServerUri}"
clientId="booth-reader-${boothId}">
<reconnect-forever frequency="5000" />
</mqtt:config>
<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" />
<logger level="INFO"
message="Booth ${boothId} has scanned attendee #[attendeeId]" />
</flow>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment