module Telemetry::AMQP

Constants

VERSION

Public Class Methods

channel() click to toggle source
# File lib/telemetry/amqp.rb, line 25
def channel
  return nil if session.nil?

  session.channel
end
connect!(**opts) click to toggle source
# File lib/telemetry/amqp.rb, line 8
def connect!(**opts)
  @connection = Telemetry::AMQP::Base.new(**opts)
  @connection.connect!

  @connection
end
connection() click to toggle source
# File lib/telemetry/amqp.rb, line 15
def connection
  return @connection unless @connection.nil?

  nil
end
create_channel(consumer_pool_size: 1, abort_on_exception: false, timeout: 30) click to toggle source
# File lib/telemetry/amqp.rb, line 31
def create_channel(consumer_pool_size: 1, abort_on_exception: false, timeout: 30)
  session.create_channel(nil, consumer_pool_size, abort_on_exception, timeout)
end
session() click to toggle source
# File lib/telemetry/amqp.rb, line 21
def session
  @connection&.session
end