Class: RabbitFeed::Connection
- Inherits:
-
Object
- Object
- RabbitFeed::Connection
- Includes:
- Singleton
- Defined in:
- lib/rabbit_feed/connection.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize ⇒ Connection
Returns a new instance of Connection.
5 6 7 8 9 10 11 12 |
# File 'lib/rabbit_feed/connection.rb', line 5 def initialize RabbitFeed.log.info { { event: :connecting_to_rabbitmq, options: RabbitFeed.configuration..merge(password: :redacted, logger: :redacted) } } @connection = Bunny.new RabbitFeed.configuration. @connection.start RabbitFeed.log.info { { event: :connected_to_rabbitmq } } @channel = @connection.create_channel @mutex = Mutex.new end |