Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker interface { Publisher Subscriber Initialize() error Disconnect() error Consume(group *sync.WaitGroup) HasConsumer() bool }
Broker is the interface which defines the client connection(s) to a concrete broker like amqp
type Event ¶
type Event interface { Message() *Message Ack() Nack(requeue bool) Reject(requeue bool) QueueName() string RoutingKey() string SetContext(ctx context.Context) }
Event abstraction
type Message ¶
Message is the core structure of the broker. It abstract's away the concrete broker message implementations (e.g. amqp.Delivery).
type Publisher ¶
type Publisher interface { Publish(exchange, routingKey string, message *Message) error EnsureExchange(exchange string) }
Publisher can publish messages with a routingKey to the message-broker
type Subscriber ¶ added in v1.1.3
Subscriber can subscribe to exchanges with a routingKey
Click to show internal directories.
Click to hide internal directories.