NATS Streaming

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

Github stars Tracking Chart

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()

Main metrics

Overview
Name With Ownernats-io/stan.go
Primary LanguageGo
Program languageGo (Language Count: 2)
PlatformLinux, Mac, Windows
License:Apache License 2.0
所有者活动
Created At2016-01-20 15:49:02
Pushed At2024-02-14 16:41:42
Last Commit At
Release Count22
Last Release Namev0.10.4 (Posted on 2023-01-11 16:08:56)
First Release Namev0.1.0 (Posted on )
用户参与
Stargazers Count708
Watchers Count38
Fork Count116
Commits Count505
Has Issues Enabled
Issues Count182
Issue Open Count8
Pull Requests Count176
Pull Requests Open Count1
Pull Requests Close Count17
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

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