public PoolClientManager(string host, string queueName, bool isTransactional)
 {
     ItemConfig conf = new ItemConfig() { 
         host = host,
         queueName = queueName,
         isTransactional = isTransactional
     };
     Start(conf);
 }
Beispiel #2
0
        /// <summary>
        /// 开始执行
        /// </summary>
        private void Start(ItemConfig conf)
        {
            try
            {
                mq             = new CN100MessageQueue(string.Format(@"FormatName:DIRECT=TCP:{0}\private$\{1}", conf.host, conf.queueName));
                mq.Formatter   = MessageFormatter;
                mq.QueueConfig = conf;

                m_Host            = conf.host;
                m_QueueName       = conf.queueName;
                m_IsTransactional = conf.isTransactional;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        /// <summary>
        /// 开始执行
        /// </summary>
        private void Start(ItemConfig conf)
        {
            try
            {
                mq = new CN100MessageQueue(string.Format(@"FormatName:DIRECT=TCP:{0}\private$\{1}", conf.host, conf.queueName));
                mq.Formatter = MessageFormatter;
                mq.QueueConfig = conf;

                m_Host = conf.host;
                m_QueueName = conf.queueName;
                m_IsTransactional = conf.isTransactional;

            }
            catch(Exception ex)
            {
                throw ex;
            }
        }