MCPcopy
hub / github.com/nats-io/nats.go / CreateConsumer

Method CreateConsumer

jetstream/stream.go:82–82  ·  view source on GitHub ↗

CreateConsumer creates a pull consumer on a given stream with given config. If consumer already exists and the provided configuration differs from its configuration, ErrConsumerExists is returned. If the provided configuration is the same as the existing consumer, the existing consumer is returned.

(ctx context.Context, cfg ConsumerConfig)

Source from the content-addressed store, hash-verified

80 // existing consumer is returned. Consumer interface is returned,
81 // allowing to operate on a consumer (e.g. fetch messages).
82 CreateConsumer(ctx context.Context, cfg ConsumerConfig) (Consumer, error)
83
84 // UpdateConsumer updates an existing pull consumer. If consumer does not
85 // exist, ErrConsumerDoesNotExist is returned. Consumer interface is

Implementers 1

streamjetstream/stream.go

Calls

no outgoing calls