Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 382 Bytes

HowTest.MD

File metadata and controls

15 lines (11 loc) · 382 Bytes
# Rabbit
require "bunny"
require "json"

connection = ::Bunny.new
connection.start

channel = connection.create_channel
exchange = channel.default_exchange
message = {type: :campaign, data: {id: 1, dirty_attributes: %i(name provider_status), data: {name: "Test campaign", provider_status: "PAUSED"}} }
exchange.publish(message.to_json, routing_key: :facebook_publish)