Sha256: d6d582cbd496f5442f3d91fb072075ec260ee17b783927b4308eb1dbfdbe95dd

Contents?: true

Size: 692 Bytes

Versions: 2

Compression:

Stored size: 692 Bytes

Contents

class WalletEventsConsumer
  include Asynk::Consumer

  set_consume 'sample_app.wallet.registration_completed'
  set_queue_options durable: true, ack: true
  set_subscribe_arguments manual_ack: true
  set_concurrency 1
  set_route_ending_as_action true

  def registration_completed(message)
    respond(message.body)
  end
end

class LogEventsConsumer
  include Asynk::Consumer

  set_consume 'sample_app.logs.warn', 'sample_app.logs.info'
  set_queue_options durable: true, ack: true
  set_subscribe_arguments manual_ack: true
  set_concurrency 1
  set_route_ending_as_action true

  def warn(message)
    respond(message.body)
  end

  def info(message)
    respond(message.body)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
asynk-0.0.2 test/consumer_example.rb
asynk-0.0.1 test/consumer_example.rb