Documentation ¶
Overview ¶
*
- builtin interceptor
Index ¶
- Variables
- func NewDefaultProducer(opts ...Option) (*defaultProducer, error)
- func NewTransactionProducer(listener primitive.TransactionListener, opts ...Option) (*transactionProducer, error)
- type Option
- func WithCredentials(c primitive.Credentials) Option
- func WithGroupName(group string) Option
- func WithInstanceName(name string) Option
- func WithInterceptor(f ...primitive.Interceptor) Option
- func WithNameServer(nameServers primitive.NamesrvAddr) Option
- func WithNamespace(namespace string) Option
- func WithQueueSelector(s QueueSelector) Option
- func WithRetry(retries int) Option
- func WithSendMsgTimeout(duration time.Duration) Option
- func WithTrace(traceCfg *primitive.TraceConfig) Option
- func WithVIPChannel(enable bool) Option
- type QueueSelector
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewDefaultProducer ¶
func NewTransactionProducer ¶ added in v1.0.1
func NewTransactionProducer(listener primitive.TransactionListener, opts ...Option) (*transactionProducer, error)
TODO: checkLocalTransaction
Types ¶
type Option ¶
type Option func(*producerOptions)
func WithCredentials ¶
func WithCredentials(c primitive.Credentials) Option
func WithInstanceName ¶ added in v1.0.1
func WithInterceptor ¶
func WithInterceptor(f ...primitive.Interceptor) Option
func WithNameServer ¶
func WithNameServer(nameServers primitive.NamesrvAddr) Option
WithNameServer set NameServer address, only support one NameServer cluster in alpha2
func WithNamespace ¶ added in v1.0.1
WithNamespace set the namespace of producer
func WithQueueSelector ¶
func WithQueueSelector(s QueueSelector) Option
func WithRetry ¶
WithRetry return a Option that specifies the retry times when send failed. TODO: use retry middleware instead
func WithSendMsgTimeout ¶ added in v1.0.1
func WithTrace ¶
func WithTrace(traceCfg *primitive.TraceConfig) Option
WithTrace support rocketmq trace: https://github.com/apache/rocketmq/wiki/RIP-6-Message-Trace.
func WithVIPChannel ¶
type QueueSelector ¶
type QueueSelector interface {
Select(*primitive.Message, []*primitive.MessageQueue) *primitive.MessageQueue
}
func NewHashQueueSelector ¶ added in v1.0.1
func NewHashQueueSelector() QueueSelector
func NewManualQueueSelector ¶
func NewManualQueueSelector() QueueSelector
func NewRandomQueueSelector ¶
func NewRandomQueueSelector() QueueSelector
func NewRoundRobinQueueSelector ¶
func NewRoundRobinQueueSelector() QueueSelector
Click to show internal directories.
Click to hide internal directories.