Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CheckError ¶
Types ¶
type Producer ¶
type PullConsumer ¶
type PullConsumer interface { Start() error Shutdown() error Pull(context.Context, string, consumer.MessageSelector, int) (*primitive.PullResult, error) PullFrom(context.Context, *primitive.MessageQueue, int64, int) (*primitive.PullResult, error) CurrentOffset(*primitive.MessageQueue) (int64, error) UpdateOffset(*primitive.MessageQueue, int64) error PersistOffset(context.Context) error }
func NewPullConsumer ¶
func NewPullConsumer(opts ...consumer.Option) (PullConsumer, error)
type PushConsumer ¶
type PushConsumer interface { Start() error Shutdown() error Subscribe(topic string, selector consumer.MessageSelector, f func(context.Context, ...*primitive.MessageExt) (consumer.ConsumeResult, error)) error Unsubscribe(string) error }
func NewPushConsumer ¶
func NewPushConsumer(opts ...consumer.Option) (PushConsumer, error)
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
consumer/retry/concurrent
* * use concurrent consumer model, when Subscribe function return consumer.ConsumeRetryLater, the message will be * send to rocketmq retry topic.
|
* * use concurrent consumer model, when Subscribe function return consumer.ConsumeRetryLater, the message will be * send to rocketmq retry topic. |
consumer/retry/order
* * use orderly consumer model, when Subscribe function return consumer.SuspendCurrentQueueAMoment, it will be re-send to * local msg queue for later consume if msg.ReconsumeTimes < MaxReconsumeTimes, otherwise, it will be send to rocketmq * DLQ topic, we should manually resolve the msg.
|
* * use orderly consumer model, when Subscribe function return consumer.SuspendCurrentQueueAMoment, it will be re-send to * local msg queue for later consume if msg.ReconsumeTimes < MaxReconsumeTimes, otherwise, it will be send to rocketmq * DLQ topic, we should manually resolve the msg. |
producer/acl
Package main implements a producer with user custom interceptor.
|
Package main implements a producer with user custom interceptor. |
producer/interceptor
Package main implements a producer with user custom interceptor.
|
Package main implements a producer with user custom interceptor. |
Package internal is a generated GoMock package.
|
Package internal is a generated GoMock package. |
remote
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. |
* Define the ctx key and value type.
|
* Define the ctx key and value type. |
Click to show internal directories.
Click to hide internal directories.