Sha256: 555ba42610e822bfc203edce8820684a131dd2142b1d35a6bcb5e12fcbd23712

Contents?: true

Size: 444 Bytes

Versions: 11

Compression:

Stored size: 444 Bytes

Contents

#!/usr/bin/env ruby

require 'amqp'

EventMachine.run do
  AMQP.connect do |connection|
    channel  = AMQP::Channel.new(connection)
    # topic exchange name can be any string
    exchange = channel.topic("cony-test", durable: true)

    # Subscribers.
    channel.queue("", :exclusive => true) do |queue|
      queue.bind(exchange, :routing_key => "#").subscribe do |headers, payload|
        puts payload.inspect
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
cony-2.0.1 bin/cony-receive
cony-2.0.0 bin/cony-receive
cony-1.5.0 bin/cony-receive
cony-1.4.1 bin/cony-receive
cony-1.4.0 bin/cony-receive
cony-1.3.0 bin/cony-receive
cony-1.2.0 bin/cony-receive
cony-1.1.1 bin/cony-receive
cony-1.1.0 bin/cony-receive
cony-1.0.1 bin/cony-receive
cony-1.0.0 bin/cony-receive