Skip to content

Commit b60a1c8

Browse files
author
Emile Joubert
committed
Merged default into bug22772
2 parents 33d3184 + eb17047 commit b60a1c8

21 files changed

+473
-187
lines changed

.hgignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ rabbit\.snk$
66
^rabbit\-mock\.snk$
77

88
^scratch$
9-
^releases/
9+
^release/
1010
^build$
1111
^commit$
1212
^diff$

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
NAME=rabbitmq-dotnet-client
22
NAME_VSN=${NAME}-${RABBIT_VSN}
33

4-
RELEASE_DIR=releases/${NAME}/v${RABBIT_VSN}
4+
RELEASE_DIR=release
55

66
TMPXMLZIP=${NAME_VSN}-tmp-xmldoc.zip
77

@@ -17,7 +17,7 @@ dist: rabbit-vsn ensure-deliverables ensure-universally-readable
1717
rm -f $(RELEASE_DIR)/$(TMPXMLZIP)
1818

1919
ensure-universally-readable:
20-
chmod -R a+rX releases
20+
chmod -R a+rX release
2121

2222
ensure-deliverables: rabbit-vsn
2323
file ${RELEASE_DIR}/${NAME_VSN}.zip

dist-msi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ test "$SKIP_MSIVAL2" || SKIP_MSIVAL2=
7272
### Other, general vars
7373
NAME=rabbitmq-dotnet-client
7474
NAME_VSN=$NAME-$RABBIT_VSN
75-
RELEASE_DIR=releases/$NAME/v$RABBIT_VSN
75+
RELEASE_DIR=release
7676

7777

7878
function main {

dist.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ test "$MONO_DIST" || MONO_DIST=
7676
### Other, general vars
7777
NAME=rabbitmq-dotnet-client
7878
NAME_VSN=$NAME-$RABBIT_VSN
79-
RELEASE_DIR=releases/$NAME/v$RABBIT_VSN
79+
RELEASE_DIR=release
8080
if [ "$MONO_DIST" ] ; then
8181
INCLUDE_WCF=true
8282
MSBUILD=xbuild

docs/wikipages/data.ApiOverview.txt

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -119,24 +119,21 @@ The following code connects to an AMQP broker:
119119

120120
@code java
121121
ConnectionFactory factory = new ConnectionFactory();
122-
IProtocol protocol = Protocols.FromEnvironment();
123-
IConnection conn = factory.CreateConnection(protocol, hostName, portNumber);
124-
125-
The default parameters are:
122+
factory.UserName = user;
123+
factory.Password = pass;
124+
factory.VirtualHost = vhost;
125+
factory.Protocol = Protocols.FromEnvironment();
126+
factory.HostName = hostName;
127+
factory.Port = AmqpTcpEndpoint.UseDefaultPort;
128+
IConnection conn = factory.CreateConnection();
129+
130+
All factory properties have default values. The default value for a property will be used if the property remains unassigned prior to creating a connection:
126131
- username: [code "guest"]
127132
- password: [code "guest"]
128133
- virtual-host: [code "/"]
129-
130-
For control over the username, password and virtual-host supplied to
131-
the broker, modify the [code ConnectionFactory]'s [code
132-
ConnectionParameters] object before calling [code CreateConnection]:
133-
134-
@code java
135-
ConnectionParameters params = factory.Parameters;
136-
params.UserName = userName;
137-
params.Password = password;
138-
params.VirtualHost = virtualHost;
139-
IConnection conn = factory.CreateConnection(protocol, hostName, portNumber);
134+
- protocol: [code AMQP 0.8]
135+
- hostname: [code localhost]
136+
- port: [code 5672]
140137

141138
The IConnection interface can then be used to open a channel:
142139

