Example #1
0
        //void m_TransDispatcher_SyncCompleted(object sender, SyncItemEventArgs<TransactionItem> e)
        //{
        //    //TODO:

        //    //e.Item.SyncExpired();
        //}


        public void LoadTopicConfig()
        {
            var config = QueueServerConfig.GetConfig();

            var items = config.RemoteQueueSettings;

            foreach (QueueServerConfigItem item in items)
            {
                //var prop = new QProperties(item.QueueName, item.IsTrans, (CoverMode)item.CoverMode);
                if (item.IsTopic)
                {
                    var publisher = new TopicPublisher()
                    {
                        TopicId   = item.QueueName,
                        TopicName = item.QueueName
                    };

                    string[] strsubs = item.TargetPath.SplitTrim('|');
                    foreach (var s in strsubs)
                    {
                        publisher.AddSubscriber(TopicSubscriber.Create(s, item.QueueName));
                    }

                    var mq = AddQueue(item);
                    QLogger.InfoFormat("Queue Topic Added: {0}", item.Print());
                }
            }
        }
Example #2
0
 public void AddSubscriber(TopicSubscriber ts)
 {
     Publisher.AddSubscriber(ts);
 }