예제 #1
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;
        }
예제 #2
0
        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);
        }