Skip to content

Commit 3955718

Browse files
author
Simon MacMullen
committed
stable to default
2 parents 33e4a4a + d968e33 commit 3955718

File tree

80 files changed

+702
-260
lines changed

Some content is hidden

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

80 files changed

+702
-260
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,15 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
167167
<chassis name="client" implement="MUST"/>
168168
<chassis name="server" implement="MUST"/>
169169
</method>
170+
<method name="blocked" index="60">
171+
<chassis name="server" implement="MUST"/>
172+
<chassis name="client" implement="MUST"/>
173+
<field name="reason" domain="shortstr" />
174+
</method>
175+
<method name="unblocked" index="61">
176+
<chassis name="server" implement="MUST"/>
177+
<chassis name="client" implement="MUST"/>
178+
</method>
170179
</class>
171180
<class name="channel" handler="channel" index="20">
172181
<chassis name="server" implement="MUST"/>

docs/specs/amqp0-9-1.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
exchange.bind and exchange.bind-ok,
88
exchange.unbind and exchange.unbind-ok,
99
basic.nack,
10+
connection.blocked and connection.unblocked,
1011
the ability for the Server to send basic.ack, basic.nack and
1112
basic.cancel to the client, and
1213
the un-deprecation of exchange.declare{auto-delete} and exchange.declare{internal}
@@ -893,6 +894,31 @@
893894
<chassis name = "client" implement = "MUST" />
894895
<chassis name = "server" implement = "MUST" />
895896
</method>
897+
898+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
899+
900+
<method name = "blocked" index = "60" label = "indicates a connection is blocked">
901+
<doc>Notifies client that the connection is blocked</doc>
902+
903+
<field name = "reason" domain = "shortstr">
904+
<doc>
905+
Provides an explanation why the connection was blocked.
906+
</doc>
907+
</field>
908+
909+
<chassis name = "client" implement = "MUST" />
910+
<chassis name = "server" implement = "MUST" />
911+
</method>
912+
</class>
913+
914+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
915+
916+
<method name = "unblocked" index = "61" label = "indicates a connection is unblocked">
917+
<doc>Notifies client that the connection is unblocked</doc>
918+
919+
<chassis name = "client" implement = "MUST" />
920+
<chassis name = "server" implement = "MUST" />
921+
</method>
896922
</class>
897923

898924
<!-- == CHANNEL ========================================================== -->

projects/client/Apigen/properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
using System.Runtime.CompilerServices;
4343
using System.Runtime.InteropServices;
4444

45-
// General Information about an assembly is controlled through the following
45+
// General Information about an assembly is controlled through the following
4646
// set of attributes. Change these attribute values to modify the information
4747
// associated with an assembly.
4848
[assembly: AssemblyTitle("ApiGen")]
@@ -54,8 +54,8 @@
5454
[assembly: AssemblyTrademark("")]
5555
[assembly: AssemblyCulture("")]
5656

57-
// Setting ComVisible to false makes the types in this assembly not visible
58-
// to COM components. If you need to access a type in this assembly from
57+
// Setting ComVisible to false makes the types in this assembly not visible
58+
// to COM components. If you need to access a type in this assembly from
5959
// COM, set the ComVisible attribute to true on that type.
6060
[assembly: ComVisible(false)]
6161

projects/client/ApigenBootstrap/properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
using System.Runtime.CompilerServices;
4343
using System.Runtime.InteropServices;
4444

45-
// General Information about an assembly is controlled through the following
45+
// General Information about an assembly is controlled through the following
4646
// set of attributes. Change these attribute values to modify the information
4747
// associated with an assembly.
4848
[assembly: AssemblyTitle("ApiGenBootstrap")]
@@ -54,8 +54,8 @@
5454
[assembly: AssemblyTrademark("")]
5555
[assembly: AssemblyCulture("")]
5656

57-
// Setting ComVisible to false makes the types in this assembly not visible
58-
// to COM components. If you need to access a type in this assembly from
57+
// Setting ComVisible to false makes the types in this assembly not visible
58+
// to COM components. If you need to access a type in this assembly from
5959
// COM, set the ComVisible attribute to true on that type.
6060
[assembly: ComVisible(false)]
6161

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ public SslOption Ssl
105105
}
106106

