Sha256: 28a92f1ce9684906379e1bc21947ce7d294efde476ed5c563b54c97d1f737e3f

Contents?: true

Size: 358 Bytes

Versions: 2

Compression:

Stored size: 358 Bytes

Contents

require_relative "../lib/message_queue"

MessageQueue.with_connection(:adapter => :bunny, :serializer => :message_pack) do |conn|
  producer = conn.new_producer(
    :exchange => {
      :name => "time",
      :type => :topic
    },
    :message => {
      :routing_key => "time.now",
      :mandatory => true
    }
  )

  producer.publish Time.now.to_s
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
message_queue-0.1.1 examples/producer.rb
message_queue-0.1.0 examples/producer.rb