Skip to content

Commit

Permalink
Merge pull request #65 from kelchy/main
Browse files Browse the repository at this point in the history
Release rmq/consumer 0.0.8
  • Loading branch information
kelchy committed Mar 21, 2023
2 parents 2194c6a + 053c1d0 commit 37d9f10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rmq/consumer/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//v0.0.7
//v0.0.8
module github.com/kelchy/go-lib/rmq/consumer

go 1.19
Expand Down
6 changes: 6 additions & 0 deletions rmq/consumer/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ func NewQueue(amqpChannel *amqp.Channel, queueConfig QueueConfig) (amqp.Queue, e
q, err := amqpChannel.QueueDeclare(queueConfig.Name, queueConfig.Durable, queueConfig.AutoDelete, queueConfig.Exclusive, queueConfig.NoWait, queueConfig.Args)
return q, err
}

// NewQueueBind binds a queue to an exchange with a routing key
func NewQueueBind(amqpChannel *amqp.Channel, exchange string, queue, string, routingKey string, noWait bool, args amqp.Table) error {
queueBindErr := amqpChannel.QueueBind(queue, routingKey, exchange, false, nil)
return queueBindErr
}

0 comments on commit 37d9f10

Please sign in to comment.