Skip to content

Commit f0cc445

Browse files
author
Emile Joubert
committed
Use amq.direct instead of "" exchange
1 parent 97f6a0c commit f0cc445

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ protected BindingContext Context
192192
get { return m_context; }
193193
}
194194

195+
protected String Exchange
196+
{
197+
get { return "amq.direct"; }
198+
}
195199

196200
public event EventHandler Closed;
197201

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public override void Open(TimeSpan timeout)
169169
#endif
170170
//Create a queue for messages destined to this service, bind it to the service URI routing key
171171
string queue = m_model.QueueDeclare();
172-
m_model.QueueBind(queue, base.LocalAddress.Uri.Host, base.LocalAddress.Uri.PathAndQuery, false, null);
172+
m_model.QueueBind(queue, Exchange, base.LocalAddress.Uri.PathAndQuery, false, null);
173173

174174
//Listen to the queue
175175
m_messageQueue = new QueueingBasicConsumer(m_model);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public override void Send(Message message, TimeSpan timeout)
103103
body.Length,
104104
message.Headers.Action.Remove(0, message.Headers.Action.LastIndexOf('/')));
105105
#endif
106-
m_model.BasicPublish(base.RemoteAddress.Uri.Host,
106+
m_model.BasicPublish(Exchange,
107107
base.RemoteAddress.Uri.PathAndQuery,
108108
null,
109109
body);

0 commit comments

Comments
 (0)