Skip to content

Commit

Permalink
Allow setting autoDelete on queues (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenv authored May 7, 2024
1 parent c40e20b commit 0c5e554
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ func (manager *mqttManager) CreateQueue(config QueueConfig) error {

// We declare the queue via the channel.
_, err := manager.channel.QueueDeclare(
config.Name, // name
config.Durable, // durable
false, // delete when unused
config.Exclusive, // exclusive
false, // no-wait
config.Name, // name
config.Durable, // durable
config.AutoDelete, // delete when unused
config.Exclusive, // exclusive
false, // no-wait
config.Args,
)

Expand Down
11 changes: 6 additions & 5 deletions model.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ type ExchangeConfig struct {
}

type QueueConfig struct {
Name string `yaml:"name"`
Durable bool `yaml:"durable"`
Exclusive bool `yaml:"exclusive"`
Args map[string]interface{} `yaml:"args"`
Bindings []BindingConfig `yaml:"bindings"`
Name string `yaml:"name"`
Durable bool `yaml:"durable"`
Exclusive bool `yaml:"exclusive"`
AutoDelete bool `yaml:"autoDelete"`
Args map[string]interface{} `yaml:"args"`
Bindings []BindingConfig `yaml:"bindings"`
}

type BindingConfig struct {
Expand Down

0 comments on commit 0c5e554

Please sign in to comment.