Skip to content

Commit

Permalink
Make server queue non-auto-delete
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhavp committed Mar 6, 2016
1 parent c7221d4 commit 930e5e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion client.go
Expand Up @@ -95,7 +95,10 @@ func NewClientCodec(conn *amqp.Connection, serverRouting string, encodingCodec E
return nil, err
}

serverQueue, _ := channel.QueueDeclare(serverRouting, false, true, false, false, nil)
serverQueue, err := channel.QueueDeclare(serverRouting, false, false, false, false, nil)
if err != nil {
return nil, err
}
if serverQueue.Consumers == 0 {
return nil, ErrNoConsumers
}
Expand Down
2 changes: 1 addition & 1 deletion server.go
Expand Up @@ -91,7 +91,7 @@ func NewServerCodec(conn *amqp.Connection, serverRouting string, encodingCodec E
return nil, err
}

queue, err := channel.QueueDeclare(serverRouting, true, false, false, false, nil)
queue, err := channel.QueueDeclare(serverRouting, false, false, false, false, nil)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 930e5e1

Please sign in to comment.