Beerules Engine

Beebotte Beerules are trigger - condition - action rules that allow to create business logic on messages as they go through Beebotte network.

When Beebotte receives a message or an event corresponding to a Beerule trigger, the Beerule condition gets evaluated. If the condition is satisfied, then the Beerule action is executed.

Beerules allow to:

  • route messages between channels in real time
  • filter messages as they pass through Beebotte network
  • call webhooks when specific events happen
  • notify when a sensor reports anomalous reading like high temperature, low pressure, etc.

What is a Beerule

A Beerule is composed of three parts: trigger, condition, and, action.

trigger can be any message or connection event including:

  • publish a message being published to a given channel
  • write a message written to a given channel resource
  • connect a WebSocket or MQTT client connection to a user's account
  • disconnect a client disconnection
  • subscribe a Websocket or MQTT subscription event to a channel
  • unsubscribe an unsubscribe event from a channel/resource
  • join a Websocket subscription to a presence channel
  • leave an unsubscribe event from a presence channel

condition optional condition to be satisfied in order for the rule's action to be executed. The condition is a true/false expression applied on the event data or metadata.

action an action to perform if the condition is satisfied. It can be one of:

  • write writes a message to a given Beebotte channel/resource
  • publish publishes a message to a given channel/resource
  • webhookcalls a webhook on an external system. This enables integration with a wide set of applications.