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
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA256:
3
- metadata.gz: 7448124e158fa2208a578597497b1be803332c97821ec5ed8de94a796d42b9e4
4
- data.tar.gz: 4c90b0d5446c3c042fa1193d5856d86a268db046e90d8bd6972d1eba7a156e5d
5
- SHA512:
6
- metadata.gz: dcc378aeb3bde03df5377ea30f82815dff363c8353313b80aae0712e70e18e44bcb2af7bbe83ff1615788a49a613e7a92745a423840cc10eee8c0ac7e659d097
7
- data.tar.gz: c0b8095a6d419464433e2396ee5d0cda1624c967e94562c7c41876ecc27b80a4e94329f01ea240ded0a7dd7f5642e1be7579522fd9885607bb26beb07ba7bf32
@@ -1,32 +0,0 @@
1
- # encoding: utf-8
2
-
3
- # simple_09.rb
4
-
5
- # Assumes that target message broker/server has a user called 'guest' with a password 'guest'
6
- # and that it is running on 'localhost'.
7
-
8
- # If this is not the case, please change the 'Bunny.new' call below to include
9
- # the relevant arguments e.g. b = Bunny.new(:user => 'john', :pass => 'doe', :host => 'foobar')
10
-
11
- $:.unshift File.dirname(__FILE__) + '/../lib'
12
-
13
- require 'bunny'
14
-
15
- b = Bunny.new(:logging => true, :spec => '09')
16
-
17
- # start a communication session with the amqp server
18
- b.start
19
-
20
- # declare a queue
21
- q = b.queue('test1')
22
-
23
- # publish a message to the queue
24
- q.publish('➸ Hello everybody ☺!')
25
-
26
- # get message from the queue
27
- msg = q.pop[:payload]
28
-
29
- puts 'This is the message: ' + msg + "\n\n"
30
-
31
- # close the client connection
32
- b.stop
@@ -1,35 +0,0 @@
1
- # encoding: utf-8
2
-
3
- # simple_ack_09.rb
4
-
5
- # Assumes that target message broker/server has a user called 'guest' with a password 'guest'
6
- # and that it is running on 'localhost'.
7
-
8
- # If this is not the case, please change the 'Bunny.new' call below to include
9
- # the relevant arguments e.g. b = Bunny.new(:user => 'john', :pass => 'doe', :host => 'foobar')
10
-
11
- $:.unshift File.dirname(__FILE__) + '/../lib'
12
-
13
- require 'bunny'
14
-
15
- b = Bunny.new(:logging => true, :spec => '09')
16
-
17
- # start a communication session with the amqp server
18
- b.start
19
-
20
- # declare a queue
21
- q = b.queue('test1')
22
-
23
- # publish a message to the queue
24
- q.publish('Testing acknowledgements')
25
-
26
- # get message from the queue
27
- msg = q.pop(:ack => true)[:payload]
28
-
29
- # acknowledge receipt of message
30
- q.ack
31
-
32
- puts 'This is the message: ' + msg + "\n\n"
33
-
34
- # close the client connection
35
- b.stop
@@ -1,55 +0,0 @@
1
- # encoding: utf-8
2
-
3
- # simple_consumer_09.rb
4
-
5
- # N.B. To be used in conjunction with simple_publisher.rb
6
-
7
- # Assumes that target message broker/server has a user called 'guest' with a password 'guest'
8
- # and that it is running on 'localhost'.
9
-
10
- # If this is not the case, please change the 'Bunny.new' call below to include
11
- # the relevant arguments e.g. b = Bunny.new(:user => 'john', :pass => 'doe', :host => 'foobar')
12
-
13
- # How this example works
14
- #=======================
15
- #
16
- # Open up two console windows start this program in one of them by typing -
17
- #
18
- # ruby simple_consumer_09.rb
19
- #
20
- # Then switch to the other console window and type -
21
- #
22
- # ruby simple_publisher_09.rb
23
- #
24
- # A message will be printed out by the simple_consumer and it will wait for the next message
25
- # until the timeout interval is reached.
26
- #
27
- # Run simple_publisher as many times as you like. When you want the program to stop just stop
28
- # sending messages and the subscribe loop will timeout after 30 seconds, the program will
29
- # unsubscribe from the queue and close the connection to the server.
30
-
31
- $:.unshift File.dirname(__FILE__) + '/../lib'
32
-
33
- require 'bunny'
34
-
35
- b = Bunny.new(:logging => true, :spec => '09')
36
-
37
- # start a communication session with the amqp server
38
- b.start
39
-
40
- # create/get queue
41
- q = b.queue('po_box')
42
-
43
- # create/get exchange
44
- exch = b.exchange('sorting_room')
45
-
46
- # bind queue to exchange
47
- q.bind(exch, :key => 'fred')
48
-
49
- # subscribe to queue
50
- q.subscribe(:consumer_tag => 'testtag1', :timeout => 30) do |msg|
51
- puts "#{q.subscription.message_count}: #{msg[:payload]}"
52
- end
53
-
54
- # Close client
55
- b.stop
@@ -1,41 +0,0 @@
1
- # encoding: utf-8
2
-
3
- # simple_fanout_09.rb
4
-
5
- # Assumes that target message broker/server has a user called 'guest' with a password 'guest'
6
- # and that it is running on 'localhost'.
7
-
8
- # If this is not the case, please change the 'Bunny.new' call below to include
9
- # the relevant arguments e.g. b = Bunny.new(:user => 'john', :pass => 'doe', :host => 'foobar')
10
-
11
- $:.unshift File.dirname(__FILE__) + '/../lib'
12
-
13
- require 'bunny'
14
-
15
- b = Bunny.new(:logging => true, :spec => '09')
16
-
17
- # start a communication session with the amqp server
18
- b.start
19
-
20
- # declare queues
21
- q1 = b.queue('test_fan1')
22
- q2 = b.queue('test_fan2')
23
-
24
- # create a fanout exchange
25
- exch = b.exchange('test_fan', :type => :fanout)
26
-
27
- # bind the queues to the exchange
28
- q1.bind(exch)
29
- q2.bind(exch)
30
-
31
- # publish a message to the exchange
32
- exch.publish('This message will be fanned out')
33
-
34
- # get message from the queues
35
- msg = q1.pop[:payload]
36
- puts 'This is the message from q1: ' + msg + "\n\n"
37
- msg = q2.pop[:payload]
38
- puts 'This is the message from q2: ' + msg + "\n\n"
39
-
40
- # close the client connection
41
- b.stop
@@ -1,42 +0,0 @@
1
- # encoding: utf-8
2
-
3
- # simple_headers_09.rb
4
-
5
- # Assumes that target message broker/server has a user called 'guest' with a password 'guest'
6
- # and that it is running on 'localhost'.
7
-
8
- # If this is not the case, please change the 'Bunny.new' call below to include
9
- # the relevant arguments e.g. b = Bunny.new(:user => 'john', :pass => 'doe', :host => 'foobar')
10
-
11
- $:.unshift File.dirname(__FILE__) + '/../lib'
12
-
13
- require 'bunny'
14
-
15
- b = Bunny.new(:spec => '09')
16
-
17
- # start a communication session with the amqp server
18
- b.start
19
-
20
- # declare queues
21
- q = b.queue('header_q1')
22
-
23
- # create a headers exchange
24
- header_exch = b.exchange('header_exch', :type => :headers)
25
-
26
- # bind the queue to the exchange
27
- q.bind(header_exch, :arguments => {'h1'=>'a','x-match'=>'all'})
28
-
29
- # publish messages to the exchange
30
- header_exch.publish('Headers test msg 1', :headers => {'h1'=>'a'})
31
- header_exch.publish('Headers test msg 2', :headers => {'h1'=>'z'})
32
-
33
-
34
- # get messages from the queue - should only be msg 1 that got through
35
- msg = ""
36
- until msg == :queue_empty do
37
- msg = q.pop[:payload]
38
- puts 'This is a message from the header_q1 queue: ' + msg + "\n" unless msg == :queue_empty
39
- end
40
-
41
- # close the client connection
42
- b.stop
@@ -1,29 +0,0 @@
1
- # encoding: utf-8
2
-
3
- # simple_publisher_08.rb
4
-
5
- # N.B. To be used in conjunction with simple_consumer_08.rb. See simple_consumer.rb for explanation.
6
-
7
- # Assumes that target message broker/server has a user called 'guest' with a password 'guest'
8
- # and that it is running on 'localhost'.
9
-
10
- # If this is not the case, please change the 'Bunny.new' call below to include
11
- # the relevant arguments e.g. b = Bunny.new(:user => 'john', :pass => 'doe', :host => 'foobar')
12
-
13
- $:.unshift File.dirname(__FILE__) + '/../lib'
14
-
15
- require 'bunny'
16
-
17
- b = Bunny.new(:logging => true)
18
-
19
- # start a communication session with the amqp server
20
- b.start
21
-
22
- # create/get exchange
23
- exch = b.exchange('sorting_room')
24
-
25
- # publish message to exchange
26
- exch.publish('This is a message from the publisher', :key => 'fred')
27
-
28
- # message should now be picked up by the consumer so we can stop
29
- b.stop
@@ -1,61 +0,0 @@
1
- # encoding: utf-8
2
-
3
- # simple_topic_08.rb
4
-
5
- # Assumes that target message broker/server has a user called 'guest' with a password 'guest'
6
- # and that it is running on 'localhost'.
7
-
8
- # If this is not the case, please change the 'Bunny.new' call below to include
9
- # the relevant arguments e.g. b = Bunny.new(:user => 'john', :pass => 'doe', :host => 'foobar')
10
-
11
- $:.unshift File.dirname(__FILE__) + '/../lib'
12
-
13
- require 'bunny'
14
-
15
- b = Bunny.new
16
-
17
- # start a communication session with the amqp server
18
- b.start
19
-
20
- # declare queues
21
- soccer = b.queue('topic_soccer')
22
- cricket = b.queue('topic_cricket')
23
- rugby = b.queue('topic_rugby')
24
- allsport = b.queue('topic_allsport')
25
-
26
- # create a topic exchange
27
- sports_results = b.exchange('sports_results', :type => :topic)
28
-
29
- # bind the queues to the exchange
30
- soccer.bind(sports_results, :key => 'soccer.*')
31
- cricket.bind(sports_results, :key => 'cricket.*')
32
- rugby.bind(sports_results, :key => 'rugby.*')
33
- allsport.bind(sports_results, :key => '*.result')
34
-
35
- # publish messages to the exchange
36
- sports_results.publish('Manchester United 1 : Hull City 4', :key => 'soccer.result')
37
- sports_results.publish('England beat Australia by 5 wickets in first test', :key => 'cricket.result')
38
- sports_results.publish('British Lions 15 : South Africa 12', :key => 'rugby.result')
39
-
40
- # get message from the queues
41
-
42
- # soccer queue got the soccer message
43
- msg = soccer.pop[:payload]
44
- puts 'This is a message from the soccer q: ' + msg + "\n\n"
45
-
46
- # cricket queue got the cricket message
47
- msg = cricket.pop[:payload]
48
- puts 'This is a message from the cricket q: ' + msg + "\n\n"
49
-
50
- # rugby queue got the rugby message
51
- msg = rugby.pop[:payload]
52
- puts 'This is a message from the rugby q: ' + msg + "\n\n"
53
-
54
- # allsport queue got all of the messages
55
- until msg == :queue_empty do
56
- msg = allsport.pop[:payload]
57
- puts 'This is a message from the allsport q: ' + msg + "\n\n" unless msg == :queue_empty
58
- end
59
-
60
- # close the client connection
61
- b.stop
@@ -1,616 +0,0 @@
1
- {
2
- "name": "AMQP",
3
- "major-version": 8,
4
- "minor-version": 0,
5
- "port": 5672,
6
- "copyright": [
7
- "Copyright (C) 2008-2009 LShift Ltd, Cohesive Financial Technologies LLC,\n",
8
- "and Rabbit Technologies Ltd\n",
9
- "\n",
10
- "Permission is hereby granted, free of charge, to any person\n",
11
- "obtaining a copy of this file (the \"Software\"), to deal in the\n",
12
- "Software without restriction, including without limitation the \n",
13
- "rights to use, copy, modify, merge, publish, distribute, \n",
14
- "sublicense, and/or sell copies of the Software, and to permit \n",
15
- "persons to whom the Software is furnished to do so, subject to \n",
16
- "the following conditions:\n",
17
- "\n",
18
- "The above copyright notice and this permission notice shall be\n",
19
- "included in all copies or substantial portions of the Software.\n",
20
- "\n",
21
- "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n",
22
- "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n",
23
- "OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n",
24
- "NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n",
25
- "HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n",
26
- "WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n",
27
- "FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n",
28
- "OTHER DEALINGS IN THE SOFTWARE.\n",
29
- "\n",
30
- "Class information entered from amqp_xml0-8.pdf and domain types from amqp-xml-doc0-9.pdf\n",
31
- "\n",
32
- "b3cb053f15e7b98808c0ccc67f23cb3e amqp_xml0-8.pdf\n",
33
- "http://www.twiststandards.org/index.php?option=com_docman&task=cat_view&gid=28&&Itemid=90\n",
34
- "8444db91e2949dbecfb2585e9eef6d64 amqp-xml-doc0-9.pdf\n",
35
- "https://jira.amqp.org/confluence/download/attachments/720900/amqp-xml-doc0-9.pdf?version=1\n"],
36
-
37
- "domains": [
38
- ["access-ticket", "short"],
39
- ["bit", "bit"],
40
- ["channel-id", "longstr"],
41
- ["class-id", "short"],
42
- ["consumer-tag", "shortstr"],
43
- ["delivery-tag", "longlong"],
44
- ["destination", "shortstr"],
45
- ["duration", "longlong"],
46
- ["exchange-name", "shortstr"],
47
- ["known-hosts", "shortstr"],
48
- ["long", "long"],
49
- ["longlong", "longlong"],
50
- ["longstr", "longstr"],
51
- ["method-id", "short"],
52
- ["no-ack", "bit"],
53
- ["no-local", "bit"],
54
- ["octet", "octet"],
55
- ["offset", "longlong"],
56
- ["path", "shortstr"],
57
- ["peer-properties", "table"],
58
- ["queue-name", "shortstr"],
59
- ["redelivered", "bit"],
60
- ["reference", "longstr"],
61
- ["reject-code", "short"],
62
- ["reject-text", "shortstr"],
63
- ["reply-code", "short"],
64
- ["reply-text", "shortstr"],
65
- ["security-token", "longstr"],
66
- ["short", "short"],
67
- ["shortstr", "shortstr"],
68
- ["table", "table"],
69
- ["timestamp", "timestamp"]
70
- ],
71
-
72
- "constants": [
73
- {"name": "FRAME-METHOD", "value": 1},
74
- {"name": "FRAME-HEADER", "value": 2},
75
- {"name": "FRAME-BODY", "value": 3},
76
- {"name": "FRAME-OOB-METHOD", "value": 4},
77
- {"name": "FRAME-OOB-HEADER", "value": 5},
78
- {"name": "FRAME-OOB-BODY", "value": 6},
79
- {"name": "FRAME-TRACE", "value": 7},
80
- {"name": "FRAME-HEARTBEAT", "value": 8},
81
- {"name": "FRAME-MIN-SIZE", "value": 4096},
82
- {"name": "FRAME-END", "value": 206},
83
- {"name": "REPLY-SUCCESS", "value": 200},
84
- {"name": "NOT-DELIVERED", "value": 310, "class": "soft-error"},
85
- {"name": "CONTENT-TOO-LARGE", "value": 311, "class": "soft-error"},
86
- {"name": "NO-ROUTE", "value": 312, "class": "soft-error"},
87
- {"name": "NO-CONSUMERS", "value": 313, "class": "soft-error"},
88
- {"name": "ACCESS-REFUSED", "value": 403, "class": "soft-error"},
89
- {"name": "NOT-FOUND", "value": 404, "class": "soft-error"},
90
- {"name": "RESOURCE-LOCKED", "value": 405, "class": "soft-error"},
91
- {"name": "PRECONDITION-FAILED", "value": 406, "class": "soft-error"},
92
- {"name": "CONNECTION-FORCED", "value": 320, "class": "hard-error"},
93
- {"name": "INVALID-PATH", "value": 402, "class": "hard-error"},
94
- {"name": "FRAME-ERROR", "value": 501, "class": "hard-error"},
95
- {"name": "SYNTAX-ERROR", "value": 502, "class": "hard-error"},
96
- {"name": "COMMAND-INVALID", "value": 503, "class": "hard-error"},
97
- {"name": "CHANNEL-ERROR", "value": 504, "class": "hard-error"},
98
- {"name": "RESOURCE-ERROR", "value": 506, "class": "hard-error"},
99
- {"name": "NOT-ALLOWED", "value": 530, "class": "hard-error"},
100
- {"name": "NOT-IMPLEMENTED", "value": 540, "class": "hard-error"},
101
- {"name": "INTERNAL-ERROR", "value": 541, "class": "hard-error"}
102
- ],
103
-
104
- "classes": [
105
- {
106
- "id": 10,
107
- "methods": [{"id": 10,
108
- "arguments": [{"type": "octet", "name": "version-major", "default-value": 0},
109
- {"type": "octet", "name": "version-minor", "default-value": 8},
110
- {"domain": "peer-properties", "name": "server properties"},
111
- {"type": "longstr", "name": "mechanisms", "default-value": "PLAIN"},
112
- {"type": "longstr", "name": "locales", "default-value": "en_US"}],
113
- "name": "start"},
114
- {"id": 11,
115
- "arguments": [{"domain": "peer-properties", "name": "client-properties"},
116
- {"type": "shortstr", "name": "mechanism", "default-value": "PLAIN"},
117
- {"type": "longstr", "name": "response"},
118
- {"type": "shortstr", "name": "locale", "default-value": "en_US"}],
119
- "name": "start-ok"},
120
- {"id": 20,
121
- "arguments": [{"type": "longstr", "name": "challenge"}],
122
- "name": "secure"},
123
- {"id": 21,
124
- "arguments": [{"type": "longstr", "name": "response"}],
125
- "name": "secure-ok"},
126
- {"id": 30,
127
- "arguments": [{"type": "short", "name": "channel-max", "default-value": 0},
128
- {"type": "long", "name": "frame-max", "default-value": 0},
129
- {"type": "short", "name": "heartbeat", "default-value": 0}],
130
- "name": "tune"},
131
- {"id": 31,
132
- "arguments": [{"type": "short", "name": "channel-max", "default-value": 0},
133
- {"type": "long", "name": "frame-max", "default-value": 0},
134
- {"type": "short", "name": "heartbeat", "default-value": 0}],
135
- "name": "tune-ok"},
136
- {"id": 40,
137
- "arguments": [{"type": "shortstr", "name": "virtual-host", "default-value": "/"},
138
- {"type": "shortstr", "name": "capabilities", "default-value": ""},
139
- {"type": "bit", "name": "insist", "default-value": false}],
140
- "name": "open"},
141
- {"id": 41,
142
- "arguments": [{"type": "shortstr", "name": "known-hosts", "default-value": ""}],
143
- "name": "open-ok"},
144
- {"id": 50,
145
- "arguments": [{"type": "shortstr", "name": "host"},
146
- {"type": "shortstr", "name": "known-hosts", "default-value": ""}],
147
- "name": "redirect"},
148
- {"id": 60,
149
- "arguments": [{"type": "short", "name": "reply-code"},
150
- {"type": "shortstr", "name": "reply-text", "default-value": ""},
151
- {"type": "short", "name": "class-id"},
152
- {"type": "short", "name": "method-id"}],
153
- "name": "close"},
154
- {"id": 61,
155
- "arguments": [],
156
- "name": "close-ok"}],
157
- "name": "connection",
158
- "properties": []
159
- },
160
- {
161
- "id": 20,
162
- "methods": [{"id": 10,
163
- "arguments": [{"type": "shortstr", "name": "out-of-band", "default-value": ""}],
164
- "name": "open"},
165
- {"id": 11,
166
- "arguments": [],
167
- "name": "open-ok"},
168
- {"id": 20,
169
- "arguments": [{"type": "bit", "name": "active"}],
170
- "name": "flow"},
171
- {"id": 21,
172
- "arguments": [{"type": "bit", "name": "active"}],
173
- "name": "flow-ok"},
174
- {"id": 30,
175
- "arguments": [{"type": "short", "name": "reply-code"},
176
- {"type": "shortstr", "name": "reply-text", "default-value": ""},
177
- {"type": "table", "name": "details", "default-value": {}}],
178
- "name": "alert"},
179
- {"id": 40,
180
- "arguments": [{"type": "short", "name": "reply-code"},
181
- {"type": "shortstr", "name": "reply-text", "default-value": ""},
182
- {"type": "short", "name": "class-id"},
183
- {"type": "short", "name": "method-id"}],
184
- "name": "close"},
185
- {"id": 41,
186
- "arguments": [],
187
- "name": "close-ok"}],
188
- "name": "channel"
189
- },
190
- {
191
- "id": 30,
192
- "methods": [{"id": 10,
193
- "arguments": [{"type": "shortstr", "name": "realm", "default-value": "/data"},
194
- {"type": "bit", "name": "exclusive", "default-value": false},
195
- {"type": "bit", "name": "passive", "default-value": true},
196
- {"type": "bit", "name": "active", "default-value": true},
197
- {"type": "bit", "name": "write", "default-value": true},
198
- {"type": "bit", "name": "read", "default-value": true}],
199
- "name": "request"},
200
- {"id": 11,
201
- "arguments": [{"type": "short", "name": "ticket", "default-value": 1}],
202
- "name": "request-ok"}],
203
- "name": "access"
204
- },
205
- {
206
- "id": 40,
207
- "methods": [{"id": 10,
208
- "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
209
- {"type": "shortstr", "name": "exchange"},
210
- {"type": "shortstr", "name": "type", "default-value": "direct"},
211
- {"type": "bit", "name": "passive", "default-value": false},
212
- {"type": "bit", "name": "durable", "default-value": false},
213
- {"type": "bit", "name": "auto-delete", "default-value": false},
214
- {"type": "bit", "name": "internal", "default-value": false},
215
- {"type": "bit", "name": "nowait", "default-value": false},
216
- {"type": "table", "name": "arguments", "default-value": {}}],
217
- "name": "declare"},
218
- {"id": 11,
219
- "arguments": [],
220
- "name": "declare-ok"},
221
- {"id": 20,
222
- "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
223
- {"type": "shortstr", "name": "exchange"},
224
- {"type": "bit", "name": "if-unused", "default-value": false},
225
- {"type": "bit", "name": "nowait", "default-value": false}],
226
- "name": "delete"},
227
- {"id": 21,
228
- "arguments": [],
229
- "name": "delete-ok"}],
230
- "name": "exchange"
231
- },
232
- {
233
- "id": 50,
234
- "methods": [{"id": 10,
235
- "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
236
- {"type": "shortstr", "name": "queue", "default-value": ""},
237
- {"type": "bit", "name": "passive", "default-value": false},
238
- {"type": "bit", "name": "durable", "default-value": false},
239
- {"type": "bit", "name": "exclusive", "default-value": false},
240
- {"type": "bit", "name": "auto-delete", "default-value": false},
241
- {"type": "bit", "name": "nowait", "default-value": false},
242
- {"type": "table", "name": "arguments", "default-value": {}}],
243
- "name": "declare"},
244
- {"id": 11,
245
- "arguments": [{"type": "shortstr", "name": "queue"},
246
- {"type": "long", "name": "message-count"},
247
- {"type": "long", "name": "consumer-count"}],
248
- "name": "declare-ok"},
249
- {"id": 20,
250
- "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
251
- {"type": "shortstr", "name": "queue"},
252
- {"type": "shortstr", "name": "exchange"},
253
- {"type": "shortstr", "name": "routing-key"},
254
- {"type": "bit", "name": "nowait", "default-value": false},
255
- {"type": "table", "name": "arguments", "default-value": {}}],
256
- "name": "bind"},
257
- {"id": 21,
258
- "arguments": [],
259
- "name": "bind-ok"},
260
- {"id": 30,
261
- "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
262
- {"type": "shortstr", "name": "queue"},
263
- {"type": "bit", "name": "nowait", "default-value": false}],
264
- "name": "purge"},
265
- {"id": 31,
266
- "arguments": [{"type": "long", "name": "message-count"}],
267
- "name": "purge-ok"},
268
- {"id": 40,
269
- "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
270
- {"type": "shortstr", "name": "queue"},
271
- {"type": "bit", "name": "if-unused", "default-value": false},
272
- {"type": "bit", "name": "if-empty", "default-value": false},
273
- {"type": "bit", "name": "nowait", "default-value": false}],
274
- "name": "delete"},
275
- {"id": 41,
276
- "arguments": [{"type": "long", "name": "message-count"}],
277
- "name": "delete-ok"},
278
- {"id": 50,
279
- "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
280
- {"type": "shortstr", "name": "queue"},
281
- {"type": "shortstr", "name": "exchange"},
282
- {"type": "shortstr", "name": "routing-key"},
283
- {"type": "table", "name": "arguments"}],
284
- "name": "unbind"},
285
- {"id": 51,
286
- "arguments": [],
287
- "name": "unbind-ok"}
288
- ],
289
- "name": "queue"
290
- },
291
- {
292
- "id": 60,
293
- "methods": [{"id": 10,
294
- "arguments": [{"type": "long", "name": "prefetch-size", "default-value": 0},
295
- {"type": "short", "name": "prefetch-count", "default-value": 0},
296
- {"type": "bit", "name": "global", "default-value": false}],
297
- "name": "qos"},
298
- {"id": 11,
299
- "arguments": [],
300
- "name": "qos-ok"},
301
- {"id": 20,
302
- "arguments": [{"domain": "access-ticket", "name": "ticket", "default-value": 1},
303
- {"domain": "queue-name", "name": "queue"},
304
- {"type": "shortstr", "name": "consumer-tag"},
305
- {"type": "bit", "name": "no-local", "default-value": false},
306
- {"type": "bit", "name": "no-ack", "default-value": false},
307
- {"type": "bit", "name": "exclusive", "default-value": false},
308
- {"type": "bit", "name": "nowait", "default-value": false}],
309
- "name": "consume"},
310
- {"id": 21,
311
- "arguments": [{"type": "shortstr", "name": "consumer-tag"}],
312
- "name": "consume-ok"},
313
- {"id": 30,
314
- "arguments": [{"type": "shortstr", "name": "consumer-tag"},
315
- {"type": "bit", "name": "nowait", "default-value": false}],
316
- "name": "cancel"},
317
- {"id": 31,
318
- "arguments": [{"type": "shortstr", "name": "consumer-tag"}],
319
- "name": "cancel-ok"},
320
- {"content": true,
321
- "id": 40,
322
- "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
323
- {"type": "shortstr", "name": "exchange", "default-value": ""},
324
- {"type": "shortstr", "name": "routing-key"},
325
- {"type": "bit", "name": "mandatory", "default-value": false},
326
- {"type": "bit", "name": "immediate", "default-value": false}],
327
- "name": "publish"},
328
- {"content": true,
329
- "id": 50,
330
- "arguments": [{"type": "short", "name": "reply-code"},
331
- {"type": "shortstr", "name": "reply-text", "default-value": ""},
332
- {"type": "shortstr", "name": "exchange"},
333
- {"type": "shortstr", "name": "routing-key"}],
334
- "name": "return"},
335
- {"content": true,
336
- "id": 60,
337
- "arguments": [{"type": "shortstr", "name": "consumer-tag"},
338
- {"type": "longlong", "name": "delivery-tag"},
339
- {"type": "bit", "name": "redelivered", "default-value": false},
340
- {"type": "shortstr", "name": "exchange"},
341
- {"type": "shortstr", "name": "routing-key"}],
342
- "name": "deliver"},
343
- {"id": 70,
344
- "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
345
- {"type": "shortstr", "name": "queue"},
346
- {"type": "bit", "name": "no-ack", "default-value": false}],
347
- "name": "get"},
348
- {"content": true,
349
- "id": 71,
350
- "arguments": [{"type": "longlong", "name": "delivery-tag"},
351
- {"type": "bit", "name": "redelivered", "default-value": false},
352
- {"type": "shortstr", "name": "exchange"},
353
- {"type": "shortstr", "name": "routing-key"},
354
- {"type": "long", "name": "message-count"}],
355
- "name": "get-ok"},
356
- {"id": 72,
357
- "arguments": [{"type": "shortstr", "name": "cluster-id", "default-value": ""}],
358
- "name": "get-empty"},
359
- {"id": 80,
360
- "arguments": [{"type": "longlong", "name": "delivery-tag", "default-value": 0},
361
- {"type": "bit", "name": "multiple", "default-value": true}],
362
- "name": "ack"},
363
- {"id": 90,
364
- "arguments": [{"type": "longlong", "name": "delivery-tag"},
365
- {"type": "bit", "name": "requeue", "default-value": true}],
366
- "name": "reject"},
367
- {"id": 100,
368
- "arguments": [{"type": "bit", "name": "requeue", "default-value": false}],
369
- "name": "recover"}],
370
- "name": "basic",
371
- "properties": [{"type": "shortstr", "name": "content-type"},
372
- {"type": "shortstr", "name": "content-encoding"},
373
- {"type": "table", "name": "headers"},
374
- {"type": "octet", "name": "delivery-mode"},
375
- {"type": "octet", "name": "priority"},
376
- {"type": "shortstr", "name": "correlation-id"},
377
- {"type": "shortstr", "name": "reply-to"},
378
- {"type": "shortstr", "name": "expiration"},
379
- {"type": "shortstr", "name": "message-id"},
380
- {"type": "timestamp", "name": "timestamp"},
381
- {"type": "shortstr", "name": "type"},
382
- {"type": "shortstr", "name": "user-id"},
383
- {"type": "shortstr", "name": "app-id"},
384
- {"type": "shortstr", "name": "cluster-id"}]
385
- },
386
- {
387
- "id": 70,
388
- "methods": [{"id": 10,
389
- "arguments": [{"type": "long", "name": "prefetch-size", "default-value": 0},
390
- {"type": "short", "name": "prefetch-count", "default-value": 0},
391
- {"type": "bit", "name": "global", "default-value": false}],
392
- "name": "qos"},
393
- {"id": 11,
394
- "arguments": [],
395
- "name": "qos-ok"},
396
- {"id": 20,
397
- "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
398
- {"type": "shortstr", "name": "queue"},
399
- {"type": "shortstr", "name": "consumer-tag"},
400
- {"type": "bit", "name": "no-local", "default-value": false},
401
- {"type": "bit", "name": "no-ack", "default-value": false},
402
- {"type": "bit", "name": "exclusive", "default-value": false},
403
- {"type": "bit", "name": "nowait", "default-value": false}],
404
- "name": "consume"},
405
- {"id": 21,
406
- "arguments": [{"type": "shortstr", "name": "consumer-tag"}],
407
- "name": "consume-ok"},
408
- {"id": 30,
409
- "arguments": [{"type": "shortstr", "name": "consumer-tag"},
410
- {"type": "bit", "name": "nowait", "default-value": false}],
411
- "name": "cancel"},
412
- {"id": 31,
413
- "arguments": [{"type": "shortstr", "name": "consumer-tag"}],
414
- "name": "cancel-ok"},
415
- {"id": 40,
416
- "arguments": [{"type": "shortstr", "name": "identifier"},
417
- {"type": "longlong", "name": "content-size"}],
418
- "name": "open"},
419
- {"id": 41,
420
- "arguments": [{"type": "longlong", "name": "staged-size"}],
421
- "name": "open-ok"},
422
- {"content": true,
423
- "id": 50,
424
- "arguments": [],
425
- "name": "stage"},
426
- {"id": 60,
427
- "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
428
- {"type": "shortstr", "name": "exchange", "default-value": ""},
429
- {"type": "shortstr", "name": "routing-key"},
430
- {"type": "bit", "name": "mandatory", "default-value": false},
431
- {"type": "bit", "name": "immediate", "default-value": false},
432
- {"type": "shortstr", "name": "identifier"}],
433
- "name": "publish"},
434
- {"content": true,
435
- "id": 70,
436
- "arguments": [{"type": "short", "name": "reply-code", "default-value": 200},
437
- {"type": "shortstr", "name": "reply-text", "default-value": ""},
438
- {"type": "shortstr", "name": "exchange"},
439
- {"type": "shortstr", "name": "routing-key"}],
440
- "name": "return"},
441
- {"id": 80,
442
- "arguments": [{"type": "shortstr", "name": "consumer-tag"},
443
- {"type": "longlong", "name": "delivery-tag"},
444
- {"type": "bit", "name": "redelivered", "default-value": false},
445
- {"type": "shortstr", "name": "exchange"},
446
- {"type": "shortstr", "name": "routing-key"},
447
- {"type": "shortstr", "name": "identifier"}],
448
- "name": "deliver"},
449
- {"id": 90,
450
- "arguments": [{"type": "longlong", "name": "delivery-tag", "default-value": 0},
451
- {"type": "bit", "name": "multiple", "default-value": true}],
452
- "name": "ack"},
453
- {"id": 100,
454
- "arguments": [{"type": "longlong", "name": "delivery-tag"},
455
- {"type": "bit", "name": "requeue", "default-value": true}],
456
- "name": "reject"}],
457
- "name": "file",
458
- "properties": [{"type": "shortstr", "name": "content-type"},
459
- {"type": "shortstr", "name": "content-encoding"},
460
- {"type": "table", "name": "headers"},
461
- {"type": "octet", "name": "priority"},
462
- {"type": "shortstr", "name": "reply-to"},
463
- {"type": "shortstr", "name": "message-id"},
464
- {"type": "shortstr", "name": "filename"},
465
- {"type": "timestamp", "name": "timestamp"},
466
- {"type": "shortstr", "name": "cluster-id"}]
467
- },
468
- {
469
- "id": 80,
470
- "methods": [{"id": 10,
471
- "arguments": [{"type": "long", "name": "prefetch-size", "default-value": 0},
472
- {"type": "short", "name": "prefetch-count", "default-value": 0},
473
- {"type": "long", "name": "consume-rate", "default-value": 0},
474
- {"type": "bit", "name": "global", "default-value": false}],
475
- "name": "qos"},
476
- {"id": 11,
477
- "arguments": [],
478
- "name": "qos-ok"},
479
- {"id": 20,
480
- "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
481
- {"type": "shortstr", "name": "queue"},
482
- {"type": "shortstr", "name": "consumer-tag", "default-value": ""},
483
- {"type": "bit", "name": "no-local", "default-value": false},
484
- {"type": "bit", "name": "exclusive", "default-value": false},
485
- {"type": "bit", "name": "nowait", "default-value": false}],
486
- "name": "consume"},
487
- {"id": 21,
488
- "arguments": [{"type": "shortstr", "name": "consumer-tag"}],
489
- "name": "consume-ok"},
490
- {"id": 30,
491
- "arguments": [{"type": "shortstr", "name": "consumer-tag"},
492
- {"type": "bit", "name": "nowait", "default-value": false}],
493
- "name": "cancel"},
494
- {"id": 31,
495
- "arguments": [{"type": "shortstr", "name": "consumer-tag"}],
496
- "name": "cancel-ok"},
497
- {"content": true,
498
- "id": 40,
499
- "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
500
- {"type": "shortstr", "name": "exchange", "default-value": ""},
501
- {"type": "shortstr", "name": "routing-key"},
502
- {"type": "bit", "name": "mandatory", "default-value": false},
503
- {"type": "bit", "name": "immediate", "default-value": false}],
504
- "name": "publish"},
505
- {"content": true,
506
- "id": 50,
507
- "arguments": [{"type": "short", "name": "reply-code", "default-value": 200},
508
- {"type": "shortstr", "name": "reply-text", "default-value": ""},
509
- {"type": "shortstr", "name": "exchange"},
510
- {"type": "shortstr", "name": "routing-key"}],
511
- "name": "return"},
512
- {"content": true,
513
- "id": 60,
514
- "arguments": [{"type": "shortstr", "name": "consumer-tag"},
515
- {"type": "longlong", "name": "delivery-tag"},
516
- {"type": "shortstr", "name": "exchange"},
517
- {"type": "shortstr", "name": "queue"}],
518
- "name": "deliver"}],
519
- "name": "stream",
520
- "properties": [{"type": "shortstr", "name": "content-type"},
521
- {"type": "shortstr", "name": "content-encoding"},
522
- {"type": "table", "name": "headers"},
523
- {"type": "octet", "name": "priority"},
524
- {"type": "timestamp", "name": "timestamp"}]
525
- },
526
- {
527
- "id": 90,
528
- "methods": [{"id": 10,
529
- "arguments": [],
530
- "name": "select"},
531
- {"id": 11,
532
- "arguments": [],
533
- "name": "select-ok"},
534
- {"id": 20,
535
- "arguments": [],
536
- "name": "commit"},
537
- {"id": 21,
538
- "arguments": [],
539
- "name": "commit-ok"},
540
- {"id": 30,
541
- "arguments": [],
542
- "name": "rollback"},
543
- {"id": 31,
544
- "arguments": [],
545
- "name": "rollback-ok"}],
546
- "name": "tx"
547
- },
548
- {
549
- "id": 100,
550
- "methods": [{"id": 10,
551
- "arguments": [],
552
- "name": "select"},
553
- {"id": 11,
554
- "arguments": [],
555
- "name": "select-ok"},
556
- {"id": 20,
557
- "arguments": [{"type": "shortstr", "name": "dtx-identifier"}],
558
- "name": "start"},
559
- {"id": 21,
560
- "arguments": [], "name": "start-ok"}],
561
- "name": "dtx"
562
- },
563
- {
564
- "id": 110,
565
- "methods": [{"content": true,
566
- "id": 10,
567
- "arguments": [{"type": "table", "name": "meta-data"}],
568
- "name": "request"}],
569
- "name": "tunnel",
570
- "properties": [{"type": "table", "name": "headers"},
571
- {"type": "shortstr", "name": "proxy-name"},
572
- {"type": "shortstr", "name": "data-name"},
573
- {"type": "octet", "name": "durable"},
574
- {"type": "octet", "name": "broadcast"}]
575
- },
576
- {
577
- "id": 120,
578
- "methods": [{"id": 10,
579
- "arguments": [{"type": "octet", "name": "integer-1"},
580
- {"type": "short", "name": "integer-2"},
581
- {"type": "long", "name": "integer-3"},
582
- {"type": "longlong", "name": "integer-4"},
583
- {"type": "octet", "name": "operation"}],
584
- "name": "integer"},
585
- {"id": 11,
586
- "arguments": [{"type": "longlong", "name": "result"}],
587
- "name": "integer-ok"},
588
- {"id": 20,
589
- "arguments": [{"type": "shortstr", "name": "string-1"},
590
- {"type": "longstr", "name": "string-2"},
591
- {"type": "octet", "name": "operation"}],
592
- "name": "string"},
593
- {"id": 21,
594
- "arguments": [{"type": "longstr", "name": "result"}],
595
- "name": "string-ok"},
596
- {"id": 30,
597
- "arguments": [{"type": "table", "name": "table"},
598
- {"type": "octet", "name": "integer-op"},
599
- {"type": "octet", "name": "string-op"}],
600
- "name": "table"},
601
- {"id": 31,
602
- "arguments": [{"type": "longlong", "name": "integer-result"},
603
- {"type": "longstr", "name": "string-result"}],
604
- "name": "table-ok"},
605
- {"content": true,
606
- "id": 40,
607
- "arguments": [],
608
- "name": "content"},
609
- {"content": true,
610
- "id": 41,
611
- "arguments": [{"type": "long", "name": "content-checksum"}],
612
- "name": "content-ok"}],
613
- "name": "test"
614
- }
615
- ]
616
- }