Sha256: bcbbb5a0cc9ff7106127ca7ada3aed73583d528c95e26a13f354c98d3f3e189b

Contents?: true

Size: 604 Bytes

Versions: 166

Compression:

Stored size: 604 Bytes

Contents

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

  # By turning on the at_least_once! mode we will tell rabbit
  # to expect message acknowledgements, but ActionSubscriber
  # will handle sending those acknowledgements right after
  # it calls your subscriber. If your subscriber raises an error
  # we will reject the message which causes rabbit to try it again.
  # This way if you have an intermittent error (like a failed databse connection)
  # you can get the message again later.
  at_least_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_least_once.rb
action_subscriber-5.3.3 examples/at_least_once.rb
action_subscriber-5.3.2-java examples/at_least_once.rb
action_subscriber-5.3.2 examples/at_least_once.rb
action_subscriber-5.3.1-java examples/at_least_once.rb
action_subscriber-5.3.1 examples/at_least_once.rb
action_subscriber-5.3.1.pre-java examples/at_least_once.rb
action_subscriber-5.3.1.pre examples/at_least_once.rb
action_subscriber-5.3.0-java examples/at_least_once.rb
action_subscriber-5.3.0 examples/at_least_once.rb
action_subscriber-5.2.4-java examples/at_least_once.rb
action_subscriber-5.2.4 examples/at_least_once.rb
action_subscriber-5.2.3-java examples/at_least_once.rb
action_subscriber-5.2.3 examples/at_least_once.rb
action_subscriber-5.2.2-java examples/at_least_once.rb
action_subscriber-5.2.2 examples/at_least_once.rb
action_subscriber-5.2.1-java examples/at_least_once.rb
action_subscriber-5.2.1 examples/at_least_once.rb
action_subscriber-5.2.0-java examples/at_least_once.rb
action_subscriber-5.2.0 examples/at_least_once.rb