Beispiel #1
0
 public PublisherRouter(SenderQueue pConsumerQueue, ReaderQueue pReaderQueue, SenderQueue pPublisherQueue)
 {
     ConsumerQueue  = pConsumerQueue;
     PublisherQueue = pPublisherQueue;
     ReaderQueue    = pReaderQueue;
     Executor       = new Executor(this);
 }
Beispiel #2
0
        public RouterProvider(RabbitMQParams pParams)
        {
            RequestManager = new RequestManager();
            RouterCache    = new RouterCache(new SenderQueue(QueueType.Main, "Mitto.Main", true), RequestManager);

            PublisherQueue     = new ReaderQueue(QueueType.Publisher, ID, false);
            PublisherQueue.Rx += PublisherQueue_Rx;
        }
Beispiel #3
0
        /// <summary>
        /// Constructor for the RabbitMQ Consumer Queue
        ///
        /// Listens on MittoMain
        ///
        /// ToDo: Make the sender Queue optional when creating a queue
        /// </summary>
        public Consumer(RabbitMQParams pParams)
        {
            RequestManager = new RequestManager();

            QueueProvider = new QueueProvider(pParams);

            MainQueue     = QueueProvider.GetReaderQueue(QueueType.Main, "Mitto.Main", true);
            MainQueue.Rx += MainQueue_Rx;

            ConsumerQueue     = QueueProvider.GetReaderQueue(QueueType.Consumer, ID, false);
            ConsumerQueue.Rx += ConsumerQueue_Rx;
        }
        public void Start()
        {
            QueueCache = new QueueProvider(new RabbitMQParams()
            {
                Hostname = "test.crazyzone.be"
            });
            ReaderQueue     = QueueCache.GetReaderQueue(QueueType.SubscriptionMain, ID, false);
            ReaderQueue.Rx += ObjMainReader_Rx;

            //ServiceQueue = QueueCache.GetReaderQueue(QueueType.SubscriptionMain, $"Mitto.Subscription.Main.{ID}", true);

            //var objSubscriptionConsumer = new ReaderQueue(QueueType.Subscription, "Mitto.Subscription." + Guid.NewGuid().ToString(), false);
            //var objMainWriter = new SenderQueue(QueueType.Subscription, "Mitto.Subscription.Main", true);
        }