Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consume ¶
Consume returns a channel of amqp.Delivery's and a related closer or an error
func DirectQueueConsume ¶
DirectQueueConsume returns a Consume func that will connect to the provided AMQP server and create a queue for direct message delivery
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener consumes messages from an queue
type NotificationChannel ¶
type NotificationChannel interface { Publish(exchange, queue string, mandatory, immediate bool, msg amqp.Publishing) error Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table) (<-chan amqp.Delivery, error) Qos(prefetchCount, prefetchSize int, global bool) error }
NotificationChannel represents a channel for notifications
type NotificationPublisher ¶
type NotificationPublisher struct {
// contains filtered or unexported fields
}
NotificationPublisher is responsible of publishing a notification to queue
func NewNotificationPublisher ¶
func NewNotificationPublisher( amqpDSN, queue string, minReconnectInterval time.Duration, maxReconnectInterval time.Duration, logger goengine.Logger, connection io.Closer, channel NotificationChannel, ) (*NotificationPublisher, error)
NewNotificationPublisher returns an instance of NotificationPublisher
func (*NotificationPublisher) Publish ¶
func (p *NotificationPublisher) Publish(ctx context.Context, notification *sql.ProjectionNotification) error
Publish sends a ProjectionNotification to Queue
Click to show internal directories.
Click to hide internal directories.