コード例 #1
0
ファイル: QueueListener.cs プロジェクト: robson-gilli/QPT
        public void StartListen(int maximumConcurrency)
        {
            _activeMQListener = new ActiveMQListener(
                        System.Configuration.ConfigurationManager.AppSettings["ActiveMQURL"],
                        System.Configuration.ConfigurationManager.AppSettings["ActiveMQRQ"]);

            _activeMQListener.OnMessageArrived += OnMessageArrived;
            _activeMQListener.StartListen("", maximumConcurrency);
        }
コード例 #2
0
ファイル: frmListenActiveMQ.cs プロジェクト: robson-gilli/QPT
        private async void btnListen_Click(object sender, EventArgs e)
        {
            _activeMQListener = new ActiveMQListener(System.Configuration.ConfigurationManager.AppSettings["ActiveMQURL"], System.Configuration.ConfigurationManager.AppSettings["ActiveMQName"]);

            _activeMQListener.OnMessageArrived += OnMessageArrived;
            _activeMQListener.StartListen("", 10);

            //timer = new System.Timers.Timer(1000);
            //timer.Elapsed += new System.Timers.ElapsedEventHandler(OnTimedEvent);
            //timer.Enabled = true;
        }
コード例 #3
0
 public static void StartListen()
 {
     if (!_isListening)
     {
         lock (_mutex)
         {
             if (!_isListening)
             {
                 _isListening = true;
                 _activeMQListener = new ActiveMQListener(System.Configuration.ConfigurationManager.AppSettings["ActiveMQURL"], System.Configuration.ConfigurationManager.AppSettings["ActiveMQName"],100);
                 _activeMQListener.OnMessageArrived += OnMessageArrived;
                 _activeMQListener.StartListen("");
             }
         }
     }
 }
コード例 #4
0
 public static void StopListen()
 {
     if (_isListening)
     {
         lock (_mutex)
         {
             if (_isListening)
             {
                 _msgCount = 0;
                 _isListening = false;
                 _activeMQListener.Close();
                 _activeMQListener.OnMessageArrived -= OnMessageArrived;
                 _activeMQListener = null;
             }
         }
     }
 }
コード例 #5
0
ファイル: QueueListener.cs プロジェクト: robson-gilli/QPT
 public QueueListener()
 {
     _activeMQListener = new ActiveMQListener(System.Configuration.ConfigurationManager.AppSettings["ActiveMQURL"], System.Configuration.ConfigurationManager.AppSettings["ActiveMQName"],100);
 }