Documentation ¶
Overview ¶
Package rabbitmq provides a RabbitMQ broker
Index ¶
- Variables
- func AckOnSuccess() broker.SubscribeOption
- func DeliveryMode(value uint8) broker.PublishOption
- func DurableExchange() broker.Option
- func DurableMessageContext(ctx context.Context) context.Context
- func DurableQueue() broker.SubscribeOption
- func Exchange(e string) broker.Option
- func ExternalAuth() broker.Option
- func Headers(h map[string]interface{}) broker.SubscribeOption
- func NewBroker(opts ...broker.Option) broker.Broker
- func PrefetchCount(c int) broker.Option
- func PrefetchGlobal() broker.Option
- func QueueArguments(h map[string]interface{}) broker.SubscribeOption
- func RequeueOnError() broker.SubscribeOption
- func ServerAckOnSuccess() server.SubscriberOption
- func ServerDurableQueue() server.SubscriberOption
- func SubscribeContext(ctx context.Context) broker.SubscribeOption
- type ExternalAuthentication
Constants ¶
This section is empty.
Variables ¶
var ( DefaultExchange = exchange{ // contains filtered or unexported fields } DefaultRabbitURL = "amqp://guest:guest@127.0.0.1:5672" DefaultPrefetchCount = 0 DefaultPrefetchGlobal = false DefaultRequeueOnError = false )
Functions ¶
func AckOnSuccess ¶ added in v0.21.1
func AckOnSuccess() broker.SubscribeOption
AckOnSuccess will automatically acknowledge messages when no error is returned
func DeliveryMode ¶ added in v0.16.1
func DeliveryMode(value uint8) broker.PublishOption
DeliveryMode sets a delivery mode for publishing
func DurableExchange ¶ added in v1.4.1
DurableExchange is an option to set the Exchange to be durable
func DurableMessageContext ¶ added in v1.4.2
DurableMessageContext create new context with metadata for durable message sending
func DurableQueue ¶
func DurableQueue() broker.SubscribeOption
DurableQueue creates a durable queue when subscribing.
func ExternalAuth ¶ added in v1.4.1
func Headers ¶ added in v0.6.0
func Headers(h map[string]interface{}) broker.SubscribeOption
Headers adds headers used by the headers exchange
func PrefetchGlobal ¶ added in v0.14.0
PrefetchGlobal creates a durable queue when subscribing.
func QueueArguments ¶ added in v1.4.1
func QueueArguments(h map[string]interface{}) broker.SubscribeOption
QueueArguments sets arguments for queue creation
func RequeueOnError ¶ added in v0.15.0
func RequeueOnError() broker.SubscribeOption
RequeueOnError calls Nack(muliple:false, requeue:true) on amqp delivery when handler returns error
func ServerAckOnSuccess ¶ added in v1.4.5
func ServerAckOnSuccess() server.SubscriberOption
ServerAckOnSuccess support "manual ack" on success
func ServerDurableQueue ¶ added in v1.4.1
func ServerDurableQueue() server.SubscriberOption
ServerDurableQueue provide durable queue option for micro.RegisterSubscriber
func SubscribeContext ¶ added in v0.21.1
func SubscribeContext(ctx context.Context) broker.SubscribeOption
SubscribeContext set the context for broker.SubscribeOption
Types ¶
type ExternalAuthentication ¶ added in v1.4.1
type ExternalAuthentication struct { }
func (*ExternalAuthentication) Mechanism ¶ added in v1.4.1
func (auth *ExternalAuthentication) Mechanism() string
func (*ExternalAuthentication) Response ¶ added in v1.4.1
func (auth *ExternalAuthentication) Response() string