{"_id":"571524453b689d20001d211b","user":"5564f227f0f70f0d00a9ab20","__v":6,"version":{"_id":"57151dca3b689d20001d2102","project":"57151dca3b689d20001d20ff","hasDoc":true,"hasReference":true,"__v":2,"createdAt":"2016-04-18T17:47:54.351Z","releaseDate":"2016-04-18T17:47:54.351Z","categories":["57151dca3b689d20001d2103","5715202cb54f5c19007686f4"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"5715202cb54f5c19007686f4","version":"57151dca3b689d20001d2102","__v":0,"project":"57151dca3b689d20001d20ff","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-04-18T17:58:04.124Z","from_sync":false,"order":9999,"slug":"messages","title":"Messages"},"project":"57151dca3b689d20001d20ff","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-04-18T18:15:33.441Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"Meshblu AMQP uses a special link in order to send you your Meshblu messages. You send an initial command of 'ConnectFirehose' to the 'meshblu.firehose.request' subject and a `replyTo` subject. This will allow Meshblu to properly route your messages to your expected AMQP link.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"properties:\\n  subject: 'meshblu.firehose.request'\\n  correlationId: '71027de4-f6ed-4431-b548-679fd1f5c154'\\n  replyTo: 'ca3b867c-cc46-4d40-a2b7-34259690dc38.firehose'\\napplicationProperties:\\n  jobType: 'ConnectFirehose'\\n  toUuid: 'ca3b867c-cc46-4d40-a2b7-34259690dc38'\",\n      \"language\": \"coffeescript\",\n      \"name\": \"Example Request (in CSON)\"\n    }\n  ]\n}\n[/block]\nThe server will then process the message, and begin streaming messages to your link.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"properties:\\n  subject: 'ca3b867c-cc46-4d40-a2b7-34259690dc38.response'\\n  correlationId: '71027de4-f6ed-4431-b548-679fd1f5c154'\\napplicationProperties:\\n  statusCode: 200\\n  route: [\\n    {\\n\\t    from:'ca3b867c-cc46-4d40-a2b7-34259690dc38'\\n      to: 'ca3b867c-cc46-4d40-a2b7-34259690dc38'\\n      type: 'message.sent'\\n    }\\n  ]\\nbody: '{\\\"devices\\\":[\\\"ca3b867c-cc46-4d40-a2b7-34259690dc38\\\"],\\\"payload\\\":\\\"hi\\\"}'\",\n      \"language\": \"coffeescript\",\n      \"name\": \"Example Message (in CSON)\"\n    }\n  ]\n}\n[/block]\nSee the [Firehose](https://meshblu.readme.io/docs/firehose) documentation for more information on the metadata information.","excerpt":"","slug":"receive-meshblu-messages","type":"basic","title":"Receive Meshblu Messages"}

Receive Meshblu Messages


Meshblu AMQP uses a special link in order to send you your Meshblu messages. You send an initial command of 'ConnectFirehose' to the 'meshblu.firehose.request' subject and a `replyTo` subject. This will allow Meshblu to properly route your messages to your expected AMQP link. [block:code] { "codes": [ { "code": "properties:\n subject: 'meshblu.firehose.request'\n correlationId: '71027de4-f6ed-4431-b548-679fd1f5c154'\n replyTo: 'ca3b867c-cc46-4d40-a2b7-34259690dc38.firehose'\napplicationProperties:\n jobType: 'ConnectFirehose'\n toUuid: 'ca3b867c-cc46-4d40-a2b7-34259690dc38'", "language": "coffeescript", "name": "Example Request (in CSON)" } ] } [/block] The server will then process the message, and begin streaming messages to your link. [block:code] { "codes": [ { "code": "properties:\n subject: 'ca3b867c-cc46-4d40-a2b7-34259690dc38.response'\n correlationId: '71027de4-f6ed-4431-b548-679fd1f5c154'\napplicationProperties:\n statusCode: 200\n route: [\n {\n\t from:'ca3b867c-cc46-4d40-a2b7-34259690dc38'\n to: 'ca3b867c-cc46-4d40-a2b7-34259690dc38'\n type: 'message.sent'\n }\n ]\nbody: '{\"devices\":[\"ca3b867c-cc46-4d40-a2b7-34259690dc38\"],\"payload\":\"hi\"}'", "language": "coffeescript", "name": "Example Message (in CSON)" } ] } [/block] See the [Firehose](https://meshblu.readme.io/docs/firehose) documentation for more information on the metadata information.