Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrIncompatibleConsumer = errors.New("nats: cannot subscribe to a pull consumer")
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Close() StreamName() string IsConnected() bool JetStreamCreateStream(streamName string) error GetConsumerConfig(name string) (*ConsumerConfig, error) CreateConsumer(name string, upsert bool, config ConsumerConfig) error JetStreamSubscribe( ctx context.Context, subj, durable string, q chan *natsio.Msg, ) (UnsubscribeFunc, error) JetStreamPublish(string, []byte) error }
Client is the nats client
type ConsumerConfig ¶
type ConsumerConfig struct { // Filter expression for which topics this consumer covers. Filter string // MaxPending messages in the work queue. // NOTE: This sets an upper limit on the horizontal scalability of the // service. MaxPending int // MaxDeliver sets the maximum amount of time the message will be // (re-) delivered. MaxDeliver int // AckWait sets the time to wait for message acknowledgement before // resending the message. AckWait time.Duration }
func (ConsumerConfig) Validate ¶
func (cfg ConsumerConfig) Validate() error
type UnsubscribeFunc ¶
type UnsubscribeFunc func() error
Click to show internal directories.
Click to hide internal directories.