Skip to content

jacoovan/rabbitmq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rabbitmq

Usage see:

/rabbitmq_test.go

type RabbitMQ interface {
	// dial rabbit and init queue with exchange and queuebind.
	Dial() error
	// publish message.
	// header spec for queue with header exchange, default x-match: all.
	Publish(body []byte, exchangeName, routingKey string, header ...map[string]interface{}) error
	// subscribe operation occur error will finish
	// and
	// will block until ack & nack occured error or context was canceled
	Consume(ctx context.Context, queueName, consumerName string, consumer ConsumeFunc)
	// return the subscribe operation occured error or ack & nack error.
	ConsumeDone() <-chan error
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages