All Projects → liftbridge-io → liftbridge-api

liftbridge-io / liftbridge-api

Licence: Apache-2.0 License
Protobuf definitions for the Liftbridge gRPC API. https://github.com/liftbridge-io/liftbridge

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to liftbridge-api

Liftbridge
Lightweight, fault-tolerant message streams.
Stars: ✭ 2,175 (+14400%)
Mutual labels:  streaming, messaging, grpc, pubsub, nats, cloud-native, liftbridge
Centrifugo
Scalable real-time messaging server in a language-agnostic way. Set up once and forever.
Stars: ✭ 5,649 (+37560%)
Mutual labels:  streaming, messaging, grpc, pubsub
Kratos
A modular-designed and easy-to-use microservices framework in Go.
Stars: ✭ 15,844 (+105526.67%)
Mutual labels:  protobuf, grpc, cloud-native
pulsar-client-node
Apache Pulsar NodeJS Client
Stars: ✭ 88 (+486.67%)
Mutual labels:  streaming, messaging, pubsub
Graphik
Graphik is a Backend as a Service implemented as an identity-aware document & graph database with support for gRPC and graphQL
Stars: ✭ 277 (+1746.67%)
Mutual labels:  streaming, grpc, pubsub
Nats.rb
Ruby client for NATS, the cloud native messaging system.
Stars: ✭ 850 (+5566.67%)
Mutual labels:  messaging, pubsub, nats
Centrifuge
Real-time messaging library for Go with scalability in mind
Stars: ✭ 446 (+2873.33%)
Mutual labels:  protobuf, messaging, pubsub
pulsar-adapters
Apache Pulsar Adapters
Stars: ✭ 18 (+20%)
Mutual labels:  streaming, messaging, pubsub
Pulsar Dotpulsar
The official .NET client library for Apache Pulsar
Stars: ✭ 101 (+573.33%)
Mutual labels:  streaming, messaging, pubsub
Flutter Grpc Tutorial
[Tutorial] Asynchronous Flutter chat client with Go chat server which are powered by gRPC (simple and streaming)
Stars: ✭ 167 (+1013.33%)
Mutual labels:  streaming, protobuf, grpc
Nats.net
The official C# Client for NATS
Stars: ✭ 378 (+2420%)
Mutual labels:  messaging, pubsub, nats
pulsar-helm-chart
Official Apache Pulsar Helm Chart
Stars: ✭ 122 (+713.33%)
Mutual labels:  streaming, messaging, pubsub
Hemera
🔬 Writing reliable & fault-tolerant microservices in Node.js https://hemerajs.github.io/hemera/
Stars: ✭ 773 (+5053.33%)
Mutual labels:  pubsub, nats, cloud-native
Go Micro Boilerplate
The boilerplate of the GoLang application with a clear microservices architecture.
Stars: ✭ 147 (+880%)
Mutual labels:  protobuf, grpc, nats
Pulsar
Apache Pulsar - distributed pub-sub messaging system
Stars: ✭ 10,118 (+67353.33%)
Mutual labels:  streaming, messaging, pubsub
Pulsar Manager
Apache Pulsar Manager
Stars: ✭ 247 (+1546.67%)
Mutual labels:  streaming, messaging, pubsub
Pulsar Client Go
Apache Pulsar Go Client Library
Stars: ✭ 251 (+1573.33%)
Mutual labels:  streaming, messaging, pubsub
qtprotobuf
Protobuf generator and bindings for Qt framework
Stars: ✭ 138 (+820%)
Mutual labels:  protobuf, grpc
incubator-eventmesh
EventMesh is a dynamic event-driven application runtime used to decouple the application and backend middleware layer, which supports a wide range of use cases that encompass complex multi-cloud, widely distributed topologies using diverse technology stacks.
Stars: ✭ 939 (+6160%)
Mutual labels:  pubsub, cloud-native
protoc-plugin
A protoc compiler plugin for Clojure applications
Stars: ✭ 28 (+86.67%)
Mutual labels:  protobuf, grpc

Liftbridge API

This repository contains the public API definitions for Liftbridge. It is primarily intended for Liftbridge client developers.

gRPC API

The client-facing gRPC API is defined in api.proto.

Direct NATS API

It is also possible for a client to publish messages to Liftbridge via NATS directly. Liftbridge accepts plain NATS messages, allowing it to make existing subjects durable without any publisher changes. However, these messages will not have some features such as acks.

In order to opt into Liftbridge-specific features, the message must be prefixed with the following header and be encoded as a Message (defined in api.proto).

Liftbridge Envelope Header

All Liftbridge messages and RPCs sent over NATS are prefixed with an envelope header. This includes client-facing messages, such as publishes and acks, as well as internal RPCs like replication.

0               8               16              24              32
├───────────────┴───────────────┴───────────────┴───────────────┤
│                          Magic Number                         │
├───────────────┬───────────────┬───────────────┬───────────────┤
│    Version    │   HeaderLen   │     Flags     │    MsgType    │
├───────────────┴───────────────┴───────────────┴───────────────┤
│                       CRC-32C (optional)                      │
└───────────────────────────────────────────────────────────────┘

Magic number [4 bytes]

The Liftbridge magic number is B9 0E 43 B4. This was chosen by random but deliberately restricted to invalid UTF-8 to reduce the chance of a collision. This was also verified to not match known file signatures.

Version [1 byte]

The version byte allows for future protocol upgrades. This should only be bumped if the envelope format changes or if the message encoding changes in a non-backwards-compatible way. Adding fields to the messages should not require a version bump.

Currently, the only supported protocol version is v0, i.e. 0x00.

HeaderLen [1 byte]

The header length is the offset of the payload. This is included primarily for safety.

Flags [1 byte]

The flag bits are defined as follows:

Bit Description
0 CRC-32C enabled

MsgType [1 byte]

This is the Liftbridge-specific message type the envelope contains:

MsgType Name Description Internal
0 Publish Client-published message no
1 Ack Server-published ack no
2 ReplicationRequest Request to replicate partition data yes
3 ReplicationResponse Response to ReplicationRequest yes
4 RaftJoinRequest Request to join Raft cluster yes
5 RaftJoinResponse Response to RaftJoinRequest yes
6 LeaderEpochOffsetRequest Request for partition leader's latest offset for epoch yes
7 LeaderEpochOffsetResponse Response to LeaderEpochOffsetRequest yes
8 PropagatedRequest Request forwarded to metadata leader yes
9 PropagatedResponse Response to PropagatedRequest yes
10 ServerInfoRequest Request for cluster information yes
11 ServerInfoResponse Response to ServerInfoRequest yes
12 PartitionStatusRequest Request to get partition status yes
13 PartitionStatusResponse Response to PartitionStatusRequest yes
14 PartitionNotification Signal new data is available for partition yes

CRC-32C [4 bytes, optional]

The CRC-32C (Castagnoli) is the checksum of the payload (i.e. from HeaderLen to the end). This is optional but should significantly reduce the chance that a random NATS message is interpreted as a Liftbridge message.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].