private void GenerateChannel(Message message, ref IModel channel, ref IChannelPool pool, out IBasicProperties props, out string exchage, out string routingKey)
        {
            _channelPools.TryGetValue(message.GetName() ?? "", out pool);
            channel            = pool.GetChannel();
            props              = channel.CreateBasicProperties();
            props.DeliveryMode = 2;
            exchage            = message.GetExchange() ?? throw new ArgumentNullException("the exchange is null.");
            routingKey         = message.GetRoutingKey() ?? "";
            if (message.IsInitQueue())
            {
                // 声明一个交换机
                string exchangeType = message.GetExchangeType() ?? throw new ArgumentNullException("the exchange type is null.");
                channel.ExchangeDeclare(exchage, exchangeType, true);
                // 声明一个队列 然后把队列和交换机绑定起来
                string queue = message.GetQueueName();
                channel.QueueDeclare(queue, true, false, false);
                channel.QueueBind(queue, exchage, routingKey);
            }
            message.Remove();

            TransferHeaderProperties(props, message.Headers);
        }