Skip to content

Commit fb27080

Browse files
author
Rob Harrop
committed
Merge with default
2 parents 8550425 + b4a01a0 commit fb27080

File tree

21 files changed

+452
-75
lines changed

21 files changed

+452
-75
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,5 @@ doc: rabbit-vsn ensure-prerequisites ensure-release-dir ensure-docs
6060
rm -rf ${NAME_VSN}-wcf-htmldoc && \
6161
unzip ${NAME_VSN}-wcf-htmldoc.zip -d ${NAME_VSN}-wcf-htmldoc
6262

63+
clean:
64+
rm -rf $(RELEASE_DIR)/*

docs/RabbitMQ Service Model.doc

4.5 KB
Binary file not shown.

docs/RabbitMQ Service Model.docx

71 Bytes
Binary file not shown.

docs/RabbitMQ Service Model.pdf

38.5 KB
Binary file not shown.

docs/specs/amqp0-9-1.stripped.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,32 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
239239
<method name="delete-ok" synchronous="1" index="21">
240240
<chassis name="client" implement="MUST"/>
241241
</method>
242+
<method name="bind" synchronous="1" index="30">
243+
<chassis name="server" implement="MUST"/>
244+
<response name="bind-ok"/>
245+
<field name="reserved-1" type="short" reserved="1"/>
246+
<field name="destination" domain="exchange-name"/>
247+
<field name="source" domain="exchange-name"/>
248+
<field name="routing-key" domain="shortstr"/>
249+
<field name="no-wait" domain="no-wait"/>
250+
<field name="arguments" domain="table"/>
251+
</method>
252+
<method name="bind-ok" synchronous="1" index="31">
253+
<chassis name="client" implement="MUST"/>
254+
</method>
255+
<method name="unbind" synchronous="1" index="40">
256+
<chassis name="server" implement="MUST"/>
257+
<response name="unbind-ok"/>
258+
<field name="reserved-1" type="short" reserved="1"/>
259+
<field name="destination" domain="exchange-name"/>
260+
<field name="source" domain="exchange-name"/>
261+
<field name="routing-key" domain="shortstr"/>
262+
<field name="no-wait" domain="no-wait"/>
263+
<field name="arguments" domain="table"/>
264+
</method>
265+
<method name="unbind-ok" synchronous="1" index="41">
266+
<chassis name="client" implement="MUST"/>
267+
</method>
242268
</class>
243269
<class name="queue" handler="channel" index="50">
244270
<chassis name="server" implement="MUST"/>

docs/wikipages/data.ApiGen.txt

100755100644
Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,9 @@ parameter concerned:
337337
void _Private_BasicConsume(...,
338338
bool exclusive,
339339
bool nowait,
340-
[AmqpFieldMapping(
341-
"RabbitMQ.Client.Framing.v0_8qpid",
342-
"arguments")]
343-
IDictionary filter);
340+
[AmqpFieldMapping("RabbitMQ.Client.Framing.v0_9",
341+
"filter")]
342+
IDictionary arguments);
344343

345344
The parameter to the attribute specifies the specification version to
346345
which the attribute should apply, or null if it should apply to any
@@ -533,10 +532,10 @@ asynchronous event handler.
533532

534533
*** Overriding behaviour for particular specification versions
535534

536-
In some versions of the specification, a particular field or method
537-
may not be supported. Methods and parameters can be marked to cause
538-
particular implementations to complain if these features are used by
539-
applications:
535+
In some versions of the specification, a particular field, method or
536+
content header may not be supported. Methods and parameters can be
537+
marked to cause particular implementations to complain if these
538+
features are used by applications:
540539

541540
@code java
542541
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8qpid")]
@@ -562,14 +561,14 @@ QueueUnbind.
562561
bool exclusive,
563562
bool nowait,
564563
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8")]
565-
[AmqpFieldMapping("RabbitMQ.Client.Framing.v0_8qpid",
566-
"arguments")]
567-
IDictionary filter);
568-
569-
In the example above, the "filter" parameter is unsupported in
570-
standard 0-8, and in QPid-specific 0-8 it is named "arguments" instead
571-
of "filter". In all other implementations (currently only 0-9), it is
572-
assumed to be supported and named "filter".
564+
[AmqpFieldMapping("RabbitMQ.Client.Framing.v0_9",
565+
"filter")]
566+
IDictionary arguments);
567+
568+
In the example above, the "arguments" parameter is unsupported in
569+
standard 0-8, and in 0-9 t is named "filter" instead of
570+
"arguments". In all other implementations, it is assumed to be
571+
supported and named "arguments".
573572

574573
The parameter to the attribute specifies the specification version to
575574
which the attribute should apply, or null if it should apply to any

projects/client/ApigenBootstrap/RabbitMQ.Client.ApigenBootstrap.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
<Compile Include="..\RabbitMQ.Client\src\client\api\ShutdownInitiator.cs">
7373
<Link>src\client\api\ShutdownInitiator.cs</Link>
7474
</Compile>
75+
<Compile Include="..\RabbitMQ.Client\src\client\events\BasicRecoverOkEventHandler.cs">
76+
<Link>src\client\events\BasicRecoverOkEventHandler.cs</Link>
77+
</Compile>
7578
<Compile Include="..\RabbitMQ.Client\src\client\events\BasicReturnEventArgs.cs">
7679
<Link>src\client\events\BasicReturnEventArgs.cs</Link>
7780
</Compile>
@@ -93,6 +96,9 @@
9396
<Compile Include="..\RabbitMQ.Client\src\client\events\ModelShutdownEventHandler.cs">
9497
<Link>src\client\events\ModelShutdownEventHandler.cs</Link>
9598
</Compile>
99+
<Compile Include="..\RabbitMQ.Client\src\client\events\FlowControlEventHandler.cs">
100+
<Link>src\client\events\FlowControlEventHandler.cs</Link>
101+
</Compile>
96102
<Compile Include="properties\AssemblyInfo.cs" />
97103
</ItemGroup>
98104

projects/client/RabbitMQ.Client/src/client/api/IModel.cs

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,18 @@ public interface IModel: IDisposable
9797
///</remarks>
9898
event CallbackExceptionEventHandler CallbackException;
9999

100+
event FlowControlEventHandler FlowControl;
101+
102+
///<summary>All messages received before this fires that haven't been
103+
///ack'ed will be redelivered. All messages received afterwards won't
104+
///be.
105+
///
106+
///Handlers for this event are invoked by the connection thread.
107+
///It is sometimes useful to allow that thread to know that a recover-ok
108+
///has been received, rather than the thread that invoked BasicRecover().
109+
///</summary>
110+
event BasicRecoverOkEventHandler BasicRecoverOk;
111+
100112
///<summary>Signalled when an unexpected message is delivered
101113
///
102114
/// Under certain circumstances it is possible for a channel to receive a
@@ -195,6 +207,28 @@ void ExchangeDelete(string exchange,
195207
[AmqpNowaitArgument(null)]
196208
bool nowait);
197209

210+
///<summary>(Spec method) Bind an exchange to an exchange.</summary>
211+
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8"),
212+
AmqpUnsupported("RabbitMQ.Client.Framing.v0_8qpid"),
213+
AmqpUnsupported("RabbitMQ.Client.Framing.v0_9")]
214+
void ExchangeBind(string destination,
215+
string source,
216+
string routingKey,
217+
[AmqpNowaitArgument(null)]
218+
bool nowait,
219+
IDictionary arguments);
220+
221+
///<summary>(Spec method) Unbind an exchange from an exchange.</summary>
222+
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8"),
223+
AmqpUnsupported("RabbitMQ.Client.Framing.v0_8qpid"),
224+
AmqpUnsupported("RabbitMQ.Client.Framing.v0_9")]
225+
void ExchangeUnbind(string destination,
226+
string source,
227+
string routingKey,
228+
[AmqpNowaitArgument(null)]
229+
bool nowait,
230+
IDictionary arguments);
231+
198232
///<summary>(Spec method) Declare a queue.</summary>
199233
///<remarks>
200234
///The queue is declared non-passive, non-durable,
@@ -299,7 +333,7 @@ uint QueueDelete(string queue,
299333
///</remarks>
300334
[AmqpMethodDoNotImplement(null)]
301335
string BasicConsume(string queue,
302-
IDictionary filter,
336+
IDictionary arguments,
303337
IBasicConsumer consumer);
304338

305339
///<summary>Start a Basic content-class consumer.</summary>
@@ -311,7 +345,7 @@ string BasicConsume(string queue,
311345
[AmqpMethodDoNotImplement(null)]
312346
string BasicConsume(string queue,
313347
bool noAck,
314-
IDictionary filter,
348+
IDictionary arguments,
315349
IBasicConsumer consumer);
316350

317351
///<summary>Start a Basic content-class consumer.</summary>
@@ -323,7 +357,7 @@ string BasicConsume(string queue,
323357
string BasicConsume(string queue,
324358
bool noAck,
325359
string consumerTag,
326-
IDictionary filter,
360+
IDictionary arguments,
327361
IBasicConsumer consumer);
328362

329363
///<summary>Start a Basic content-class consumer.</summary>
@@ -333,7 +367,7 @@ string BasicConsume(string queue,
333367
string consumerTag,
334368
bool noLocal,
335369
bool exclusive,
336-
IDictionary filter,
370+
IDictionary arguments,
337371
IBasicConsumer consumer);
338372

339373
///<summary>Delete a Basic content-class consumer.</summary>
@@ -383,6 +417,7 @@ void BasicReject(ulong deliveryTag,
383417
bool requeue);
384418

385419
///<summary>(Spec method)</summary>
420+
[AmqpMethodDoNotImplement(null)]
386421
void BasicRecover(bool requeue);
387422

388423
///<summary>(Spec method)</summary>
@@ -572,11 +607,9 @@ void _Private_BasicConsume(string queue,
572607
bool exclusive,
573608
bool nowait,
574609
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8")]
575-
[AmqpFieldMapping("RabbitMQ.Client.Framing.v0_8qpid",
576-
"arguments")]
577-
[AmqpFieldMapping("RabbitMQ.Client.Framing.v0_9_1",
578-
"arguments")]
579-
IDictionary filter);
610+
[AmqpFieldMapping("RabbitMQ.Client.Framing.v0_9",
611+
"filter")]
612+
IDictionary arguments);
580613

581614
///<summary>Used to send a Confirm.Select method. The public
582615
///confirm API calls this while also managing internal
@@ -653,6 +686,15 @@ void HandleBasicGetOk(ulong deliveryTag,
653686
///</remarks>
654687
void HandleBasicGetEmpty();
655688

689+
///<summary>Handle incoming Basic.RecoverOk methods
690+
///received in reply to Basic.Recover.
691+
///</summary>
692+
void HandleBasicRecoverOk();
693+
694+
[AmqpForceOneWay]
695+
[AmqpMethodMapping(null, "basic", "recover")]
696+
void _Private_BasicRecover(bool requeue);
697+
656698
///<summary>Handle incoming Basic.Deliver methods. Dispatches
657699
///to waiting consumers.</summary>
658700
void HandleBasicDeliver(string consumerTag,
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// This source code is dual-licensed under the Apache License, version
2+
// 2.0, and the Mozilla Public License, version 1.1.
3+
//
4+
// The APL v2.0:
5+
//
6+
//---------------------------------------------------------------------------
7+
// Copyright (C) 2007-2010 LShift Ltd., Cohesive Financial
8+
// Technologies LLC., and Rabbit Technologies Ltd.
9+
//
10+
// Licensed under the Apache License, Version 2.0 (the "License");
11+
// you may not use this file except in compliance with the License.
12+
// You may obtain a copy of the License at
13+
//
14+
// http://www.apache.org/licenses/LICENSE-2.0
15+
//
16+
// Unless required by applicable law or agreed to in writing, software
17+
// distributed under the License is distributed on an "AS IS" BASIS,
18+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19+
// See the License for the specific language governing permissions and
20+
// limitations under the License.
21+
//---------------------------------------------------------------------------
22+
//
23+
// The MPL v1.1:
24+
//
25+
//---------------------------------------------------------------------------
26+
// The contents of this file are subject to the Mozilla Public License
27+
// Version 1.1 (the "License"); you may not use this file except in
28+
// compliance with the License. You may obtain a copy of the License at
29+
// http://www.rabbitmq.com/mpl.html
30+
//
31+
// Software distributed under the License is distributed on an "AS IS"
32+
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
33+
// License for the specific language governing rights and limitations
34+
// under the License.
35+
//
36+
// The Original Code is The RabbitMQ .NET Client.
37+
//
38+
// The Initial Developers of the Original Code are LShift Ltd,
39+
// Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd.
40+
//
41+
// Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd,
42+
// Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd
43+
// are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial
44+
// Technologies LLC, and Rabbit Technologies Ltd.
45+
//
46+
// Portions created by LShift Ltd are Copyright (C) 2007-2010 LShift
47+
// Ltd. Portions created by Cohesive Financial Technologies LLC are
48+
// Copyright (C) 2007-2010 Cohesive Financial Technologies
49+
// LLC. Portions created by Rabbit Technologies Ltd are Copyright
50+
// (C) 2007-2010 Rabbit Technologies Ltd.
51+
//
52+
// All Rights Reserved.
53+
//
54+
// Contributor(s): ______________________________________.
55+
//
56+
//---------------------------------------------------------------------------
57+
using System;
58+
59+
namespace RabbitMQ.Client.Events
60+
{
61+
///<summary>Delegate used to process Basic.RecoverOk events.</summary>
62+
public delegate void BasicRecoverOkEventHandler(IModel model, EventArgs args);
63+
}
64+
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// This source code is dual-licensed under the Apache License, version
2+
// 2.0, and the Mozilla Public License, version 1.1.
3+
//
4+
// The APL v2.0:
5+
//
6+
//---------------------------------------------------------------------------
7+
// Copyright (C) 2007-2010 LShift Ltd., Cohesive Financial
8+
// Technologies LLC., and Rabbit Technologies Ltd.
9+
//
10+
// Licensed under the Apache License, Version 2.0 (the "License");
11+
// you may not use this file except in compliance with the License.
12+
// You may obtain a copy of the License at
13+
//
14+
// http://www.apache.org/licenses/LICENSE-2.0
15+
//
16+
// Unless required by applicable law or agreed to in writing, software
17+
// distributed under the License is distributed on an "AS IS" BASIS,
18+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19+
// See the License for the specific language governing permissions and
20+
// limitations under the License.
21+
//---------------------------------------------------------------------------
22+
//
23+
// The MPL v1.1:
24+
//
25+
//---------------------------------------------------------------------------
26+
// The contents of this file are subject to the Mozilla Public License
27+
// Version 1.1 (the "License"); you may not use this file except in
28+
// compliance with the License. You may obtain a copy of the License at
29+
// http://www.rabbitmq.com/mpl.html
30+
//
31+
// Software distributed under the License is distributed on an "AS IS"
32+
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
33+
// License for the specific language governing rights and limitations
34+
// under the License.
35+
//
36+
// The Original Code is The RabbitMQ .NET Client.
37+
//
38+
// The Initial Developers of the Original Code are LShift Ltd,
39+
// Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd.
40+
//
41+
// Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd,
42+
// Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd
43+
// are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial
44+
// Technologies LLC, and Rabbit Technologies Ltd.
45+
//
46+
// Portions created by LShift Ltd are Copyright (C) 2007-2010 LShift
47+
// Ltd. Portions created by Cohesive Financial Technologies LLC are
48+
// Copyright (C) 2007-2010 Cohesive Financial Technologies
49+
// LLC. Portions created by Rabbit Technologies Ltd are Copyright
50+
// (C) 2007-2010 Rabbit Technologies Ltd.
51+
//
52+
// All Rights Reserved.
53+
//
54+
// Contributor(s): ______________________________________.
55+
//
56+
//---------------------------------------------------------------------------
57+
58+
using System;
59+
60+
namespace RabbitMQ.Client.Events
61+
{
62+
63+
///<summary>Delegate used to process flow control events.</summary>
64+
public delegate void FlowControlEventHandler(IModel sender, FlowControlEventArgs args);
65+
66+
///<summary>Event relating to flow control</summary>
67+
public class FlowControlEventArgs : EventArgs
68+
{
69+
private readonly bool m_active;
70+
71+
public FlowControlEventArgs(bool active)
72+
{
73+
m_active = active;
74+
}
75+
76+
///<summary>Access the flow control setting</summary>
77+
public bool Active { get { return m_active; } }
78+
}
79+
}

0 commit comments

Comments
 (0)