YIDWang / bifrost

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bifrost

A MQTT message broker based on MQTT v3.1.1

Why Bifrost?

  • Completely compatible with mqtt protocol
  • Multi-tenancy support
  • No painful scale out
  • High availability
  • Flexible business callback

Support Functions

  • Retain message
  • QoS 1,0 message
  • Will message

Architecture

bifrost

  • connd: the session layer manages the flow of client state.
  • pushd: the business layer implements business callbacks and data persistence
  • etcd cluster: service discovery, routing metadata store.
  • DB : user state storage, support two types of tikv, redis storage.

Quick Start

Building the base environment

Etcd

  • nohup etcd > etcd.log 2>&1 &

To setup etcd , please follow official instruction

Redis

  • nohup redis-server > redis.log 2>&1 &

To setup redis, please follow official instruction

Run Bifrost

  1. GO111MODULE=on sh release.sh
  2. cd bifrost
  3. nohup bin/pushd -c conf/pushd.toml > pushd.log 2>&1 &
  4. nohup bin/connd -c conf/connd.toml > connd.log 2>&1 &

Test

  1. cd misc/example/ && go build
  2. ./message_test_a2a

Example

You can refer to directory 1 (misc/linktest) and directory 2 (misc/example)

About

License:Apache License 2.0


Languages

Language:Go 99.3%Language:Shell 0.6%Language:Dockerfile 0.1%Language:Makefile 0.0%