Documentation ¶
Overview ¶
Package stan abstracts publish-subscribe https://docs.nats.io/developing-with-nats-streaming/streaming backend.
WARNING/TODO: messages can be considered not acknowledged,
because DurableName for subscriptions is not used yet: https://godoc.org/github.com/nats-io/stan.go#DurableName
Both bps.NewPublisher and bps.NewSubscriber support:
client_id nats-streaming client ID, [0-9A-Za-z_-] only. client_cert, client_key nats client certificate and key file paths.
bps.NewSubscriber supports:
queue_group optional queue group name for queue subscriptions: https://docs.nats.io/developing-with-nats/receiving/queues durable_name durable subscriptions name: https://docs.nats.io/developing-with-nats-streaming/durables
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPublisher ¶
NewPublisher constructs a new STAN-backed publisher.
func NewSubscriber ¶
func NewSubscriber(stanClusterID, clientID, queueGroup, durableName string, opts []stan.Option) (bps.Subscriber, error)
NewSubscriber constructs a new STAN-backed subscriber. By default, it starts handling from the newest available message (published after subscribing). If queueGroup is specified, all subscriptions will be queue ones: https://docs.nats.io/developing-with-nats/receiving/queues If durableName is specified, it will be used for durable subs: https://docs.nats.io/developing-with-nats-streaming/durables
Types ¶
This section is empty.