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