Skip to content

Commit 8571076

Browse files
author
Emile Joubert
committed
Use all broker configuration parameters
1 parent f1204b5 commit 8571076

File tree

5 files changed

+21
-3
lines changed

5 files changed

+21
-3
lines changed

docs/RabbitMQ Service Model.doc

1 KB
Binary file not shown.

docs/RabbitMQ Service Model.docx

4.64 KB
Binary file not shown.

docs/RabbitMQ Service Model.pdf

103 KB
Binary file not shown.

projects/wcf/RabbitMQ.ServiceModel/src/serviceModel/RabbitMQBinding.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,24 @@ public RabbitMQBinding(String hostname, int port, IProtocol protocol)
9797
this.Port = port;
9898
}
9999

100+
/// <summary>
101+
/// Uses the broker, login and protocol specified
102+
/// </summary>
103+
/// <param name="hostname">The hostname of the broker to connect to</param>
104+
/// <param name="port">The port of the broker to connect to</param>
105+
/// <param name="username">The broker username to connect with</param>
106+
/// <param name="password">The broker password to connect with</param>
107+
/// <param name="protocol">The protocol version to use</param>
108+
public RabbitMQBinding(String hostname, int port,
109+
String username, String password, IProtocol protocol)
110+
: this(protocol)
111+
{
112+
this.HostName = hostname;
113+
this.Port = port;
114+
this.Transport.Username = username;
115+
this.Transport.Password = password;
116+
}
117+
100118
/// <summary>
101119
/// Uses the specified protocol. The broker must be set before use.
102120
/// </summary>

projects/wcf/RabbitMQ.ServiceModel/src/serviceModel/RabbitMQBindingConfigurationElement.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ protected override void OnApplyConfiguration(Binding binding)
110110
rabbind.BrokerProtocol = this.Protocol;
111111
rabbind.OneWayOnly = this.OneWayOnly;
112112
rabbind.TransactionFlow = this.TransactionFlowEnabled;
113-
rabbind.Transport.ConnectionFactory.Password = this.Password;
114-
rabbind.Transport.ConnectionFactory.UserName = this.Username;
115-
rabbind.Transport.ConnectionFactory.VirtualHost = this.VirtualHost;
113+
rabbind.Transport.Password = this.Password;
114+
rabbind.Transport.Username = this.Username;
115+
rabbind.Transport.VirtualHost = this.VirtualHost;
116116
}
117117

118118
/// <summary>

0 commit comments

Comments
 (0)