Skip to content

Commit

Permalink
Remove dependency on deprecated RabbitMQ config
Browse files Browse the repository at this point in the history
The `govuk_message_queue_consumer` gem has deprecated the use of its
"proprietary" `RABBITMQ_*` environment variables and
`RabbitMQConfig.from_environment` setup process in favour of Bunny just
being set up through the conventional `RABBITMQ_URL`.

see also: alphagov/govuk-docker#688
  • Loading branch information
csutter committed Sep 14, 2023
1 parent c1496e3 commit 49efe7b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/tasks/message_queue.rake
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# The following environment variables need to be set
# RABBITMQ_HOSTS
# RABBITMQ_VHOST
# RABBITMQ_USER
# RABBITMQ_PASSWORD
require "rummager"

namespace :message_queue do
desc "Create the queues that Rummager uses with Rabbit MQ"
task :create_queues do
config = GovukMessageQueueConsumer::RabbitMQConfig.from_environment(ENV)
bunny = Bunny.new(config)
bunny = Bunny.new

channel = bunny.start.create_channel
exch = Bunny::Exchange.new(channel, :topic, "published_documents")
Expand Down

0 comments on commit 49efe7b

Please sign in to comment.