Skip to content

Commit

Permalink
Renames event_bus_exchange_name to rabbitmq_exchange_name for con…
Browse files Browse the repository at this point in the history
…sistency
  • Loading branch information
muhammadnawzad committed Dec 6, 2023
1 parent 6b6da5e commit 7c4c7ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RabbitCarrots.configure do |c|
c.rabbitmq_user = ENV.fetch('RABBITMQ__USER', nil)
c.rabbitmq_password = ENV.fetch('RABBITMQ__PASSWORD', nil)
c.rabbitmq_vhost = ENV.fetch('RABBITMQ__VHOST', nil)
c.event_bus_exchange_name = ENV.fetch('EVENTBUS__EXCHANGE_NAME', nil)
c.rabbitmq_exchange_name = ENV.fetch('RABBITMQ__EXCHANGE_NAME', nil)
c.routing_key_mappings = [
{ routing_keys: ['RK1', 'RK2'], queue: 'QUEUE_NAME', handler: 'CLASS HANDLER IN STRING' },
{ routing_keys: ['RK1', 'RK2'], queue: 'QUEUE_NAME', handler: 'CLASS HANDLER IN STRING' }
Expand Down
2 changes: 1 addition & 1 deletion lib/rabbit_carrots/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ def self.configure
end

class Configuration
attr_accessor :rabbitmq_host, :rabbitmq_port, :rabbitmq_user, :rabbitmq_password, :rabbitmq_vhost, :routing_key_mappings, :event_bus_exchange_name
attr_accessor :rabbitmq_host, :rabbitmq_port, :rabbitmq_user, :rabbitmq_password, :rabbitmq_vhost, :routing_key_mappings, :rabbitmq_exchange_name
end
end
2 changes: 1 addition & 1 deletion lib/rabbit_carrots/tasks/rmq.rake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ end

def run_task(queue_name:, handler_class:, routing_keys:, queue_arguments: {})
RabbitCarrots::Connection.instance.channel.with do |channel|
exchange = channel.topic(RabbitCarrots.configuration.event_bus_exchange_name, durable: true)
exchange = channel.topic(RabbitCarrots.configuration.rabbitmq_exchange_name, durable: true)

Rails.logger.info "Listening on QUEUE: #{queue_name} for ROUTING KEYS: #{routing_keys}"
queue = channel.queue(queue_name, durable: true, arguments: queue_arguments)
Expand Down

0 comments on commit 7c4c7ea

Please sign in to comment.