Sha256: 8de762974815545fc21201babe8cefc267401b7ff686a613e77becf82710f2b6

Contents?: true

Size: 462 Bytes

Versions: 166

Compression:

Stored size: 462 Bytes

Contents

class UserSubscriber < ActionSubscriber::Base
  publisher :bob
  exchange :events

  # By turning on the at_most_once! mode we will tell rabbit
  # to expect message acknowledgements, but ActionSubscriber
  # will handle sending those acknowledgements right before
  # it calls your subscriber. This way you don't have to worry
  # about the same message being sent to you twice.
  at_most_once!

  def created
    UserProfile.create_for_user(payload)
  end
end

Version data entries

166 entries across 166 versions & 1 rubygems

Version Path
action_subscriber-5.3.3-java examples/at_most_once.rb
action_subscriber-5.3.3 examples/at_most_once.rb
action_subscriber-5.3.2-java examples/at_most_once.rb
action_subscriber-5.3.2 examples/at_most_once.rb
action_subscriber-5.3.1-java examples/at_most_once.rb
action_subscriber-5.3.1 examples/at_most_once.rb
action_subscriber-5.3.1.pre-java examples/at_most_once.rb
action_subscriber-5.3.1.pre examples/at_most_once.rb
action_subscriber-5.3.0-java examples/at_most_once.rb
action_subscriber-5.3.0 examples/at_most_once.rb
action_subscriber-5.2.4-java examples/at_most_once.rb
action_subscriber-5.2.4 examples/at_most_once.rb
action_subscriber-5.2.3-java examples/at_most_once.rb
action_subscriber-5.2.3 examples/at_most_once.rb
action_subscriber-5.2.2-java examples/at_most_once.rb
action_subscriber-5.2.2 examples/at_most_once.rb
action_subscriber-5.2.1-java examples/at_most_once.rb
action_subscriber-5.2.1 examples/at_most_once.rb
action_subscriber-5.2.0-java examples/at_most_once.rb
action_subscriber-5.2.0 examples/at_most_once.rb