bunny 0.7.12 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/.gitignore +2 -2
  2. data/.travis.yml +7 -16
  3. data/CHANGELOG +3 -21
  4. data/Gemfile +2 -4
  5. data/README.textile +31 -9
  6. data/Rakefile +3 -3
  7. data/bunny.gemspec +6 -3
  8. data/examples/{simple_08.rb → simple.rb} +1 -1
  9. data/examples/{simple_ack_08.rb → simple_ack.rb} +1 -1
  10. data/examples/{simple_consumer_08.rb → simple_consumer.rb} +4 -4
  11. data/examples/{simple_fanout_08.rb → simple_fanout.rb} +1 -1
  12. data/examples/{simple_headers_08.rb → simple_headers.rb} +2 -2
  13. data/examples/{simple_publisher_09.rb → simple_publisher.rb} +1 -1
  14. data/examples/{simple_topic_09.rb → simple_topic.rb} +2 -2
  15. data/ext/amqp-0.9.1.json +1 -0
  16. data/ext/config.yml +3 -3
  17. data/ext/qparser.rb +9 -52
  18. data/lib/bunny.rb +15 -33
  19. data/lib/bunny/{channel08.rb → channel.rb} +0 -0
  20. data/lib/bunny/{client09.rb → client.rb} +34 -46
  21. data/lib/bunny/{exchange09.rb → exchange.rb} +16 -15
  22. data/lib/bunny/{queue09.rb → queue.rb} +26 -23
  23. data/lib/bunny/{subscription09.rb → subscription.rb} +11 -6
  24. data/lib/bunny/version.rb +1 -1
  25. data/lib/qrack/client.rb +30 -21
  26. data/lib/qrack/protocol/{protocol08.rb → protocol.rb} +2 -1
  27. data/lib/qrack/protocol/{spec09.rb → spec.rb} +8 -7
  28. data/lib/qrack/{qrack08.rb → qrack.rb} +4 -4
  29. data/lib/qrack/subscription.rb +58 -9
  30. data/lib/qrack/transport/{buffer08.rb → buffer.rb} +8 -0
  31. data/lib/qrack/transport/{frame08.rb → frame.rb} +7 -22
  32. data/spec/spec_09/bunny_spec.rb +10 -8
  33. data/spec/spec_09/connection_spec.rb +8 -3
  34. data/spec/spec_09/exchange_spec.rb +22 -19
  35. data/spec/spec_09/queue_spec.rb +32 -18
  36. metadata +69 -76
  37. checksums.yaml +0 -7
  38. data/examples/simple_09.rb +0 -32
  39. data/examples/simple_ack_09.rb +0 -35
  40. data/examples/simple_consumer_09.rb +0 -55
  41. data/examples/simple_fanout_09.rb +0 -41
  42. data/examples/simple_headers_09.rb +0 -42
  43. data/examples/simple_publisher_08.rb +0 -29
  44. data/examples/simple_topic_08.rb +0 -61
  45. data/ext/amqp-0.8.json +0 -616
  46. data/lib/bunny/channel09.rb +0 -39
  47. data/lib/bunny/client08.rb +0 -480
  48. data/lib/bunny/exchange08.rb +0 -177
  49. data/lib/bunny/queue08.rb +0 -403
  50. data/lib/bunny/subscription08.rb +0 -87
  51. data/lib/qrack/protocol/protocol09.rb +0 -135
  52. data/lib/qrack/protocol/spec08.rb +0 -828
  53. data/lib/qrack/qrack09.rb +0 -20
  54. data/lib/qrack/transport/buffer09.rb +0 -305
  55. data/lib/qrack/transport/frame09.rb +0 -97
  56. data/spec/spec_08/bunny_spec.rb +0 -75
  57. data/spec/spec_08/connection_spec.rb +0 -24
  58. data/spec/spec_08/exchange_spec.rb +0 -170
  59. data/spec/spec_08/queue_spec.rb +0 -239
