Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting autoDelete on queues #11

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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