docs/wikipages/meta.ApiOverview.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
owner:
2-
timestamp: Thu, 24 Jan 2008 17:47:23 GMT
2+
timestamp: Mon, 05 Jul 2010 13:15:32 GMT
33
author:
44
editgroup:
55
viewgroup:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ namespace RabbitMQ.Client
8888
/// //
8989
/// // ... use ch's IModel methods ...
9090
/// //
91-
/// ch.Close(200, "Closing the channel");
92-
/// conn.Close(200, "Closing the connection");
91+
/// ch.Close(Constants.ReplySuccess, "Closing the channel");
92+
/// conn.Close(Constants.ReplySuccess, "Closing the connection");
9393
///</code></example>
9494
///<para>
9595
/// Please see also the API overview and tutorial in the User Guide.

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,30 @@ public interface IModel: IDisposable
9393
///</remarks>
9494
event CallbackExceptionEventHandler CallbackException;
9595

96+
///<summary>Signalled when an unexpected message is delivered
97+
///
98+
/// Under certain circumstances it is possible for a channel to receive a
99+
/// message delivery which does not match any consumer which is currently
100+
/// set up via basicConsume(). This will occur after the following sequence
101+
/// of events:
102+
///
103+
/// ctag = basicConsume(queue, consumer); // i.e. with explicit acks
104+
/// // some deliveries take place but are not acked
105+
/// basicCancel(ctag);
106+
/// basicRecover(false);
107+
///
108+
/// Since requeue is specified to be false in the basicRecover, the spec
109+
/// states that the message must be redelivered to "the original recipient"
110+
/// - i.e. the same channel / consumer-tag. But the consumer is no longer
111+
/// active.
112+
///
113+
/// In these circumstances, you can register a default consumer to handle
114+
/// such deliveries. If no default consumer is registered an
115+
/// InvalidOperationException will be thrown when such a delivery arrives.
116+
///
117+
/// Most people will not need to use this.</summary>
118+
IBasicConsumer DefaultConsumer { get; set; }
119+
96120
///<summary>Returns null if the session is still in a state
97121
///where it can be used, or the cause of its closure
98122
///otherwise.</summary>
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,70 @@
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-
// We use spec version 0-9 for common constants such as frame types,
60-
// error codes, and the frame end byte, since they don't vary *within
61-
// the versions we support*. Obviously we may need to revisit this if
62-
// that ever changes.
63-
using CommonFraming = RabbitMQ.Client.Framing.v0_9;
64-
65-
namespace RabbitMQ.Client.Impl {
66-
/// <summary>
67-
/// Thrown when the connection receives a body that exceeds the permissible maximum.
68-
/// FIXME: document the permissible maximum, and how to query and configure it
69-
/// </summary>
70-
public class BodyTooLongException: SoftProtocolException {
71-
private readonly ulong m_requestedLength;
72-
73-
public BodyTooLongException(int channelNumber, ulong requestedLength)
74-
: base(channelNumber,
75-
string.Format("The body of a message ({0} bytes) was too long.",
76-
requestedLength))
77-
{
78-
m_requestedLength = requestedLength;
79-
}
80-
81-
public ulong RequestedLength { get { return m_requestedLength; } }
82-
83-
public override ushort ReplyCode { get { return CommonFraming.Constants.ContentTooLarge; } }
84-
}
85-
}
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.Exceptions
60+
{
61+
/// <summary> Thrown when the likely cause is an
62+
/// authentication failure. </summary>
63+
public class PossibleAuthenticationFailureException : Exception
64+
{
65+
public PossibleAuthenticationFailureException(String msg, Exception inner)
66+
: base(msg, inner)
67+
{
68+
}
69+
}
70+
}

projects/client/RabbitMQ.Client/src/client/impl/CommandAssembler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public Command HandleFrame(Frame f)
142142
}
143143
NetworkBinaryReader reader = f.GetReader();
144144
m_command.m_header = m_protocol.DecodeContentHeaderFrom(reader);
145-
m_remainingBodyBytes = m_command.m_header.ReadFrom(f.Channel, reader);
145+
m_remainingBodyBytes = m_command.m_header.ReadFrom(reader);
146146
UpdateContentBodyState();
147147
return CompletedCommand();
148148
}

0 commit comments

Comments
 (0)