Sha256: 8fe18b11cafae49b73944a95baaf0f0b14d6807497e699712512375e113a06c1
Contents?: true
Size: 998 Bytes
Versions: 51
Compression:
Stored size: 998 Bytes
Contents
# encoding: utf-8 require 'spec_helper' unless ENV["CI"] describe "Message acknowledgements" do # # Environment # include EventedSpec::AMQPSpec default_timeout 120 amqp_before do @connection = AMQP.connect @channel1 = AMQP::Channel.new(@connection) @channel2 = AMQP::Channel.new(@connection) end it "can be issued for delivery tags >= 192" do exchange_name = "amqpgem.tests.fanout#{rand}" queue = @channel1.queue("", :auto_delete => true).bind(exchange_name).subscribe(:ack => true) do |metadata, payload| puts "x-sequence = #{metadata.headers['x-sequence']}, delivery_tag = #{metadata.delivery_tag}" if ENV["DEBUG"] metadata.ack if metadata.delivery_tag >= 999 done(1.0) end end exchange = @channel2.fanout(exchange_name, :durable => false) 2000.times do |i| exchange.publish("", :headers => { 'x-sequence' => i }) end end end end
Version data entries
51 entries across 51 versions & 1 rubygems