Documentation ¶
Index ¶
- type RocketMQConsumer
- type RocketMQConsumerWrapper
- func (r *RocketMQConsumerWrapper) IsBroadCasting() bool
- func (r *RocketMQConsumerWrapper) Resume()
- func (r *RocketMQConsumerWrapper) Shutdown() error
- func (r *RocketMQConsumerWrapper) Start() error
- func (r *RocketMQConsumerWrapper) Subscribe(topic string, selector consumer.MessageSelector, f SubscribeFunc) error
- func (r *RocketMQConsumerWrapper) Suspend()
- func (r *RocketMQConsumerWrapper) Unsubscribe(topic string) error
- type RocketMQProducer
- type RocketMQProducerWrapper
- func (r *RocketMQProducerWrapper) Request(ctx context.Context, ttl time.Duration, msg *primitive.Message) (*primitive.Message, error)
- func (r *RocketMQProducerWrapper) RequestAsync(ctx context.Context, ttl time.Duration, ...) error
- func (r *RocketMQProducerWrapper) SendAsync(ctx context.Context, ...) error
- func (r *RocketMQProducerWrapper) SendOneWay(ctx context.Context, msg ...*primitive.Message) error
- func (r *RocketMQProducerWrapper) SendSync(ctx context.Context, msg ...*primitive.Message) (*primitive.SendResult, error)
- func (r *RocketMQProducerWrapper) Shutdown() error
- func (r *RocketMQProducerWrapper) Start() error
- type SubscribeFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RocketMQConsumer ¶
type RocketMQConsumer interface { Start() error Shutdown() error Subscribe(topic string, selector consumer.MessageSelector, f SubscribeFunc) error Unsubscribe(topic string) error Suspend() Resume() IsBroadCasting() bool }
RocketMQConsumer RocketMQ consumer interface
func NewRocketMQConsumerWrapper ¶
func NewRocketMQConsumerWrapper(properties map[string]string) (RocketMQConsumer, error)
NewRocketMQConsumerWrapper get a consumer wrapper of RocketMQ client
type RocketMQConsumerWrapper ¶
type RocketMQConsumerWrapper struct {
// contains filtered or unexported fields
}
RocketMQConsumerWrapper consumer wrapper of RocketMQ client
func (*RocketMQConsumerWrapper) IsBroadCasting ¶
func (r *RocketMQConsumerWrapper) IsBroadCasting() bool
IsBroadCasting check if consumer mode is broadcasting
func (*RocketMQConsumerWrapper) Resume ¶
func (r *RocketMQConsumerWrapper) Resume()
Resume wrapper resume function
func (*RocketMQConsumerWrapper) Shutdown ¶
func (r *RocketMQConsumerWrapper) Shutdown() error
Shutdown wrapper shutdown function
func (*RocketMQConsumerWrapper) Start ¶
func (r *RocketMQConsumerWrapper) Start() error
Start wrapper start function
func (*RocketMQConsumerWrapper) Subscribe ¶
func (r *RocketMQConsumerWrapper) Subscribe(topic string, selector consumer.MessageSelector, f SubscribeFunc) error
Subscribe wrapper subscribe function
func (*RocketMQConsumerWrapper) Suspend ¶
func (r *RocketMQConsumerWrapper) Suspend()
Suspend wrapper suspend function
func (*RocketMQConsumerWrapper) Unsubscribe ¶
func (r *RocketMQConsumerWrapper) Unsubscribe(topic string) error
Unsubscribe wrapper unsubscribe function
type RocketMQProducer ¶
type RocketMQProducer interface { Start() error Shutdown() error SendSync(ctx context.Context, msg ...*primitive.Message) (*primitive.SendResult, error) SendAsync(ctx context.Context, mq func(ctx context.Context, result *primitive.SendResult, err error), msg ...*primitive.Message) error SendOneWay(ctx context.Context, msg ...*primitive.Message) error Request(ctx context.Context, ttl time.Duration, msg *primitive.Message) (*primitive.Message, error) RequestAsync(ctx context.Context, ttl time.Duration, callback func(ctx context.Context, msg *primitive.Message, err error), msg *primitive.Message) error }
RocketMQProducer RocketMQ producer interface
type RocketMQProducerWrapper ¶
type RocketMQProducerWrapper struct {
// contains filtered or unexported fields
}
RocketMQProducerWrapper producer wrapper of RocketMQ client
func NewRocketMQProducerWrapper ¶
func NewRocketMQProducerWrapper(properties map[string]string) (*RocketMQProducerWrapper, error)
NewRocketMQProducerWrapper get a producer wrapper of RocketMQ client
func (*RocketMQProducerWrapper) Request ¶
func (r *RocketMQProducerWrapper) Request(ctx context.Context, ttl time.Duration, msg *primitive.Message) (*primitive.Message, error)
Request wrapper request function
func (*RocketMQProducerWrapper) RequestAsync ¶
func (r *RocketMQProducerWrapper) RequestAsync(ctx context.Context, ttl time.Duration, callback func(ctx context.Context, msg *primitive.Message, err error), msg *primitive.Message) error
RequestAsync wrapper request async function
func (*RocketMQProducerWrapper) SendAsync ¶
func (r *RocketMQProducerWrapper) SendAsync(ctx context.Context, mq func(ctx context.Context, result *primitive.SendResult, err error), msg ...*primitive.Message) error
SendAsync wrapper send async function
func (*RocketMQProducerWrapper) SendOneWay ¶
SendOneWay wrapper send one way function
func (*RocketMQProducerWrapper) SendSync ¶
func (r *RocketMQProducerWrapper) SendSync(ctx context.Context, msg ...*primitive.Message) (*primitive.SendResult, error)
SendSync wrapper send sync function
func (*RocketMQProducerWrapper) Shutdown ¶
func (r *RocketMQProducerWrapper) Shutdown() error
Shutdown wrapper shutdown function
func (*RocketMQProducerWrapper) Start ¶
func (r *RocketMQProducerWrapper) Start() error
Start wrapper start function
type SubscribeFunc ¶
type SubscribeFunc func(context.Context, ...*primitive.MessageExt) (consumer.ConsumeResult, error)