diff --git a/AmqpTest/Amqp/AmqpSubscribe.cs b/AmqpTest/Amqp/AmqpSubscribe.cs index f9ed129..424bf7c 100644 --- a/AmqpTest/Amqp/AmqpSubscribe.cs +++ b/AmqpTest/Amqp/AmqpSubscribe.cs @@ -115,8 +115,6 @@ namespace AmqpTest.Amqp int count = 0; var sw = new Stopwatch(); sw.Start(); - //var tasks = new List(); - //receiver.SetCredit(10000, false); //只是控制该线程不退出 while (true) @@ -133,22 +131,6 @@ namespace AmqpTest.Amqp count++; }); - - //var message = await receiver.ReceiveAsync(new TimeSpan(0, 0, 5)); - //if (message != null) - //{ - // var messageId = message.ApplicationProperties["messageId"].ToString(); - // var topic = message.ApplicationProperties["topic"].ToString(); - // var body = Encoding.UTF8.GetString((byte[])message.Body); - - // _logger.LogInformation($"message arrived, topic= {topic}, messageId= {messageId}, body= {body}"); - - // receiver.Accept(message); - - // count++; - //} - - if (sw.ElapsedMilliseconds > 60000) { _logger.LogWarning($"约1分钟处理 {count} 个请求"); diff --git a/AmqpTest/appsettings.test.json b/AmqpTest/appsettings.test.json index fec6269..bf788f4 100644 --- a/AmqpTest/appsettings.test.json +++ b/AmqpTest/appsettings.test.json @@ -4,7 +4,7 @@ "AccessKey": "LTAI4FdXhwy1evoHXingMaiZ", "AccessSecret": "CGmGpzta6ro8Bta4RLiQD18EF8m6Bm", "iotInstanceId": "iot-cn-nif1vosz501", - "ConsumerGroupId": "eQVdFouKAYajil208F7F000100", + "ConsumerGroupId": "0ZQFQv0QreC7WALTEWad000100", "RegionId": "cn-shanghai", "ProductKey": "a18mXM6Cvx8", "UId": "1111649216405698",