private static void SendMsg() { RabbitmqConfigOptions rabbitmqOption = new RabbitmqConfigOptions(); var queueName = "queue_test_workqueues"; //var queueName = "test_delayqueues"; RabbitMQProducer producer = new RabbitMQProducer(rabbitmqOption); producer.Open(); for (int i = 0; i < 500; i++) { //producer.SendWorkQueues("这是工作队列消息" + i.ToString(), queueName); var isPublished = producer.SendWorkQueuesWithConfirmSelect("这是工作队列消息" + i.ToString(), queueName); Console.WriteLine($"发送{(isPublished?"成功":"失败")}"); } producer.Close(); }