File tree Expand file tree Collapse file tree 3 files changed +21
-10
lines changed
projects/client/RabbitMQ.Client/src/client/api Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ ensure-deliverables: rabbit-vsn
34
34
file ${RELEASE_DIR} /${NAME_VSN} .msm
35
35
36
36
ensure-prerequisites : rabbit-vsn
37
- dpkg -L htmldoc plotutils transfig graphviz docbook-utils > /dev/null
37
+ [ -f " /etc/debian_version " ] && dpkg -L htmldoc plotutils transfig graphviz docbook-utils || true > /dev/null
38
38
39
39
ensure-release-dir : rabbit-vsn
40
40
touch ${RELEASE_DIR} /
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ of the shell environment variable scanned.)
117
117
118
118
** Connecting to a broker
119
119
120
- The following code connects to an AMQP broker:
120
+ The following two code snippets connect to an AMQP broker:
121
121
122
122
@code java
123
123
ConnectionFactory factory = new ConnectionFactory();
@@ -129,6 +129,11 @@ The following code connects to an AMQP broker:
129
129
factory.Port = AmqpTcpEndpoint.UseDefaultPort;
130
130
IConnection conn = factory.CreateConnection();
131
131
132
+ @code java
133
+ ConnectionFactory factory = new ConnectionFactory();
134
+ factory.Uri = "amqp://user:pass@hostName:port/vhost";
135
+ IConnection conn = factory.CreateConnection();
136
+
132
137
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:
133
138
- username: [code "guest"]
134
139
- password: [code "guest"]
Original file line number Diff line number Diff line change @@ -76,17 +76,23 @@ namespace RabbitMQ.Client
76
76
/// conn.Close(Constants.ReplySuccess, "Closing the connection");
77
77
///</code></example>
78
78
///<para>
79
- /// Please see also the API overview and tutorial in the User Guide.
79
+ ///The same example, written more compactly with AMQP URIs:
80
80
///</para>
81
+ ///<example><code>
82
+ /// ConnectionFactory factory = new ConnectionFactory();
83
+ /// factory.Uri = "amqp://guest:guest@localhost:5672/";
84
+ /// IConnection conn = factory.CreateConnection();
85
+ /// ...
86
+ ///</code></example>
81
87
///<para>
82
- /// Some of the static methods described below take, as a
83
- /// convenience, a System.Uri instance representing an AMQP server
84
- /// address. The use of Uri here is not standardised - Uri is
85
- /// simply a convenient container for internet-address-like
86
- /// components. In particular, the Uri "Scheme" property is
87
- /// ignored: only the "Host" and "Port" properties are extracted.
88
+ /// Please see also the API overview and tutorial in the User Guide.
88
89
///</para>
89
- ///</remarks>
90
+ ///<para>
91
+ ///Note that the Uri property takes a string representation of an
92
+ ///AMQP URI. Omitted URI parts will take default values. The
93
+ ///only deviation from the spec is that URIs of the form
94
+ ///"amqp://foo/" (note the trailling slash) are used to represent
95
+ ///the default virtual host.</para></remarks>
90
96
public class ConnectionFactory
91
97
{
92
98
/// <summary>Default user name (value: "guest")</summary>
You can’t perform that action at this time.
0 commit comments