107107
///<summary>Construct an AmqpTcpEndpoint with the given
108-
///IProtocol, hostname, port number and ssl option. If the port
109-
///number is -1, the default port number for the IProtocol
108+
///IProtocol, hostname, port number and ssl option. If the port
109+
///number is -1, the default port number for the IProtocol
110110
///will be used.</summary>
111111
public AmqpTcpEndpoint(IProtocol protocol, string hostName, int portOrMinusOne, SslOption ssl)
112112
{

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

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ public interface IConnection: IDisposable
7979
///</remarks>
8080
event CallbackExceptionEventHandler CallbackException;
8181

82+
event ConnectionBlockedEventHandler ConnectionBlocked;
83+
event ConnectionUnblockedEventHandler ConnectionUnblocked;
84+
8285
///<summary>Retrieve the endpoint this connection is connected
8386
///to.</summary>
8487
AmqpTcpEndpoint Endpoint { get; }
@@ -164,12 +167,12 @@ public interface IConnection: IDisposable
164167
///It can also throw IOException when socket was closed unexpectedly.
165168
///</remarks>
166169
void Close();
167-
170+
168171
///<summary>Close this connection and all its channels.</summary>
169172
///<remarks>
170173
///The method behaves in the same way as Close(), with the only
171174
///difference that the connection is closed with the given connection
172-
///close code and message.
175+
///close code and message.
173176
///<para>
174177
///The close code (See under "Reply Codes" in the AMQP specification)
175178
///</para>
@@ -178,15 +181,15 @@ public interface IConnection: IDisposable
178181
///</para>
179182
///</remarks>
180183
void Close(ushort reasonCode, string reasonText);
181-
184+
182185
///<summary>Close this connection and all its channels
183186
///and wait with a timeout for all the in-progress close operations
184187
///to complete.
185188
///</summary>
186189
///<remarks>
187190
///Note that all active channels, sessions, and models will be
188191
///closed if this method is called. It will wait for the in-progress
189-
///close operation to complete with a timeout. If the connection is
192+
///close operation to complete with a timeout. If the connection is
190193
///already closed (or closing), then this method will throw
191194
///AlreadyClosedException.
192195
///It can also throw IOException when socket was closed unexpectedly.
@@ -198,7 +201,7 @@ public interface IConnection: IDisposable
198201
///</para>
199202
///</remarks>
200203
void Close(int timeout);
201-
204+
202205
///<summary>Close this connection and all its channels
203206
///and wait with a timeout for all the in-progress close operations
204207
///to complete.
@@ -215,7 +218,7 @@ public interface IConnection: IDisposable
215218
///</para>
216219
///</remarks>
217220
void Close(ushort reasonCode, string reasonText, int timeout);
218-
221+
219222
///<summary>Abort this connection and all its channels.</summary>
220223
///<remarks>
221224
///Note that all active channels, sessions, and models will be
@@ -226,7 +229,7 @@ public interface IConnection: IDisposable
226229
///to complete.
227230
///</remarks>
228231
void Abort();
229-
232+
230233
///<summary>Abort this connection and all its channels.</summary>
231234
///<remarks>
232235
///The method behaves in the same way as Abort(), with the only
@@ -240,7 +243,7 @@ public interface IConnection: IDisposable
240243
///</para>
241244
///</remarks>
242245
void Abort(ushort reasonCode, string reasonText);
243-
246+
244247
///<summary>
245248
///Abort this connection and all its channels and wait with a
246249
///timeout for all the in-progress close operations to complete.
@@ -257,7 +260,7 @@ public interface IConnection: IDisposable
257260
///</para>
258261
///</remarks>
259262
void Abort(int timeout);
260-
263+
261264
///<summary>
262265
///Abort this connection and all its channels and wait with a
263266
///timeout for all the in-progress close operations to complete.
@@ -274,10 +277,17 @@ public interface IConnection: IDisposable
274277
///</para>
275278
///</remarks>
276279
void Abort(ushort reasonCode, string reasonText, int timeout);
277-
280+
278281
///<summary>Returns the list of ShutdownReportEntry objects that
279282
///contain information about any errors reported while closing the
280283
///connection in the order they appeared</summary>
281284
IList ShutdownReport { get; }
285+
286+
287+
///<summary>Handle incoming Connection.Blocked methods.</summary>
288+
void HandleConnectionBlocked(string reason);
289+
290+
///<summary>Handle incoming Connection.Unblocked methods.</summary>
291+
void HandleConnectionUnblocked();
282292
}
283293
}

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

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ BasicGetResult BasicGet(string queue,
537537
///</remarks>
538538
[AmqpMethodDoNotImplement(null)]
539539
void Close();
540-
540+
541541
///<summary>Close this session.</summary>
542542
///<remarks>
543543
///The method behaves in the same way as Close(), with the only
@@ -552,7 +552,7 @@ BasicGetResult BasicGet(string queue,
552552
///</remarks>
553553
[AmqpMethodDoNotImplement(null)]
554554
void Close(ushort replyCode, string replyText);
555-
555+
556556
///<summary>Abort this session.</summary>
557557
///<remarks>
558558
///If the session is already closed (or closing), then this
@@ -564,7 +564,7 @@ BasicGetResult BasicGet(string queue,
564564
///</remarks>
565565
[AmqpMethodDoNotImplement(null)]
566566
void Abort();
567-
567+
568568
///<summary>Abort this session.</summary>
569569
///<remarks>
570570
///The method behaves in the same way as Abort(), with the only
@@ -918,7 +918,7 @@ void HandleBasicNack(ulong deliveryTag,
918918
///Channel.Flow from the broker was processed.</summary>
919919
[AmqpMethodMapping(null, "channel", "flow-ok")]
920920
void _Private_ChannelFlowOk(bool active);
921-
921+
922922
///<summary>Handle incoming Channel.Flow methods. Either
923923
///stops or resumes sending the methods that have content.</summary>
924924
void HandleChannelFlow(bool active);
@@ -1017,6 +1017,20 @@ void HandleConnectionClose(ushort replyCode,
10171017
string replyText,
10181018
ushort classId,
10191019
ushort methodId);
1020+
1021+
///<summary>Handle an incoming Connection.Blocked.</summary>
1022+
[AmqpMethodMapping(null, "connection", "blocked")]
1023+
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8qpid")]
1024+
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8")]
1025+
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_9")]
1026+
void HandleConnectionBlocked(string reason);
1027+
1028+
///<summary>Handle an incominga Connection.Unblocked.</summary>
1029+
[AmqpMethodMapping(null, "connection", "unblocked")]
1030+
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8qpid")]
1031+
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8")]
1032+
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_9")]
1033+
void HandleConnectionUnblocked();
10201034
}
10211035

10221036
///<summary>Essential information from an incoming Connection.Tune

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,24 +68,24 @@ namespace RabbitMQ.Client
6868
/// The following is a simple example of the usage of this class:
6969
///</para>
7070
///<example><code>
71-
/// IModel channel = ...;
72-
/// QueueingBasicConsumer consumer = new QueueingBasicConsumer(channel);
73-
/// channel.BasicConsume(queueName, null, consumer);
74-
///
75-
/// // At this point, messages will be being asynchronously delivered,
76-
/// // and will be queueing up in consumer.Queue.
77-
///
78-
/// while (true) {
79-
/// try {
80-
/// BasicDeliverEventArgs e = (BasicDeliverEventArgs) consumer.Queue.Dequeue();
81-
/// // ... handle the delivery ...
82-
/// channel.BasicAck(e.DeliveryTag, false);
83-
/// } catch (EndOfStreamException ex) {
84-
/// // The consumer was cancelled, the model closed, or the
85-
/// // connection went away.
86-
/// break;
87-
/// }
88-
/// }
71+
/// IModel channel = ...;
72+
/// QueueingBasicConsumer consumer = new QueueingBasicConsumer(channel);
73+
/// channel.BasicConsume(queueName, null, consumer);
74+
///
75+
/// // At this point, messages will be being asynchronously delivered,
76+
/// // and will be queueing up in consumer.Queue.
77+
///
78+
/// while (true) {
79+
/// try {
80+
/// BasicDeliverEventArgs e = (BasicDeliverEventArgs) consumer.Queue.Dequeue();
81+
/// // ... handle the delivery ...
82+
/// channel.BasicAck(e.DeliveryTag, false);
83+
/// } catch (EndOfStreamException ex) {
84+
/// // The consumer was cancelled, the model closed, or the
85+
/// // connection went away.
86+
/// break;
87+
/// }
88+
/// }
8989
///</code></example>
9090
///</remarks>
9191
public class QueueingBasicConsumer : DefaultBasicConsumer

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@ public class ShutdownReportEntry
4949
{
5050
public string m_description;
5151
public Exception m_ex;
52-
52+
5353
public ShutdownReportEntry(string description, Exception ex)
5454
{
5555
m_description = description;
5656
m_ex = ex;
5757
}
58-
58+
5959
///<summary>Description provided in the error</summary>
6060
public string Description { get { return m_description; } }
61-
61+
6262
///<summary>Exception object that occured during shutdown, or null
6363
///if unspecified</summary>
6464
public Exception Exception { get { return m_ex; } }
65-
65+
6666
public override string ToString()
6767
{
6868
string output = "Message: " + Description;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static Stream TcpUpgrade(Stream tcpStream, SslOption sslOption)
9494
SslStream sslStream = new SslStream(tcpStream, false,
9595
new RemoteCertificateValidationCallback(helper.CertificateValidationCallback),
9696
new LocalCertificateSelectionCallback(helper.CertificateSelectionCallback));
97-
97+
9898
sslStream.AuthenticateAsClient(sslOption.ServerName,
9999
sslOption.Certs,
100100
sslOption.Version,

0 commit comments

Comments
 (0)