Skip to content

Send Broadcast Message

sqrtofsaturn edited this page Apr 4, 2016 · 3 revisions

Sending a message from device to device creates a series of jobs in Meshblu Core.

Basic Rules:

  • Only publish to Redis in *Received jobs
  • Subscription* jobs can only create other Subscription* jobs
  • *Receieved jobs can only create *Received jobs

Scenario: Device A broadcasts a message, Device B is subscribed to A

Meshblu Message

devices: ["*"]
payload: "HI"

Device A Configuration

meshblu:
  whitelists:
    broadcast:
      received: B: {}

Subscriptions

A Device must explicitly subscribe to any message type it wants to receive in the Firehose.

emitterUuid: "A"
subscriberUuid: "B"
type: "broadcast.sent"

emitterUuid: "B"
subscriberUuid: "B"
type: "broadcast.received"

Scenario: Device A broadcasts a message, Device B is subscribed to A, Device C is subscribed to B

Meshblu Message

devices: ["*"]
payload: "HI"

Device A Configuration

meshblu:
  whitelists:
    broadcast:
      received: B: {}

Device B Configuration

meshblu:
  whitelists:
    broadcast:
      received: C: {}

Subscriptions

A Device must explicitly subscribe to any message type it wants to receive in the Firehose.

emitterUuid: "A"
subscriberUuid: "B"
type: "broadcast.sent"

emitterUuid: "B"
subscriberUuid: "B"
type: "broadcast.received"

emitterUuid: "B"
subscriberUuid: "C"
type: "broadcast.received"