Skip to content

Commit 189f098

Browse files
author
Alexandru Scvortov
committed
LogTail example compiles
1 parent 860694f commit 189f098

File tree

1 file changed

+7
-7
lines changed
  • projects/examples/client/LogTail/src/examples

1 file changed

+7
-7
lines changed

projects/examples/client/LogTail/src/examples/LogTail.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,16 @@ public static int Main(string[] args) {
8181
string routingKey = args[3];
8282

8383
ConnectionFactory cf = new ConnectionFactory();
84-
cf.Address = serverAddress;
85-
84+
cf.Address = serverAddress;
85+
8686
using (IConnection conn = cf.CreateConnection())
8787
{
8888
using (IModel ch = conn.CreateModel()) {
89-
Subscription sub;
90-
if (exchange == "") {
91-
sub = new Subscription(ch, routingKey);
92-
} else {
93-
sub = new Subscription(ch, exchange, exchangeType, routingKey);
89+
ch.QueueDeclare(routingKey);
90+
Subscription sub = new Subscription(ch, routingKey);
91+
if (exchange != "") {
92+
ch.ExchangeDeclare(exchange, exchangeType);
93+
ch.QueueBind(routingKey, exchange, routingKey, false, null);
9494
}
9595

9696
Console.WriteLine("Consumer tag: " + sub.ConsumerTag);

0 commit comments

Comments
 (0)