NATS Streaming

NATS 流媒体系统。(NATS Streaming System.)

Github星跟蹤圖

NATS 流媒体

NATS Streaming是一款性能极高、轻量级可靠的流媒体平台,由NATS提供支持。

NATS Streaming提供以下高级功能集:

  • 基于日志的持久性
  • 至少一次交付模型,提供可靠的消息交付
  • 每个订阅的速率匹配
  • 重播/重新启动
  • 最后值语义

请注意

安装

# Go client
go get github.com/nats-io/stan.go/

基本使用

import stan "github.com/nats-io/stan.go"

sc, _ := stan.Connect(clusterID, clientID)

// Simple Synchronous Publisher
sc.Publish("foo", []byte("Hello World")) // does not return until an ack has been received from NATS Streaming

// Simple Async Subscriber
sub, _ := sc.Subscribe("foo", func(m *stan.Msg) {
    fmt.Printf("Received a message: %s\n", string(m.Data))
})

// Unsubscribe
sub.Unsubscribe()

// Close connection
sc.Close()

主要指標

概覽
名稱與所有者nats-io/stan.go
主編程語言Go
編程語言Go (語言數: 2)
平台Linux, Mac, Windows
許可證Apache License 2.0
所有者活动
創建於2016-01-20 15:49:02
推送於2024-02-14 16:41:42
最后一次提交
發布數22
最新版本名稱v0.10.4 (發布於 2023-01-11 16:08:56)
第一版名稱v0.1.0 (發布於 )
用户参与
星數708
關注者數38
派生數116
提交數505
已啟用問題?
問題數182
打開的問題數8
拉請求數176
打開的拉請求數1
關閉的拉請求數17
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

WARNING: Product reached end of life :warning:

NATS Streaming reached its end of life.

It is no longer supported and has been replaced by Jetstream

JetStream is build into the NATS Server and supported by all major clients. Check examples here