Skip to content

Commit

Permalink
fix init delayed queue
Browse files Browse the repository at this point in the history
  • Loading branch information
ergoz committed Jun 24, 2019
1 parent 69386c4 commit ffc7a5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ notifications:

install:
- go get -d
- go get -t -v
- go get -u golang.org/x/lint/golint
- go get -u golang.org/x/tools/cmd/goimports
- go get -u golang.org/x/tools/cmd/cover
Expand Down
3 changes: 3 additions & 0 deletions workercore.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ func (wrk *Worker) initChannelQos() error {

func (wrk *Worker) initDelayedQueue() error {
var err error
if wrk.config.DelayedQueueArguments == nil {
wrk.config.DelayedQueueArguments = make(map[string]interface{})
}
wrk.config.DelayedQueueArguments["x-dead-letter-exchange"] = ""
wrk.config.DelayedQueueArguments["x-dead-letter-routing-key"] = wrk.config.QueueName
wrk.amqpQueueDelayed, err = wrk.amqpChannel.QueueDeclare(
Expand Down

0 comments on commit ffc7a5b

Please sign in to comment.