From 0d705fd4de1f55e1163764c21c48777e8cb921cf Mon Sep 17 00:00:00 2001 From: ochom Date: Tue, 8 Oct 2024 14:30:51 +0300 Subject: [PATCH] update fetch from a queue --- pubsub/consumer.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pubsub/consumer.go b/pubsub/consumer.go index 1620f80..3a6ef20 100644 --- a/pubsub/consumer.go +++ b/pubsub/consumer.go @@ -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 { @@ -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]