amqp 0.7.5 → 0.8.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -4
- data/.travis.yml +3 -5
- data/.yardopts +6 -0
- data/CHANGELOG +26 -7
- data/Gemfile +15 -7
- data/README.textile +216 -0
- data/Rakefile +0 -6
- data/amqp.gemspec +14 -4
- data/bin/jenkins.sh +27 -0
- data/bin/set_test_suite_realms_up.sh +16 -2
- data/docs/VendorSpecificExtensions.textile +32 -0
- data/examples/extensions/rabbitmq/publisher_confirmations_with_transient_messages.rb +53 -0
- data/examples/hello_world.rb +29 -0
- data/examples/real-world/task-queue/README.textile +3 -0
- data/examples/real-world/task-queue/consumer.rb +27 -0
- data/examples/real-world/task-queue/producer.rb +22 -0
- data/examples/various/ack.rb +70 -0
- data/examples/various/automatic_binding_for_default_direct_exchange.rb +53 -0
- data/examples/various/basic_get.rb +65 -0
- data/examples/various/callbacks.rb +45 -0
- data/examples/various/clock.rb +74 -0
- data/examples/various/declare_a_queue_without_assignment.rb +46 -0
- data/examples/various/declare_an_exchange_without_assignment.rb +46 -0
- data/examples/various/hashtable.rb +60 -0
- data/examples/{logger.rb → various/logger.rb} +9 -7
- data/examples/{multiclock.rb → various/multiclock.rb} +15 -17
- data/examples/various/open_channel_without_assignment.rb +34 -0
- data/examples/various/pingpong.rb +53 -0
- data/examples/various/primes-simple.rb +29 -0
- data/examples/various/primes.rb +76 -0
- data/examples/various/pubsub.rb +43 -0
- data/examples/various/queue_status.rb +58 -0
- data/examples/various/stocks.rb +59 -0
- data/examples/various/weather_updates.rb +63 -0
- data/lib/amqp.rb +11 -2
- data/lib/amqp/basic_client.rb +23 -54
- data/lib/amqp/channel.rb +577 -805
- data/lib/amqp/client.rb +37 -275
- data/lib/amqp/connection.rb +165 -93
- data/lib/amqp/deprecated/fork.rb +15 -0
- data/lib/amqp/deprecated/logger.rb +99 -0
- data/lib/amqp/deprecated/mq.rb +20 -0
- data/lib/amqp/deprecated/rpc.rb +168 -0
- data/lib/amqp/exchange.rb +409 -281
- data/lib/amqp/extensions/rabbitmq.rb +1 -0
- data/lib/amqp/header.rb +41 -17
- data/lib/amqp/logger.rb +10 -84
- data/lib/amqp/queue.rb +457 -320
- data/lib/amqp/rpc.rb +11 -107
- data/lib/amqp/version.rb +1 -1
- data/lib/mq.rb +2 -1
- data/lib/mq/logger.rb +2 -0
- data/lib/mq/rpc.rb +2 -0
- data/spec/integration/authentication_spec.rb +36 -40
- data/spec/integration/automatic_binding_for_default_direct_exchange_spec.rb +3 -5
- data/spec/integration/basic_get_spec.rb +91 -0
- data/spec/integration/channel_close_spec.rb +5 -5
- data/spec/integration/exchange_declaration_spec.rb +6 -53
- data/spec/integration/extensions/basic_return_spec.rb +47 -0
- data/spec/integration/queue_declaration_spec.rb +14 -17
- data/spec/integration/queue_exclusivity_spec.rb +49 -48
- data/spec/integration/reply_queue_communication_spec.rb +6 -4
- data/spec/integration/store_and_forward_spec.rb +9 -36
- data/spec/integration/topic_subscription_spec.rb +1 -1
- data/spec/integration/workload_distribution_spec.rb +1 -0
- data/spec/spec_helper.rb +69 -43
- data/spec/unit/amqp/connection_spec.rb +27 -23
- data/tasks.rb +11 -0
- metadata +124 -95
- data/README.md +0 -156
- data/TODO +0 -30
- data/amqp.pre.gemspec +0 -6
- data/examples/ack.rb +0 -47
- data/examples/automatic_binding_for_default_direct_exchange.rb +0 -65
- data/examples/callbacks.rb +0 -40
- data/examples/clock.rb +0 -65
- data/examples/default_channel.rb +0 -19
- data/examples/hashtable.rb +0 -61
- data/examples/immediately_bind_a_server_named_queue.rb +0 -38
- data/examples/internal.rb +0 -51
- data/examples/issues/issue_75.rb +0 -21
- data/examples/issues/issue_94.rb +0 -23
- data/examples/pingpong.rb +0 -54
- data/examples/pop.rb +0 -45
- data/examples/primes-simple.rb +0 -21
- data/examples/primes.rb +0 -101
- data/examples/simple.rb +0 -81
- data/examples/stocks.rb +0 -67
- data/gemfiles/eventmachine-pre +0 -24
- data/lib/amqp/buffer.rb +0 -272
- data/lib/amqp/collection.rb +0 -60
- data/lib/amqp/frame.rb +0 -68
- data/lib/amqp/protocol.rb +0 -163
- data/lib/amqp/server.rb +0 -101
- data/lib/amqp/spec.rb +0 -832
- data/protocol/amqp-0.8.json +0 -617
- data/protocol/amqp-0.8.xml +0 -3908
- data/protocol/codegen.rb +0 -175
- data/protocol/doc.txt +0 -281
- data/research/api.rb +0 -52
- data/research/primes-forked.rb +0 -65
- data/research/primes-processes.rb +0 -137
- data/research/primes-threaded.rb +0 -51
- data/spec/integration/queue_status_spec.rb +0 -44
- data/spec/unit/amqp/buffer_spec.rb +0 -178
- data/spec/unit/amqp/client_spec.rb +0 -102
- data/spec/unit/amqp/collection_spec.rb +0 -144
- data/spec/unit/amqp/frame_spec.rb +0 -60
- data/spec/unit/amqp/protocol_spec.rb +0 -51
data/protocol/codegen.rb
DELETED
@@ -1,175 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'json'
|
5
|
-
|
6
|
-
name = 'amqp-0.8.json'
|
7
|
-
path = File.join(File.dirname(__FILE__), name)
|
8
|
-
s = JSON.parse(File.read(path))
|
9
|
-
|
10
|
-
# require 'pp'
|
11
|
-
# pp(s)
|
12
|
-
# exit
|
13
|
-
|
14
|
-
require 'erb'
|
15
|
-
|
16
|
-
puts ERB.new(%q[
|
17
|
-
#:stopdoc:
|
18
|
-
# this file was autogenerated on <%= Time.now.to_s %>
|
19
|
-
# using <%= name.ljust(16) %> (mtime: <%= File.mtime(path) %>)
|
20
|
-
#
|
21
|
-
# DO NOT EDIT! (edit protocol/codegen.rb instead, and run `rake codegen`)
|
22
|
-
|
23
|
-
module AMQP
|
24
|
-
HEADER = <%= s['name'].dump %>.freeze
|
25
|
-
VERSION_MAJOR = <%= s['major-version'] %>
|
26
|
-
VERSION_MINOR = <%= s['minor-version'] %>
|
27
|
-
PORT = <%= s['port'] %>
|
28
|
-
|
29
|
-
class Frame
|
30
|
-
def self.types
|
31
|
-
@types ||= {}
|
32
|
-
end
|
33
|
-
|
34
|
-
def self.Frame id
|
35
|
-
(@_base_frames ||= {})[id] ||= Class.new(Frame) do
|
36
|
-
class_eval %[
|
37
|
-
def self.inherited klass
|
38
|
-
klass.const_set(:ID, #{id})
|
39
|
-
Frame.types[#{id}] = klass
|
40
|
-
end
|
41
|
-
]
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
<%- s['constants'].select { |c| (1..8).include? c['value'] }.each do |c| -%>
|
46
|
-
class <%= c['name'].gsub(/^FRAME-/, '').split('-').map { |w| w.downcase.capitalize}.join.ljust(9) -%> < Frame( <%= c['value'] -%> ); end
|
47
|
-
<%- end -%>
|
48
|
-
|
49
|
-
FOOTER = <%= frame_end = s['constants'].find { |c| c['name'] == 'FRAME-END' }['value'] %>
|
50
|
-
end
|
51
|
-
|
52
|
-
RESPONSES = {
|
53
|
-
<%- s['constants'].select { |c| c['value'] != frame_end and (200..500).include? c['value'] }.each do |c| -%>
|
54
|
-
<%= c['value'] %> => :<%= c['name'].tr('-', '_').gsub(/^FRAME_/, '').upcase -%>,
|
55
|
-
<%- end -%>
|
56
|
-
}
|
57
|
-
|
58
|
-
FIELDS = [
|
59
|
-
<%- s['domains'].select { |d| d.first == d.last }.each do |d| -%>
|
60
|
-
:<%= d.first -%>,
|
61
|
-
<%- end -%>
|
62
|
-
]
|
63
|
-
|
64
|
-
module Protocol
|
65
|
-
class Class
|
66
|
-
class << self
|
67
|
-
FIELDS.each do |f|
|
68
|
-
class_eval %[
|
69
|
-
def #{f} name
|
70
|
-
properties << [ :#{f}, name ] unless properties.include?([:#{f}, name])
|
71
|
-
attr_accessor name
|
72
|
-
end
|
73
|
-
]
|
74
|
-
end
|
75
|
-
|
76
|
-
def properties() @properties ||= [] end
|
77
|
-
|
78
|
-
def id() self::ID end
|
79
|
-
def name() self::NAME.to_s end
|
80
|
-
end
|
81
|
-
|
82
|
-
class Method
|
83
|
-
class << self
|
84
|
-
FIELDS.each do |f|
|
85
|
-
class_eval %[
|
86
|
-
def #{f} name
|
87
|
-
arguments << [ :#{f}, name ] unless arguments.include?([:#{f}, name])
|
88
|
-
attr_accessor name
|
89
|
-
end
|
90
|
-
]
|
91
|
-
end
|
92
|
-
|
93
|
-
def arguments() @arguments ||= [] end
|
94
|
-
|
95
|
-
def section() Protocol.const_get(self.to_s[/Protocol::(.+?)::/, 1]) end
|
96
|
-
def id() self::ID end
|
97
|
-
def name() self::NAME.to_s end
|
98
|
-
end
|
99
|
-
|
100
|
-
def == b
|
101
|
-
self.class.arguments.inject(true) do |eql, (type, name)|
|
102
|
-
eql and __send__("#{name}") == b.__send__("#{name}")
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
107
|
-
def self.methods() @methods ||= {} end
|
108
|
-
|
109
|
-
def self.Method(id, name)
|
110
|
-
@_base_methods ||= {}
|
111
|
-
@_base_methods[id] ||= ::Class.new(Method) do
|
112
|
-
class_eval %[
|
113
|
-
def self.inherited klass
|
114
|
-
klass.const_set(:ID, #{id})
|
115
|
-
klass.const_set(:NAME, :#{name.to_s})
|
116
|
-
klass.section.methods[#{id}] = klass
|
117
|
-
klass.section.methods[klass::NAME] = klass
|
118
|
-
end
|
119
|
-
]
|
120
|
-
end
|
121
|
-
end
|
122
|
-
end
|
123
|
-
|
124
|
-
def self.classes() @classes ||= {} end
|
125
|
-
|
126
|
-
def self.Class(id, name)
|
127
|
-
@_base_classes ||= {}
|
128
|
-
@_base_classes[id] ||= ::Class.new(Class) do
|
129
|
-
class_eval %[
|
130
|
-
def self.inherited klass
|
131
|
-
klass.const_set(:ID, #{id})
|
132
|
-
klass.const_set(:NAME, :#{name.to_s})
|
133
|
-
Protocol.classes[#{id}] = klass
|
134
|
-
Protocol.classes[klass::NAME] = klass
|
135
|
-
end
|
136
|
-
]
|
137
|
-
end
|
138
|
-
end
|
139
|
-
end
|
140
|
-
end
|
141
|
-
|
142
|
-
module AMQP
|
143
|
-
module Protocol
|
144
|
-
<%- s['classes'].each do |c| -%>
|
145
|
-
class <%= c['name'].capitalize.ljust(12) %> < Class( <%= c['id'].to_s.rjust(3) %>, :<%= c['name'].ljust(12) %> ); end
|
146
|
-
<%- end -%>
|
147
|
-
|
148
|
-
<%- s['classes'].each do |c| -%>
|
149
|
-
class <%= c['name'].capitalize %>
|
150
|
-
<%- c['properties'].each do |p| -%>
|
151
|
-
<%= p['type'].ljust(10) %> :<%= p['name'].tr('-', '_') %>
|
152
|
-
<%- end if c['properties'] -%>
|
153
|
-
|
154
|
-
<%- c['methods'].each do |m| -%>
|
155
|
-
class <%= m['name'].capitalize.gsub(/-(.)/) { "#{$1.upcase}"}.ljust(12) %> < Method( <%= m['id'].to_s.rjust(3) %>, :<%= m['name'].tr('- ', '_').ljust(14) %> ); end
|
156
|
-
<%- end -%>
|
157
|
-
|
158
|
-
<%- c['methods'].each do |m| -%>
|
159
|
-
class <%= m['name'].capitalize.gsub(/-(.)/) { "#{$1.upcase}"} %>
|
160
|
-
<%- m['arguments'].each do |a| -%>
|
161
|
-
<%- if a['domain'] -%>
|
162
|
-
<%= s['domains'].find { |k, v| k == a['domain']}.last.ljust(10) %> :<%= a['name'].tr('- ', '_') %>
|
163
|
-
<%- else -%>
|
164
|
-
<%= a['type'].ljust(10) %> :<%= a['name'].tr('- ', '_') %>
|
165
|
-
<%- end -%>
|
166
|
-
<%- end if m['arguments'] -%>
|
167
|
-
end
|
168
|
-
|
169
|
-
<%- end -%>
|
170
|
-
end
|
171
|
-
|
172
|
-
<%- end -%>
|
173
|
-
end
|
174
|
-
end
|
175
|
-
].gsub!(/^ /, ''), nil, '>-%').result(binding)
|
data/protocol/doc.txt
DELETED
@@ -1,281 +0,0 @@
|
|
1
|
-
["connected"]
|
2
|
-
|
3
|
-
["send_data", "AMQP"]
|
4
|
-
|
5
|
-
["send_data", "\001\001\b\000"]
|
6
|
-
|
7
|
-
["receive_data",
|
8
|
-
"\001\000\000\000\000\001&\000\n\000\n\b\000\000\000\001\001\aproductS\000\000\000\bRabbitMQ\aversionS\000\000\000\v%%VERSION%%\bplatformS\000\000\000\nErlang/OTP\tcopyrightS\000\000\000gCopyright (C) 2007-2008 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd.\vinformationS\000\000\0005Licensed under the MPL. See http://www.rabbitmq.com/\000\000\000\016PLAIN AMQPLAIN\000\000\000\005en_US\316"]
|
9
|
-
|
10
|
-
["receive",
|
11
|
-
#<AMQP::Frame::Method:0x11b90d0
|
12
|
-
@channel=0,
|
13
|
-
@payload=
|
14
|
-
#<AMQP::Protocol::Connection::Start:0x11b8d38
|
15
|
-
@debug=1,
|
16
|
-
@locales="en_US",
|
17
|
-
@mechanisms="PLAIN AMQPLAIN",
|
18
|
-
@server_properties=
|
19
|
-
{:information=>"Licensed under the MPL. See http://www.rabbitmq.com/",
|
20
|
-
:copyright=>
|
21
|
-
"Copyright (C) 2007-2008 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd.",
|
22
|
-
:platform=>"Erlang/OTP",
|
23
|
-
:version=>"%%VERSION%%",
|
24
|
-
:product=>"RabbitMQ"},
|
25
|
-
@version_major=8,
|
26
|
-
@version_minor=0>>]
|
27
|
-
|
28
|
-
["send",
|
29
|
-
#<AMQP::Frame::Method:0x11a3078
|
30
|
-
@channel=0,
|
31
|
-
@payload=
|
32
|
-
#<AMQP::Protocol::Connection::StartOk:0x11a3294
|
33
|
-
@client_properties=
|
34
|
-
{:information=>"http://github.com/tmm1/amqp",
|
35
|
-
:version=>"0.1.0",
|
36
|
-
:product=>"AMQP",
|
37
|
-
:platform=>"Ruby/EventMachine"},
|
38
|
-
@debug=1,
|
39
|
-
@locale="en_US",
|
40
|
-
@mechanism="AMQPLAIN",
|
41
|
-
@response={:LOGIN=>"guest", :PASSWORD=>"guest"}>>]
|
42
|
-
|
43
|
-
["send_data",
|
44
|
-
"\001\000\000\000\000\000\254\000\n\000\v\000\000\000n\vinformationS\000\000\000\ehttp://github.com/tmm1/amqp\aversionS\000\000\000\0050.1.0\aproductS\000\000\000\004AMQP\bplatformS\000\000\000\021Ruby/EventMachine\bAMQPLAIN\000\000\000#\005LOGINS\000\000\000\005guest\bPASSWORDS\000\000\000\005guest\005en_US\316"]
|
45
|
-
|
46
|
-
["receive_data",
|
47
|
-
"\001\000\000\000\000\000\f\000\n\000\036\000\000\000\002\000\000\000\000\316"]
|
48
|
-
|
49
|
-
["receive",
|
50
|
-
#<AMQP::Frame::Method:0x11898e4
|
51
|
-
@channel=0,
|
52
|
-
@payload=
|
53
|
-
#<AMQP::Protocol::Connection::Tune:0x118954c
|
54
|
-
@channel_max=0,
|
55
|
-
@debug=1,
|
56
|
-
@frame_max=131072,
|
57
|
-
@heartbeat=0>>]
|
58
|
-
|
59
|
-
["send",
|
60
|
-
#<AMQP::Frame::Method:0x117fb14
|
61
|
-
@channel=0,
|
62
|
-
@payload=
|
63
|
-
#<AMQP::Protocol::Connection::TuneOk:0x117fd1c
|
64
|
-
@channel_max=0,
|
65
|
-
@debug=1,
|
66
|
-
@frame_max=131072,
|
67
|
-
@heartbeat=0>>]
|
68
|
-
|
69
|
-
["send_data",
|
70
|
-
"\001\000\000\000\000\000\f\000\n\000\037\000\000\000\002\000\000\000\000\316"]
|
71
|
-
|
72
|
-
["send",
|
73
|
-
#<AMQP::Frame::Method:0x11741d8
|
74
|
-
@channel=0,
|
75
|
-
@payload=
|
76
|
-
#<AMQP::Protocol::Connection::Open:0x1174408
|
77
|
-
@capabilities="",
|
78
|
-
@debug=1,
|
79
|
-
@insist=nil,
|
80
|
-
@virtual_host="/">>]
|
81
|
-
|
82
|
-
["send_data", "\001\000\000\000\000\000\b\000\n\000(\001/\000\000\316"]
|
83
|
-
|
84
|
-
["receive_data",
|
85
|
-
"\001\000\000\000\000\000\025\000\n\000)\020julie.local:5672\316"]
|
86
|
-
|
87
|
-
["receive",
|
88
|
-
#<AMQP::Frame::Method:0x11665ec
|
89
|
-
@channel=0,
|
90
|
-
@payload=
|
91
|
-
#<AMQP::Protocol::Connection::OpenOk:0x1166254
|
92
|
-
@debug=1,
|
93
|
-
@known_hosts="julie.local:5672">>]
|
94
|
-
|
95
|
-
["send",
|
96
|
-
#<AMQP::Frame::Method:0x115e950
|
97
|
-
@channel=1,
|
98
|
-
@payload=
|
99
|
-
#<AMQP::Protocol::Channel::Open:0x115ebf8 @debug=1, @out_of_band=nil>>]
|
100
|
-
|
101
|
-
["send_data", "\001\000\001\000\000\000\005\000\024\000\n\000\316"]
|
102
|
-
|
103
|
-
["receive_data", "\001\000\001\000\000\000\004\000\024\000\v\316"]
|
104
|
-
|
105
|
-
["receive",
|
106
|
-
#<AMQP::Frame::Method:0x11534d8
|
107
|
-
@channel=1,
|
108
|
-
@payload=#<AMQP::Protocol::Channel::OpenOk:0x1153140 @debug=1>>]
|
109
|
-
|
110
|
-
["send",
|
111
|
-
#<AMQP::Frame::Method:0x114d0ec
|
112
|
-
@channel=1,
|
113
|
-
@payload=
|
114
|
-
#<AMQP::Protocol::Access::Request:0x114d434
|
115
|
-
@active=true,
|
116
|
-
@debug=1,
|
117
|
-
@exclusive=nil,
|
118
|
-
@passive=nil,
|
119
|
-
@read=true,
|
120
|
-
@realm="/data",
|
121
|
-
@write=true>>]
|
122
|
-
|
123
|
-
["send_data", "\001\000\001\000\000\000\v\000\036\000\n\005/data\034\316"]
|
124
|
-
|
125
|
-
["receive_data", "\001\000\001\000\000\000\006\000\036\000\v\000e\316"]
|
126
|
-
|
127
|
-
["receive",
|
128
|
-
#<AMQP::Frame::Method:0x113c9a4
|
129
|
-
@channel=1,
|
130
|
-
@payload=
|
131
|
-
#<AMQP::Protocol::Access::RequestOk:0x113c60c @debug=1, @ticket=101>>]
|
132
|
-
|
133
|
-
["send",
|
134
|
-
#<AMQP::Frame::Method:0x1135000
|
135
|
-
@channel=1,
|
136
|
-
@payload=
|
137
|
-
#<AMQP::Protocol::Queue::Declare:0x1135460
|
138
|
-
@arguments=nil,
|
139
|
-
@auto_delete=true,
|
140
|
-
@debug=1,
|
141
|
-
@durable=nil,
|
142
|
-
@exclusive=nil,
|
143
|
-
@nowait=nil,
|
144
|
-
@passive=nil,
|
145
|
-
@queue="",
|
146
|
-
@ticket=101>>]
|
147
|
-
|
148
|
-
["send_data",
|
149
|
-
"\001\000\001\000\000\000\f\0002\000\n\000e\000\b\000\000\000\000\316"]
|
150
|
-
|
151
|
-
["receive_data",
|
152
|
-
"\001\000\001\000\000\000-\0002\000\v amq.gen-RCSkW3cCvMc1I0wXBcLYSg==\000\000\000\000\000\000\000\000\316"]
|
153
|
-
|
154
|
-
["receive",
|
155
|
-
#<AMQP::Frame::Method:0x1122838
|
156
|
-
@channel=1,
|
157
|
-
@payload=
|
158
|
-
#<AMQP::Protocol::Queue::DeclareOk:0x11224a0
|
159
|
-
@consumer_count=0,
|
160
|
-
@debug=1,
|
161
|
-
@message_count=0,
|
162
|
-
@queue="amq.gen-RCSkW3cCvMc1I0wXBcLYSg==">>]
|
163
|
-
|
164
|
-
["send",
|
165
|
-
#<AMQP::Frame::Method:0x1118860
|
166
|
-
@channel=1,
|
167
|
-
@payload=
|
168
|
-
#<AMQP::Protocol::Queue::Bind:0x1118ba8
|
169
|
-
@arguments=nil,
|
170
|
-
@debug=1,
|
171
|
-
@exchange="",
|
172
|
-
@nowait=nil,
|
173
|
-
@queue="amq.gen-RCSkW3cCvMc1I0wXBcLYSg==",
|
174
|
-
@routing_key="test_route",
|
175
|
-
@ticket=101>>]
|
176
|
-
|
177
|
-
["send_data",
|
178
|
-
"\001\000\001\000\000\0008\0002\000\024\000e amq.gen-RCSkW3cCvMc1I0wXBcLYSg==\000\ntest_route\000\000\000\000\000\316"]
|
179
|
-
|
180
|
-
["receive_data", "\001\000\001\000\000\000\004\0002\000\025\316"]
|
181
|
-
|
182
|
-
["receive",
|
183
|
-
#<AMQP::Frame::Method:0x1107a4c
|
184
|
-
@channel=1,
|
185
|
-
@payload=#<AMQP::Protocol::Queue::BindOk:0x11076b4 @debug=1>>]
|
186
|
-
|
187
|
-
["send",
|
188
|
-
#<AMQP::Frame::Method:0x11015d4
|
189
|
-
@channel=1,
|
190
|
-
@payload=
|
191
|
-
#<AMQP::Protocol::Basic::Consume:0x11019bc
|
192
|
-
@consumer_tag=nil,
|
193
|
-
@debug=1,
|
194
|
-
@exclusive=nil,
|
195
|
-
@no_ack=true,
|
196
|
-
@no_local=nil,
|
197
|
-
@nowait=nil,
|
198
|
-
@queue="amq.gen-RCSkW3cCvMc1I0wXBcLYSg==",
|
199
|
-
@ticket=101>>]
|
200
|
-
|
201
|
-
["send_data",
|
202
|
-
"\001\000\001\000\000\000)\000<\000\024\000e amq.gen-RCSkW3cCvMc1I0wXBcLYSg==\000\002\316"]
|
203
|
-
|
204
|
-
["receive_data",
|
205
|
-
"\001\000\001\000\000\000&\000<\000\025!amq.ctag-wFbDeuYKGEm7tXh8oaE5Qg==\316"]
|
206
|
-
|
207
|
-
["receive",
|
208
|
-
#<AMQP::Frame::Method:0x5f6cfc
|
209
|
-
@channel=1,
|
210
|
-
@payload=
|
211
|
-
#<AMQP::Protocol::Basic::ConsumeOk:0x5f67e8
|
212
|
-
@consumer_tag="amq.ctag-wFbDeuYKGEm7tXh8oaE5Qg==",
|
213
|
-
@debug=1>>]
|
214
|
-
|
215
|
-
["send",
|
216
|
-
#<AMQP::Frame::Method:0x5e3dc8
|
217
|
-
@channel=1,
|
218
|
-
@payload=
|
219
|
-
#<AMQP::Protocol::Basic::Publish:0x5e4264
|
220
|
-
@debug=1,
|
221
|
-
@exchange="",
|
222
|
-
@immediate=nil,
|
223
|
-
@mandatory=nil,
|
224
|
-
@routing_key="test_route",
|
225
|
-
@ticket=101>>]
|
226
|
-
|
227
|
-
["send_data",
|
228
|
-
"\001\000\001\000\000\000\023\000<\000(\000e\000\ntest_route\000\316"]
|
229
|
-
|
230
|
-
["send",
|
231
|
-
#<AMQP::Frame::Header:0x5bc994
|
232
|
-
@channel=1,
|
233
|
-
@payload=
|
234
|
-
#<AMQP::Protocol::Header:0x5bcb88
|
235
|
-
@klass=AMQP::Protocol::Basic,
|
236
|
-
@properties=
|
237
|
-
{:delivery_mode=>1,
|
238
|
-
:priority=>1,
|
239
|
-
:content_type=>"application/octet-stream"},
|
240
|
-
@size=15,
|
241
|
-
@weight=0>>]
|
242
|
-
|
243
|
-
["send_data",
|
244
|
-
"\002\000\001\000\000\000)\000<\000\000\000\000\000\000\000\000\000\017\230\000\030application/octet-stream\001\001\316"]
|
245
|
-
|
246
|
-
["send", #<AMQP::Frame::Body:0x57cfc4 @channel=1, @payload="this is a test!">]
|
247
|
-
|
248
|
-
["send_data", "\003\000\001\000\000\000\017this is a test!\316"]
|
249
|
-
|
250
|
-
["receive_data",
|
251
|
-
"\001\000\001\000\000\000;\000<\000<!amq.ctag-wFbDeuYKGEm7tXh8oaE5Qg==\000\000\000\000\000\000\000\001\000\000\ntest_route\316\002\000\001\000\000\000)\000<\000\000\000\000\000\000\000\000\000\017\230\000\030application/octet-stream\001\001\316\003\000\001\000\000\000\017this is a test!\316"]
|
252
|
-
|
253
|
-
["receive",
|
254
|
-
#<AMQP::Frame::Method:0x55cbe8
|
255
|
-
@channel=1,
|
256
|
-
@payload=
|
257
|
-
#<AMQP::Protocol::Basic::Deliver:0x55b810
|
258
|
-
@consumer_tag="amq.ctag-wFbDeuYKGEm7tXh8oaE5Qg==",
|
259
|
-
@debug=1,
|
260
|
-
@delivery_tag=1,
|
261
|
-
@exchange="",
|
262
|
-
@redelivered=false,
|
263
|
-
@routing_key="test_route">>]
|
264
|
-
|
265
|
-
["receive",
|
266
|
-
#<AMQP::Frame::Header:0x537af0
|
267
|
-
@channel=1,
|
268
|
-
@payload=
|
269
|
-
#<AMQP::Protocol::Header:0x537a28
|
270
|
-
@klass=AMQP::Protocol::Basic,
|
271
|
-
@properties=
|
272
|
-
{:delivery_mode=>1,
|
273
|
-
:priority=>1,
|
274
|
-
:content_type=>"application/octet-stream"},
|
275
|
-
@size=15,
|
276
|
-
@weight=0>>]
|
277
|
-
|
278
|
-
["receive",
|
279
|
-
#<AMQP::Frame::Body:0x505f64 @channel=1, @payload="this is a test!">]
|
280
|
-
|
281
|
-
^C["disconnected"]
|