Skip to content

Gateway Module ​

提示

The gateway module was introduced in version 2.0. It brings together protocol decoding and encoding, data forwarding, data calculation, and persistent storage.

Module Overview ​

The gateway module is responsible for processing device-side data before it enters the business system. It decodes protocol packets, normalizes messages, forwards data to the correct channel, and supports later calculation and persistence.

Module Overview
  • gateway-boot is the gateway startup module.
  • fastbee-mq is the core gateway message module.

Gateway Data Entry ​

Device data enters the gateway through the protocol access layer, then flows into the message channel for parsing, routing, and consumption.

Gateway Data Entry

Message Queue Modes ​

The gateway message layer supports two modes:

  1. redisChannel with a local queue.
  2. RocketMQ.

The mode is switched through configuration. redisChannel is used by default.

yml
cluster:
  enable: true
  type: redis
Message Queue Modes

Redis Channel Flow ​

After data is forwarded through the data interface, it is distributed by channel. The following diagrams use redisChannel as the example.

Register the required channels:

Redis Channel Flow

Distribute messages after they enter the channel:

Redis Channel Flow

Finally, messages enter the consumer queue where business data processing is performed.

Redis Channel Flow

FastBee | fastbee.cn