Permalink
Browse files

I don't thing 'response' variable is actually necessary

  • Loading branch information...
1 parent 0ee4fb8 commit fba096fa9f109a6de9bb883f9027048bcc4cc311 @majek majek committed Aug 15, 2011
Showing with 2 additions and 5 deletions.
  1. +2 −5 dotnet/RPCClient.cs
View
@@ -19,7 +19,6 @@ class RPCClient {
}
public string Call(string message) {
- string response = null;
string corrId = Guid.NewGuid().ToString();
IBasicProperties props = channel.CreateBasicProperties();
props.ReplyTo = replyQueueName;
@@ -32,13 +31,11 @@ class RPCClient {
BasicDeliverEventArgs ea =
(BasicDeliverEventArgs)consumer.Queue.Dequeue();
if (ea.BasicProperties.CorrelationId == corrId) {
@wizaerd
wizaerd Jul 24, 2012

In this example, the Dequeue() call will remove the message. But what if the CorrelationId is not the correct one? This message was dequeued, so it's lost now?

@majek
majek Jul 24, 2012 Contributor

Please send an email to rabbitmq-discuss maiing list with this question.

- byte[] body = ea.Body;
- response = System.Text.Encoding.UTF8.GetString(body);
- break;
+ return System.Text.Encoding.UTF8.GetString(ea.Body);
}
}
- return response;
}
+
public void Close() {
connection.Close();
}

0 comments on commit fba096f

Please sign in to comment.