module PulsarSdk

Constants

VERSION

Public Instance Methods

create_client(options) click to toggle source

options Hash see PulsarSdk::Options::Connection for detail

# File lib/pulsar_sdk.rb, line 18
def create_client(options)
  opts = ::PulsarSdk::Options::Connection.new(options)
  ::PulsarSdk::Client.create(opts)
end
create_consumer(client, options) click to toggle source

options Hash see PulsarSdk::Options::Consumer for detail

# File lib/pulsar_sdk.rb, line 30
def create_consumer(client, options)
  opts = ::PulsarSdk::Options::Consumer.new(options)
  client.subscribe(opts)
end
create_producer(client, options) click to toggle source

options Hash see PulsarSdk::Options::Producer for detail

# File lib/pulsar_sdk.rb, line 24
def create_producer(client, options)
  opts = ::PulsarSdk::Options::Producer.new(options)
  client.create_producer(opts)
end
logger() click to toggle source
# File lib/pulsar_sdk.rb, line 35
def logger
  @logger ||= Logger.new(STDOUT).tap do |logger|
                logger.formatter = Formatter.new
              end
end
logger=(v) click to toggle source
# File lib/pulsar_sdk.rb, line 41
def logger=(v)
  @logger = v
end