node-red-contrib-routing 1.1.0

A Node-RED node to route incoming messages based on their topics.

npm install node-red-contrib-routing

node-red-contrib-routing

A Node-RED node to route incoming messages based on their topics.

It is inspired by Ruby on Rails' routing and Express.js' routing. It uses rlite to match a message to a single route.

Example

Routes
  • iot/:sensor/humidity
  • iot/:sensor/temperature
  • traffic
Incomming message
{
    "topic": "iot/AJ08/humidity",
    "payload": "18"
}

Output

Will match the route iot/:sensor/humidity and the forwarded message will be :

{
    "topic": "iot/AJ08/humidity",
    "payload": "18",
    "params": {
        "sensor": "AJ08"
    }
}

Node Info

Version: 1.1.0
Updated 7 years, 6 months ago
License: Apache-2.0
Rating: not yet rated

Categories

Actions

Rate:

Downloads

6 in the last week

Nodes

  • routing

Keywords

  • node-red
  • routing
  • router
  • rlite

Maintainers