module Tackle
Constants
- ACK
- NACK
- VERSION
Public Instance Methods
consume(params = {}, &block)
click to toggle source
# File lib/tackle.rb, line 15 def consume(params = {}, &block) params = Tackle::Consumer::Params.new(params) consumer = Tackle::Consumer.new(params) consumer.subscribe(&block) end
publish(message, options = {})
click to toggle source
# File lib/tackle.rb, line 22 def publish(message, options = {}) url = options.fetch(:url) exchange = options.fetch(:exchange) routing_key = options.fetch(:routing_key) logger = options.fetch(:logger, Logger.new(STDOUT)) connection = options.fetch(:connection, nil) Tackle::Publisher.new(url, exchange, routing_key, logger, connection).publish(message) end