Skip to content

Commit 6e71453

Browse files
committed
merge bug19130 into default
2 parents 34e37e2 + ff35ae9 commit 6e71453

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+278
-676
lines changed

docs/RabbitMQ Service Model.doc

-512 Bytes
Binary file not shown.

docs/RabbitMQ Service Model.docx

137 Bytes
Binary file not shown.

docs/RabbitMQ Service Model.pdf

-345 Bytes
Binary file not shown.

docs/RabbitMQ Service Model.xps

-677 KB
Binary file not shown.

docs/wikipages/data.ApiGen.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ method to cause code-generation to skip that method.
295295

296296
@code java
297297
[AmqpMethodDoNotImplement(null)]
298-
void ExchangeDeclare(ushort ticket, string exchange, string type);
298+
void ExchangeDeclare(string exchange, string type);
299299

300300
It should be used to mark interface methods that are backed by
301301
hand-written code: for example, the [code ExchangeDeclare] overload
@@ -360,8 +360,7 @@ of the interaction style of the command. The [code AmqpNowaitArgument]
360360
attribute should be used for this purpose:
361361

362362
@code java
363-
void ExchangeDelete(ushort ticket,
364-
string exchange,
363+
void ExchangeDelete(string exchange,
365364
bool ifUnused,
366365
[AmqpNowaitArgument(null)]
367366
bool nowait);
@@ -449,7 +448,7 @@ of the returned struct.
449448

450449
@code java
451450
[return: AmqpFieldMapping(null, "messageCount")]
452-
uint QueuePurge(ushort ticket, ...);
451+
uint QueuePurge(...);
453452

454453
The above example extracts and returns just the "message-count" field
455454
of the [code queue.purge-ok] reply.
@@ -542,8 +541,7 @@ applications:
542541
@code java
543542
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8")]
544543
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8qpid")]
545-
void QueueUnbind(ushort ticket,
546-
string queue,
544+
void QueueUnbind(string queue,
547545
string exchange,
548546
string routingKey,
549547
IDictionary arguments);

docs/wikipages/data.ApiOverview.txt

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -138,22 +138,13 @@ ConnectionParameters] object before calling [code CreateConnection]:
138138
params.VirtualHost = virtualHost;
139139
IConnection conn = factory.CreateConnection(protocol, hostName, portNumber);
140140

141-
The IConnection interface can then be used to open a channel and
142-
request an access ticket to a realm:
141+
The IConnection interface can then be used to open a channel:
143142

144143
@code java
145144
IModel channel = conn.CreateModel();
146-
string realm = "/data";
147-
ushort ticket = channel.AccessRequest(realm);
148145

149-
The channel and access ticket can now be used to send and receive
150-
messages, as described in subsequent sections.
151-
152-
Some AMQP brokers do not understand the [code access.request] method.
153-
The environment variable [code AMQP_ACCESS_REQUEST] specifies behaviour
154-
of the client when communicating with such broker. The valid values
155-
ENABLE, SUPPRESS and USE_DEFAULT are explained in api-guide in
156-
the [code AccessRequestConfig].
146+
The channel can now be used to send and receive messages,
147+
as described in subsequent sections.
157148

158149
** Disconnecting from a broker
159150

@@ -194,9 +185,9 @@ Continuing the previous example, the following code declares an
194185
exchange and a queue, then binds them together.
195186

196187
@code java
197-
channel.ExchangeDeclare(ticket, exchangeName, ExchangeType.Direct);
198-
channel.QueueDeclare(ticket, queueName);
199-
channel.QueueBind(ticket, queueName, exchangeName, routingKey, false, null);
188+
channel.ExchangeDeclare(exchangeName, ExchangeType.Direct);
189+
channel.QueueDeclare(queueName);
190+
channel.QueueBind(queueName, exchangeName, routingKey, false, null);
200191

201192
This will actively declare the following objects:
202193

@@ -224,7 +215,7 @@ follows:
224215

225216
@code java
226217
byte[] messageBodyBytes = System.Text.Encoding.UTF8.GetBytes("Hello, world!");
227-
channel.BasicPublish(ticket, exchangeName, routingKey, null, messageBodyBytes);
218+
channel.BasicPublish(exchangeName, routingKey, null, messageBodyBytes);
228219

229220
For fine control, you can use overloaded variants to specify the
230221
mandatory and immediate flags, or send messages with basic-class
@@ -235,7 +226,7 @@ header properties:
235226
IBasicProperties props = channel.CreateBasicProperties();
236227
props.ContentType = "text/plain";
237228
props.DeliveryMode = 2;
238-
channel.BasicPublish(ticket, exchangeName,
229+
channel.BasicPublish(exchangeName,
239230
routingKey, props,
240231
messageBodyBytes);
241232

@@ -252,7 +243,7 @@ information (properties) and message body can be extracted:
252243

253244
@code java
254245
bool noAck = false;
255-
BasicGetResult result = channel.BasicGet(ticket, queueName, noAck);
246+
BasicGetResult result = channel.BasicGet(queueName, noAck);
256247
if (result == null) {
257248
// No message available at this time.
258249
} else {
@@ -283,7 +274,7 @@ deliveries from the [code SharedQueue] instance contained therein:
283274

284275
@code java
285276
QueueingBasicConsumer consumer = new QueueingBasicConsumer(channel);
286-
channel.BasicConsume(ticket, queueName, null, consumer);
277+
channel.BasicConsume(queueName, null, consumer);
287278
while (true) {
288279
try {
289280
RabbitMQ.Client.Events.BasicDeliverEventArgs e =
@@ -441,7 +432,7 @@ For example, to construct (and send) a MapMessage:
441432
b.Body["field1"] = 123.45;
442433
b.Body["field2"] = new byte[] { 1, 2, 3 };
443434

444-
channel.BasicPublish(ticket, exchange, routingKey,
435+
channel.BasicPublish(exchange, routingKey,
445436
(IBasicProperties) b.GetContentHeader(),
446437
b.GetContentBody());
447438

docs/wikipages/data.ImplementationGuide.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ waiting [code IRpcContinuation], about which more below.
115115
There are two styles of interaction available to [code ModelBase]:
116116

117117
- synchronous, RPC-style interaction, e.g. [code ExchangeDeclare],
118-
[code BasicGet], [code BasicConsume] and [code AccessRequest].
118+
[code BasicGet] and [code BasicConsume].
119119

120120
- asynchronous, event-style interaction, e.g. [code BasicAck], [code
121121
BasicPublish].

docs/wikipages/data.MessagingPatterns.txt

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,9 @@ MySimpleRpcServerSubclass] extending [code SimpleRpcServer]):
254254
using (IConnection conn = new ConnectionFactory()
255255
.CreateConnection(serverAddress)) {
256256
using (IModel ch = conn.CreateModel()) {
257-
ushort ticket = ch.AccessRequest("/data");
258257

259258
Subscription subscription =
260-
new Subscription(ch, ticket, /* ... */);
259+
new Subscription(ch, /* ... */);
261260
// in the line above, the "..." indicates the parameters
262261
// used to specify the address to use to route messages
263262
// to the subscription. This subscription will be used
@@ -306,9 +305,8 @@ The basic pattern for using [code SimpleRpcClient] is as follows:
306305
using (IConnection conn = new ConnectionFactory()
307306
.CreateConnection(args[0])) {
308307
using (IModel ch = conn.CreateModel()) {
309-
ushort ticket = ch.AccessRequest("/data");
310308

311-
SimpleRpcClient client = new SimpleRpcClient(ch, ticket, /* ... */);
309+
SimpleRpcClient client = new SimpleRpcClient(ch, /* ... */);
312310
// in the line above, the "..." indicates the parameters
313311
// used to specify the address to use to route messages
314312
// to the service.
@@ -365,14 +363,12 @@ For example:
365363
using (IConnection conn = new ConnectionFactory()
366364
.CreateConnection(args[0])) {
367365
using (IModel ch = conn.CreateModel()) {
368-
ushort ticket = ch.AccessRequest("/data");
369366

370367
IBasicProperties props = ch.CreateBasicProperties();
371368
FillInHeaders(props); // or similar
372369
byte[] body = ComputeBody(props); // or similar
373370

374-
ch.BasicPublish(ticket,
375-
"exchangeName",
371+
ch.BasicPublish("exchangeName",
376372
"chosen.routing.key",
377373
props,
378374
body);
@@ -391,8 +387,8 @@ declaration and queue binding, as well as consumer declaration and
391387
management. For example,
392388

393389
@code java
394-
// "IModel ch" and "ushort ticket" in scope.
395-
Subscription sub = new Subscription(ch, ticket, "price", "topic", "STOCK.IBM.#");
390+
// "IModel ch" in scope.
391+
Subscription sub = new Subscription(ch, "price", "topic", "STOCK.IBM.#");
396392
foreach (BasicDeliverEventArgs e in sub) {
397393
// handle the message contained in e ...
398394
// ... and finally acknowledge it
@@ -423,10 +419,10 @@ application wanted to retrieve all prices regarding IBM on queue
423419
"MyApplicationQueue":
424420

425421
@code java
426-
// "IModel ch" and "ushort ticket" in scope.
427-
ch.ExchangeDeclare(ticket, "prices", "topic");
428-
ch.QueueDeclare(ticket, "MyApplicationQueue");
429-
ch.QueueBind(ticket, "MyApplicationQueue", "prices",
422+
// "IModel ch" in scope.
423+
ch.ExchangeDeclare("prices", "topic");
424+
ch.QueueDeclare("MyApplicationQueue");
425+
ch.QueueBind("MyApplicationQueue", "prices",
430426
"STOCK.IBM.#", false, null);
431427

432428
... followed by consumption of messages from "MyApplicationQueue"

docs/wikipages/data.SessionApi.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ In our current (0-8) Java client, our ConnectionParameters/ConnectionFactory obj
1212
- Channel Max
1313
- Frame Max
1414
- Heartbeat interval
15-
- AccessRequest suppression
1615
- a list of Addresses (Hostname/Portnumber pairs) where the broker is reachable
1716

1817
These need splitting up.
@@ -27,7 +26,6 @@ These need splitting up.
2726
|| - Username
2827
|| - Password
2928
|| - Virtual Host
30-
|| - AccessRequest suppression
3129

3230
So, let's define a bunch of entities.
3331

src/client/api/AccessRequestConfig.cs

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)