Sha256: 565f12ce3c783de64f226063b43302f31209490feaa528d1c0cf5cffe1dc4a05

Contents?: true

Size: 492 Bytes

Versions: 166

Compression:

Stored size: 492 Bytes

Contents

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


  # When we turn on manual acknowledgements RabbitMQ will be expecting us
  # to send back either and acknowledgement or a rejection for each message
  # if we don't send anything back rabbit might stop sending us messages
  manual_acknowledgement!

  def created
    user_profile = UserProfile.create_for_user(payload)
    if user_profile.save
      acknowledge
    else
      reject
    end
  end
end

Version data entries

166 entries across 166 versions & 1 rubygems

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