Skip to content

Commit

Permalink
update fetch from a queue
Browse files Browse the repository at this point in the history
  • Loading branch information
ochom committed Oct 8, 2024
1 parent fab5c00 commit 0d705fd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pubsub/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import (

// Consumer ...
type Consumer struct {
url string
exchange string
queue string
config Config
url string
queue string
config Config
}

type Config struct {
Expand All @@ -33,8 +32,8 @@ var defaultConfig = Config{
}

// Create a new consumer instance
func NewConsumer(rabbitURL, exchange, queue string, config ...Config) *Consumer {
c := Consumer{url: rabbitURL, exchange: exchange, queue: queue, config: defaultConfig}
func NewConsumer(rabbitURL, queue string, config ...Config) *Consumer {
c := Consumer{url: rabbitURL, queue: queue, config: defaultConfig}

if len(config) > 0 {
c.config = config[0]
Expand Down

0 comments on commit 0d705fd

Please sign in to comment.