Skip to content

Set message consumption in classes #11

@brandonhilkert

Description

@brandonhilkert

Another is option is to set this in the model/class that's listening like https://github.com/gocardless/hutch#defining-consumers:

class PersonCreateConsumer
  include Mantle::Consumer
  consume ['user.login', 'person.create']

  def self.receive(channel, message)
    # do some work
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions