Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendToTopic ¶
Types ¶
type ChannelFactory ¶
type Connector ¶
type Connector interface { Connect(string) error Disconnect() error Consume(Consumer, ConsumerOptions) error Publish(any, PublishOptions) error WithContext(ctx context.Context) Connector WithLogger(Logger) Connector WithProtocol(Protocol) Connector WithConsumers(int) Connector }
func NewRabbitConnector ¶
func NewRabbitConnector() Connector
type ConsumerOptions ¶
type ConsumerOptions struct { Exchange string Topic string QueueName string // contains filtered or unexported fields }
ConsumerOptions represents a queue binding for a Consumer
func NewConsumerOptions ¶
func NewConsumerOptions(exchange, topic, queue string) ConsumerOptions
NewConsumerOptions creates a ConsumerOptions object with default configurations
func (ConsumerOptions) HasRetry ¶
func (co ConsumerOptions) HasRetry() bool
func (ConsumerOptions) SetDurable ¶
func (co ConsumerOptions) SetDurable() ConsumerOptions
SetDurable configures the queue to be persist if the consumer disconnects
func (ConsumerOptions) SetName ¶
func (co ConsumerOptions) SetName(name string) ConsumerOptions
SetName sets the consumer name
func (ConsumerOptions) SetPrefetch ¶ added in v2.3.0
func (co ConsumerOptions) SetPrefetch(n int) ConsumerOptions
SetPrefetch configures the prefetch count for the consumer. Default is 0, which means unlimited.
func (ConsumerOptions) WithRetry ¶
func (co ConsumerOptions) WithRetry() ConsumerOptions
WithRetry enables in memory retries of unhandled messages. It will exponationally backoff for a max of 15min
type JsonProtocol ¶
type JsonProtocol struct{}
func (JsonProtocol) ContentType ¶
func (p JsonProtocol) ContentType() string
type PublishOptions ¶
PublishOptions specifies where to publish messages
Click to show internal directories.
Click to hide internal directories.