@@ -1,87 +0,0 @@
1
- # encoding: utf-8
2
-
3
- module Bunny
4
-
5
- =begin rdoc
6
-
7
- === DESCRIPTION:
8
-
9
- Asks the server to start a "consumer", which is a transient request for messages from a specific
10
- queue. Consumers last as long as the channel they were created on, or until the client cancels them
11
- with an _unsubscribe_. Every time a message reaches the queue it is passed to the _blk_ for
12
- processing. If error occurs, _Bunny_::_ProtocolError_ is raised.
13
-
14
- ==== OPTIONS:
15
- * <tt>:consumer_tag => '_tag_'</tt> - Specifies the identifier for the consumer. The consumer tag is
16
- local to a connection, so two clients can use the same consumer tags. If this option is not
17
- specified a server generated name is used.
18
- * <tt>:ack => false (_default_) or true</tt> - If set to _false_, the server does not expect an
19
- acknowledgement message from the client. If set to _true_, the server expects an acknowledgement
20
- message from the client and will re-queue the message if it does not receive one within a time specified
21
- by the server.
22
- * <tt>:exclusive => true or false (_default_)</tt> - Request exclusive consumer access, meaning
23
- only this consumer can access the queue.
24
- * <tt>:nowait => true or false (_default_)</tt> - Ignored by Bunny, always _false_.
25
- * <tt>:timeout => number of seconds - The subscribe loop will continue to wait for
26
- messages until terminated (Ctrl-C or kill command) or this timeout interval is reached.
27
- * <tt>:message_max => max number messages to process</tt> - When the required number of messages
28
- is processed subscribe loop is exited.
29
-
30
- ==== OPERATION:
31
-
32
- Passes a hash of message information to the block, if one has been supplied. The hash contains
33
- :header, :payload and :delivery_details. The structure of the data is as follows -
34
-
35
- :header has instance variables -
36
- @klass
37
- @size
38
- @weight
39
- @properties is a hash containing -
40
- :content_type
41
- :delivery_mode
42
- :priority
43
-
44
- :payload contains the message contents
45
-
46
- :delivery details is a hash containing -
47
- :consumer_tag
48
- :delivery_tag
49
- :redelivered
50
- :exchange
51
- :routing_key
52
-
53
- If the :timeout option is specified then the subscription will
54
- automatically cease if the given number of seconds passes with no
55
- message arriving.
56
-
57
- ==== EXAMPLES
58
-
59
- my_queue.subscribe(:timeout => 5) {|msg| puts msg[:payload]}
60
-
61
- my_queue.subscribe(:message_max => 10, :ack => true) {|msg| puts msg[:payload]}
62
-
63
- =end
64
-
65
- class Subscription < Bunny::Consumer
66
-
67
- def setup_consumer
68
- subscription_options = {
69
- :queue => queue.name,
70
- :consumer_tag => consumer_tag,
71
- :no_ack => !ack,
72
- :exclusive => exclusive,
73
- :nowait => false
74
- }.merge(@opts)
75
-
76
- client.send_frame(Qrack::Protocol::Basic::Consume.new(subscription_options))
77
-
78
- method = client.next_method
79
-
80
- client.check_response(method, Qrack::Protocol::Basic::ConsumeOk, "Error subscribing to queue #{queue.name}")
81
-
82
- @consumer_tag = method.consumer_tag
83
- end
84
-
85
- end
86
-
87
- end
@@ -1,135 +0,0 @@
1
- # encoding: utf-8
2
-
3
- module Qrack
4
- module Protocol09
5
- #:stopdoc:
6
- class Class::Method
7
- def initialize *args
8
- opts = args.pop if args.last.is_a? Hash
9
- opts ||= {}
10
-
11
- if args.size == 1 and args.first.is_a? Transport09::Buffer
12
- buf = args.shift
13
- else
14
- buf = nil
15
- end
16
-
17
- self.class.arguments.each do |type, name|
18
- val = buf ? buf.read(type) :
19
- args.shift || opts[name] || opts[name.to_s]
20
- instance_variable_set("@#{name}", val)
21
- end
22
- end
23
-
24
- def arguments
25
- self.class.arguments.inject({}) do |hash, (type, name)|
26
- hash.update name => instance_variable_get("@#{name}")
27
- end
28
- end
29
-
30
- def to_binary
31
- buf = Transport09::Buffer.new
32
- buf.write :short, self.class.parent.id
33
- buf.write :short, self.class.id
34
-
35
- bits = []
36
-
37
- self.class.arguments.each do |type, name|
38
- val = instance_variable_get("@#{name}")
39
- if type == :bit
40
- bits << (val || false)
41
- else
42
- unless bits.empty?
43
- buf.write :bit, bits
44
- bits = []
45
- end
46
- buf.write type, val
47
- end
48
- end
49
-
50
- buf.write :bit, bits unless bits.empty?
51
- buf.rewind
52
-
53
- buf
54
- end
55
-
56
- def to_s
57
- to_binary.to_s
58
- end
59
-
60
- def to_frame channel = 0
61
- Transport09::Method.new(self, channel)
62
- end
63
- end
64
-
65
- class Header
66
- def initialize *args
67
- opts = args.pop if args.last.is_a? Hash
68
- opts ||= {}
69
-
70
- first = args.shift
71
-
72
- if first.is_a? ::Class and first.ancestors.include? Protocol09::Class
73
- @klass = first
74
- @size = args.shift || 0
75
- @weight = args.shift || 0
76
- @properties = opts
77
-
78
- elsif first.is_a? Transport09::Buffer or first.is_a? String
79
- buf = first
80
- buf = Transport09::Buffer.new(buf) unless buf.is_a? Transport09::Buffer
81
-
82
- @klass = Protocol09.classes[buf.read(:short)]
83
- @weight = buf.read(:short)
84
- @size = buf.read(:longlong)
85
-
86
- props = buf.read(:properties, *klass.properties.map{|type,_| type })
87
- @properties = Hash[*klass.properties.map{|_,name| name }.zip(props).reject{|k,v| v.nil? }.flatten]
88
-
89
- else
90
- raise ArgumentError, 'Invalid argument'
91
- end
92
-
93
- end
94
- attr_accessor :klass, :size, :weight, :properties
95
-
96
- def to_binary
97
- buf = Transport09::Buffer.new
98
- buf.write :short, klass.id
99
- buf.write :short, weight # XXX rabbitmq only supports weight == 0
100
- buf.write :longlong, size
101
- buf.write :properties, (klass.properties.map do |type, name|
102
- [ type, properties[name] || properties[name.to_s] ]
103
- end)
104
- buf.rewind
105
- buf
106
- end
107
-
108
- def to_s
109
- to_binary.to_s
110
- end
111
-
112
- def to_frame channel = 0
113
- Transport09::Header.new(self, channel)
114
- end
115
-
116
- def == header
117
- [ :klass, :size, :weight, :properties ].inject(true) do |eql, field|
118
- eql and __send__(field) == header.__send__(field)
119
- end
120
- end
121
-
122
- def method_missing meth, *args, &blk
123
- @properties.has_key?(meth) || @klass.properties.find{|_,name| name == meth } ? @properties[meth] :
124
- super
125
- end
126
- end
127
-
128
- def self.parse buf
129
- buf = Transport09::Buffer.new(buf) unless buf.is_a? Transport09::Buffer
130
- class_id, method_id = buf.read(:short, :short)
131
- classes[class_id].methods[method_id].new(buf)
132
- end
133
-
134
- end
135
- end
@@ -1,828 +0,0 @@
1
-
2
- # encoding: utf-8
3
-
4
-
5
- #:stopdoc:
6
- # this file was autogenerated on 2011-07-21 07:15:33 +0100
7
- # using amqp-0.8.json (mtime: 2011-07-20 19:11:32 +0100)
8
- #
9
- # DO NOT EDIT! (edit ext/qparser.rb and config.yml instead, and run 'ruby qparser.rb')
10
-
11
- module Qrack
12
- module Protocol
13
- HEADER = "AMQP".freeze
14
- VERSION_MAJOR = 8
15
- VERSION_MINOR = 0
16
- REVISION = 0
17
- PORT = 5672
18
-
19
- RESPONSES = {
20
- 200 => :REPLY_SUCCESS,
21
- 310 => :NOT_DELIVERED,
22
- 311 => :CONTENT_TOO_LARGE,
23
- 312 => :NO_ROUTE,
24
- 313 => :NO_CONSUMERS,
25
- 320 => :CONNECTION_FORCED,
26
- 402 => :INVALID_PATH,
27
- 403 => :ACCESS_REFUSED,
28
- 404 => :NOT_FOUND,
29
- 405 => :RESOURCE_LOCKED,
30
- 406 => :PRECONDITION_FAILED,
31
- 502 => :SYNTAX_ERROR,
32
- 503 => :COMMAND_INVALID,
33
- 504 => :CHANNEL_ERROR,
34
- 506 => :RESOURCE_ERROR,
35
- 530 => :NOT_ALLOWED,
36
- 540 => :NOT_IMPLEMENTED,
37
- 541 => :INTERNAL_ERROR,
38
- }
39
-
40
- FIELDS = [
41
- :bit,
42
- :long,
43
- :longlong,
44
- :longstr,
45
- :octet,
46
- :short,
47
- :shortstr,
48
- :table,
49
- :timestamp,
50
- ]
51
-
52
- class Class
53
- class << self
54
- FIELDS.each do |f|
55
- class_eval %[
56
- def #{f} name
57
- properties << [ :#{f}, name ] unless properties.include?([:#{f}, name])
58
- attr_accessor name
59
- end
60
- ]
61
- end
62
-
63
- def properties() @properties ||= [] end
64
-
65
- def id() self::ID end
66
- def name() self::NAME.to_s end
67
- end
68
-
69
- class Method
70
- class << self
71
- FIELDS.each do |f|
72
- class_eval %[
73
- def #{f} name
74
- arguments << [ :#{f}, name ] unless arguments.include?([:#{f}, name])
75
- attr_accessor name
76
- end
77
- ]
78
- end
79
-
80
- def arguments() @arguments ||= [] end
81
-
82
- def parent() Protocol.const_get(self.to_s[/Protocol::(.+?)::/,1]) end
83
- def id() self::ID end
84
- def name() self::NAME.to_s end
85
- end
86
-
87
- def == b
88
- self.class.arguments.inject(true) do |eql, (type, name)|
89
- eql and __send__("#{name}") == b.__send__("#{name}")
90
- end
91
- end
92
- end
93
-
94
- def self.methods() @methods ||= {} end
95
-
96
- def self.Method(id, name)
97
- @_base_methods ||= {}
98
- @_base_methods[id] ||= ::Class.new(Method) do
99
- class_eval %[
100
- def self.inherited klass
101
- klass.const_set(:ID, #{id})
102
- klass.const_set(:NAME, :#{name.to_s})
103
- klass.parent.methods[#{id}] = klass
104
- klass.parent.methods[klass::NAME] = klass
105
- end
106
- ]
107
- end
108
- end
109
- end
110
-
111
- def self.classes() @classes ||= {} end
112
-
113
- def self.Class(id, name)
114
- @_base_classes ||= {}
115
- @_base_classes[id] ||= ::Class.new(Class) do
116
- class_eval %[
117
- def self.inherited klass
118
- klass.const_set(:ID, #{id})
119
- klass.const_set(:NAME, :#{name.to_s})
120
- Protocol.classes[#{id}] = klass
121
- Protocol.classes[klass::NAME] = klass
122
- end
123
- ]
124
- end
125
- end
126
- end
127
- end
128
-
129
- module Qrack
130
- module Protocol
131
- class Connection < Class( 10, :connection ); end
132
- class Channel < Class( 20, :channel ); end
133
- class Access < Class( 30, :access ); end
134
- class Exchange < Class( 40, :exchange ); end
135
- class Queue < Class( 50, :queue ); end
136
- class Basic < Class( 60, :basic ); end
137
- class File < Class( 70, :file ); end
138
- class Stream < Class( 80, :stream ); end
139
- class Tx < Class( 90, :tx ); end
140
- class Dtx < Class( 100, :dtx ); end
141
- class Tunnel < Class( 110, :tunnel ); end
142
- class Test < Class( 120, :test ); end
143
-
144
- class Connection
145
-
146
- class Start < Method( 10, :start ); end
147
- class StartOk < Method( 11, :start_ok ); end
148
- class Secure < Method( 20, :secure ); end
149
- class SecureOk < Method( 21, :secure_ok ); end
150
- class Tune < Method( 30, :tune ); end
151
- class TuneOk < Method( 31, :tune_ok ); end
152
- class Open < Method( 40, :open ); end
153
- class OpenOk < Method( 41, :open_ok ); end
154
- class Redirect < Method( 50, :redirect ); end
155
- class Close < Method( 60, :close ); end
156
- class CloseOk < Method( 61, :close_ok ); end
157
-
158
-
159
- class Start
160
- octet :version_major
161
- octet :version_minor
162
- table :server_properties
163
- longstr :mechanisms
164
- longstr :locales
165
- end
166
-
167
- class StartOk
168
- table :client_properties
169
- shortstr :mechanism
170
- longstr :response
171
- shortstr :locale
172
- end
173
-
174
- class Secure
175
- longstr :challenge
176
- end
177
-
178
- class SecureOk
179
- longstr :response
180
- end
181
-
182
- class Tune
183
- short :channel_max
184
- long :frame_max
185
- short :heartbeat
186
- end
187
-
188
- class TuneOk
189
- short :channel_max
190
- long :frame_max
191
- short :heartbeat
192
- end
193
-
194
- class Open
195
- shortstr :virtual_host
196
- shortstr :capabilities
197
- bit :insist
198
- end
199
-
200
- class OpenOk
201
- shortstr :known_hosts
202
- end
203
-
204
- class Redirect
205
- shortstr :host
206
- shortstr :known_hosts
207
- end
208
-
209
- class Close
210
- short :reply_code
211
- shortstr :reply_text
212
- short :class_id
213
- short :method_id
214
- end
215
-
216
- class CloseOk
217
- end
218
-
219
- end
220
-
221
- class Channel
222
-
223
- class Open < Method( 10, :open ); end
224
- class OpenOk < Method( 11, :open_ok ); end
225
- class Flow < Method( 20, :flow ); end
226
- class FlowOk < Method( 21, :flow_ok ); end
227
- class Alert < Method( 30, :alert ); end
228
- class Close < Method( 40, :close ); end
229
- class CloseOk < Method( 41, :close_ok ); end
230
-
231
-
232
- class Open
233
- shortstr :out_of_band
234
- end
235
-
236
- class OpenOk
237
- end
238
-
239
- class Flow
240
- bit :active
241
- end
242
-
243
- class FlowOk
244
- bit :active
245
- end
246
-
247
- class Alert
248
- short :reply_code
249
- shortstr :reply_text
250
- table :details
251
- end
252
-
253
- class Close
254
- short :reply_code
255
- shortstr :reply_text
256
- short :class_id
257
- short :method_id
258
- end
259
-
260
- class CloseOk
261
- end
262
-
263
- end
264
-
265
- class Access
266
-
267
- class Request < Method( 10, :request ); end
268
- class RequestOk < Method( 11, :request_ok ); end
269
-
270
-
271
- class Request
272
- shortstr :realm
273
- bit :exclusive
274
- bit :passive
275
- bit :active
276
- bit :write
277
- bit :read
278
- end
279
-
280
- class RequestOk
281
- short :ticket
282
- end
283
-
284
- end
285
-
286
- class Exchange
287
-
288
- class Declare < Method( 10, :declare ); end
289
- class DeclareOk < Method( 11, :declare_ok ); end
290
- class Delete < Method( 20, :delete ); end
291
- class DeleteOk < Method( 21, :delete_ok ); end
292
-
293
-
294
- class Declare
295
- short :ticket
296
- shortstr :exchange
297
- shortstr :type
298
- bit :passive
299
- bit :durable
300
- bit :auto_delete
301
- bit :internal
302
- bit :nowait
303
- table :arguments
304
- end
305
-
306
- class DeclareOk
307
- end
308
-
309
- class Delete
310
- short :ticket
311
- shortstr :exchange
312
- bit :if_unused
313
- bit :nowait
314
- end
315
-
316
- class DeleteOk
317
- end
318
-
319
- end
320
-
321
- class Queue
322
-
323
- class Declare < Method( 10, :declare ); end
324
- class DeclareOk < Method( 11, :declare_ok ); end
325
- class Bind < Method( 20, :bind ); end
326
- class BindOk < Method( 21, :bind_ok ); end
327
- class Purge < Method( 30, :purge ); end
328
- class PurgeOk < Method( 31, :purge_ok ); end
329
- class Delete < Method( 40, :delete ); end
330
- class DeleteOk < Method( 41, :delete_ok ); end
331
- class Unbind < Method( 50, :unbind ); end
332
- class UnbindOk < Method( 51, :unbind_ok ); end
333
-
334
-
335
- class Declare
336
- short :ticket
337
- shortstr :queue
338
- bit :passive
339
- bit :durable
340
- bit :exclusive
341
- bit :auto_delete
342
- bit :nowait
343
- table :arguments
344
- end
345
-
346
- class DeclareOk
347
- shortstr :queue
348
- long :message_count
349
- long :consumer_count
350
- end
351
-
352
- class Bind
353
- short :ticket
354
- shortstr :queue
355
- shortstr :exchange
356
- shortstr :routing_key
357
- bit :nowait
358
- table :arguments
359
- end
360
-
361
- class BindOk
362
- end
363
-
364
- class Purge
365
- short :ticket
366
- shortstr :queue
367
- bit :nowait
368
- end
369
-
370
- class PurgeOk
371
- long :message_count
372
- end
373
-
374
- class Delete
375
- short :ticket
376
- shortstr :queue
377
- bit :if_unused
378
- bit :if_empty
379
- bit :nowait
380
- end
381
-
382
- class DeleteOk
383
- long :message_count
384
- end
385
-
386
- class Unbind
387
- short :ticket
388
- shortstr :queue
389
- shortstr :exchange
390
- shortstr :routing_key
391
- table :arguments
392
- end
393
-
394
- class UnbindOk
395
- end
396
-
397
- end
398
-
399
- class Basic
400
- shortstr :content_type
401
- shortstr :content_encoding
402
- table :headers
403
- octet :delivery_mode
404
- octet :priority
405
- shortstr :correlation_id
406
- shortstr :reply_to
407
- shortstr :expiration
408
- shortstr :message_id
409
- timestamp :timestamp
410
- shortstr :type
411
- shortstr :user_id
412
- shortstr :app_id
413
- shortstr :cluster_id
414
-
415
- class Qos < Method( 10, :qos ); end
416
- class QosOk < Method( 11, :qos_ok ); end
417
- class Consume < Method( 20, :consume ); end
418
- class ConsumeOk < Method( 21, :consume_ok ); end
419
- class Cancel < Method( 30, :cancel ); end
420
- class CancelOk < Method( 31, :cancel_ok ); end
421
- class Publish < Method( 40, :publish ); end
422
- class Return < Method( 50, :return ); end
423
- class Deliver < Method( 60, :deliver ); end
424
- class Get < Method( 70, :get ); end
425
- class GetOk < Method( 71, :get_ok ); end
426
- class GetEmpty < Method( 72, :get_empty ); end
427
- class Ack < Method( 80, :ack ); end
428
- class Reject < Method( 90, :reject ); end
429
- class Recover < Method( 100, :recover ); end
430
-
431
-
432
- class Qos
433
- long :prefetch_size
434
- short :prefetch_count
435
- bit :global
436
- end
437
-
438
- class QosOk
439
- end
440
-
441
- class Consume
442
- short :ticket
443
- shortstr :queue
444
- shortstr :consumer_tag
445
- bit :no_local
446
- bit :no_ack
447
- bit :exclusive
448
- bit :nowait
449
- end
450
-
451
- class ConsumeOk
452
- shortstr :consumer_tag
453
- end
454
-
455
- class Cancel
456
- shortstr :consumer_tag
457
- bit :nowait
458
- end
459
-
460
- class CancelOk
461
- shortstr :consumer_tag
462
- end
463
-
464
- class Publish
465
- short :ticket
466
- shortstr :exchange
467
- shortstr :routing_key
468
- bit :mandatory
469
- bit :immediate
470
- end
471
-
472
- class Return
473
- short :reply_code
474
- shortstr :reply_text
475
- shortstr :exchange
476
- shortstr :routing_key
477
- end
478
-
479
- class Deliver
480
- shortstr :consumer_tag
481
- longlong :delivery_tag
482
- bit :redelivered
483
- shortstr :exchange
484
- shortstr :routing_key
485
- end
486
-
487
- class Get
488
- short :ticket
489
- shortstr :queue
490
- bit :no_ack
491
- end
492
-
493
- class GetOk
494
- longlong :delivery_tag
495
- bit :redelivered
496
- shortstr :exchange
497
- shortstr :routing_key
498
- long :message_count
499
- end
500
-
501
- class GetEmpty
502
- shortstr :cluster_id
503
- end
504
-
505
- class Ack
506
- longlong :delivery_tag
507
- bit :multiple
508
- end
509
-
510
- class Reject
511
- longlong :delivery_tag
512
- bit :requeue
513
- end
514
-
515
- class Recover
516
- bit :requeue
517
- end
518
-
519
- end
520
-
521
- class File
522
- shortstr :content_type
523
- shortstr :content_encoding
524
- table :headers
525
- octet :priority
526
- shortstr :reply_to
527
- shortstr :message_id
528
- shortstr :filename
529
- timestamp :timestamp
530
- shortstr :cluster_id
531
-
532
- class Qos < Method( 10, :qos ); end
533
- class QosOk < Method( 11, :qos_ok ); end
534
- class Consume < Method( 20, :consume ); end
535
- class ConsumeOk < Method( 21, :consume_ok ); end
536
- class Cancel < Method( 30, :cancel ); end
537
- class CancelOk < Method( 31, :cancel_ok ); end
538
- class Open < Method( 40, :open ); end
539
- class OpenOk < Method( 41, :open_ok ); end
540
- class Stage < Method( 50, :stage ); end
541
- class Publish < Method( 60, :publish ); end
542
- class Return < Method( 70, :return ); end
543
- class Deliver < Method( 80, :deliver ); end
544
- class Ack < Method( 90, :ack ); end
545
- class Reject < Method( 100, :reject ); end
546
-
547
-
548
- class Qos
549
- long :prefetch_size
550
- short :prefetch_count
551
- bit :global
552
- end
553
-
554
- class QosOk
555
- end
556
-
557
- class Consume
558
- short :ticket
559
- shortstr :queue
560
- shortstr :consumer_tag
561
- bit :no_local
562
- bit :no_ack
563
- bit :exclusive
564
- bit :nowait
565
- end
566
-
567
- class ConsumeOk
568
- shortstr :consumer_tag
569
- end
570
-
571
- class Cancel
572
- shortstr :consumer_tag
573
- bit :nowait
574
- end
575
-
576
- class CancelOk
577
- shortstr :consumer_tag
578
- end
579
-
580
- class Open
581
- shortstr :identifier
582
- longlong :content_size
583
- end
584
-
585
- class OpenOk
586
- longlong :staged_size
587
- end
588
-
589
- class Stage
590
- end
591
-
592
- class Publish
593
- short :ticket
594
- shortstr :exchange
595
- shortstr :routing_key
596
- bit :mandatory
597
- bit :immediate
598
- shortstr :identifier
599
- end
600
-
601
- class Return
602
- short :reply_code
603
- shortstr :reply_text
604
- shortstr :exchange
605
- shortstr :routing_key
606
- end
607
-
608
- class Deliver
609
- shortstr :consumer_tag
610
- longlong :delivery_tag
611
- bit :redelivered
612
- shortstr :exchange
613
- shortstr :routing_key
614
- shortstr :identifier
615
- end
616
-
617
- class Ack
618
- longlong :delivery_tag
619
- bit :multiple
620
- end
621
-
622
- class Reject
623
- longlong :delivery_tag
624
- bit :requeue
625
- end
626
-
627
- end
628
-
629
- class Stream
630
- shortstr :content_type
631
- shortstr :content_encoding
632
- table :headers
633
- octet :priority
634
- timestamp :timestamp
635
-
636
- class Qos < Method( 10, :qos ); end
637
- class QosOk < Method( 11, :qos_ok ); end
638
- class Consume < Method( 20, :consume ); end
639
- class ConsumeOk < Method( 21, :consume_ok ); end
640
- class Cancel < Method( 30, :cancel ); end
641
- class CancelOk < Method( 31, :cancel_ok ); end
642
- class Publish < Method( 40, :publish ); end
643
- class Return < Method( 50, :return ); end
644
- class Deliver < Method( 60, :deliver ); end
645
-
646
-
647
- class Qos
648
- long :prefetch_size
649
- short :prefetch_count
650
- long :consume_rate
651
- bit :global
652
- end
653
-
654
- class QosOk
655
- end
656
-
657
- class Consume
658
- short :ticket
659
- shortstr :queue
660
- shortstr :consumer_tag
661
- bit :no_local
662
- bit :exclusive
663
- bit :nowait
664
- end
665
-
666
- class ConsumeOk
667
- shortstr :consumer_tag
668
- end
669
-
670
- class Cancel
671
- shortstr :consumer_tag
672
- bit :nowait
673
- end
674
-
675
- class CancelOk
676
- shortstr :consumer_tag
677
- end
678
-
679
- class Publish
680
- short :ticket
681
- shortstr :exchange
682
- shortstr :routing_key
683
- bit :mandatory
684
- bit :immediate
685
- end
686
-
687
- class Return
688
- short :reply_code
689
- shortstr :reply_text
690
- shortstr :exchange
691
- shortstr :routing_key
692
- end
693
-
694
- class Deliver
695
- shortstr :consumer_tag
696
- longlong :delivery_tag
697
- shortstr :exchange
698
- shortstr :queue
699
- end
700
-
701
- end
702
-
703
- class Tx
704
-
705
- class Select < Method( 10, :select ); end
706
- class SelectOk < Method( 11, :select_ok ); end
707
- class Commit < Method( 20, :commit ); end
708
- class CommitOk < Method( 21, :commit_ok ); end
709
- class Rollback < Method( 30, :rollback ); end
710
- class RollbackOk < Method( 31, :rollback_ok ); end
711
-
712
-
713
- class Select
714
- end
715
-
716
- class SelectOk
717
- end
718
-
719
- class Commit
720
- end
721
-
722
- class CommitOk
723
- end
724
-
725
- class Rollback
726
- end
727
-
728
- class RollbackOk
729
- end
730
-
731
- end
732
-
733
- class Dtx
734
-
735
- class Select < Method( 10, :select ); end
736
- class SelectOk < Method( 11, :select_ok ); end
737
- class Start < Method( 20, :start ); end
738
- class StartOk < Method( 21, :start_ok ); end
739
-
740
-
741
- class Select
742
- end
743
-
744
- class SelectOk
745
- end
746
-
747
- class Start
748
- shortstr :dtx_identifier
749
- end
750
-
751
- class StartOk
752
- end
753
-
754
- end
755
-
756
- class Tunnel
757
- table :headers
758
- shortstr :proxy_name
759
- shortstr :data_name
760
- octet :durable
761
- octet :broadcast
762
-
763
- class Request < Method( 10, :request ); end
764
-
765
-
766
- class Request
767
- table :meta_data
768
- end
769
-
770
- end
771
-
772
- class Test
773
-
774
- class Integer < Method( 10, :integer ); end
775
- class IntegerOk < Method( 11, :integer_ok ); end
776
- class String < Method( 20, :string ); end
777
- class StringOk < Method( 21, :string_ok ); end
778
- class Table < Method( 30, :table ); end
779
- class TableOk < Method( 31, :table_ok ); end
780
- class Content < Method( 40, :content ); end
781
- class ContentOk < Method( 41, :content_ok ); end
782
-
783
-
784
- class Integer
785
- octet :integer_1
786
- short :integer_2
787
- long :integer_3
788
- longlong :integer_4
789
- octet :operation
790
- end
791
-
792
- class IntegerOk
793
- longlong :result
794
- end
795
-
796
- class String
797
- shortstr :string_1
798
- longstr :string_2
799
- octet :operation
800
- end
801
-
802
- class StringOk
803
- longstr :result
804
- end
805
-
806
- class Table
807
- table :table
808
- octet :integer_op
809
- octet :string_op
810
- end
811
-
812
- class TableOk
813
- longlong :integer_result
814
- longstr :string_result
815
- end
816
-
817
- class Content
818
- end
819
-
820
- class ContentOk
821
- long :content_checksum
822
- end
823
-
824
- end
825
-
826
- end
827
-
828
- end