Exemple #1
0
        EQueueConsumer CreateQueueConsumer(string commandQueueName, string consumerId, int fullLoadThreshold, int waitInterval)
        {
            var consumer = new EQueueConsumer(BrokerAddress, ConsumerPort, AdminPort, commandQueueName, commandQueueName, consumerId, fullLoadThreshold, waitInterval);

            consumer.Start();
            return(consumer);
        }
Exemple #2
0
        EQueueConsumer CreateSubscriptionClient(string topic, string subscriptionName, string consumerId = null, int fullLoadThreshold = 1000, int waitInterval = 1000)
        {
            var consumer = new EQueueConsumer(BrokerAddress, ConsumerPort, AdminPort, topic, subscriptionName, consumerId, fullLoadThreshold, waitInterval);

            consumer.Start();
            return(consumer);
        }
        public IMessageConsumer CreateQueueConsumer(string commandQueueName,
                                                    OnMessagesReceived onMessagesReceived,
                                                    string consumerId,
                                                    ConsumerConfig consumerConfig,
                                                    bool start = true)
        {
            var consumer = new EQueueConsumer(_clusterName,
                                              _nameServerList,
                                              new[] { commandQueueName },
                                              commandQueueName,
                                              consumerId,
                                              BuildOnEQueueMessageReceived(onMessagesReceived),
                                              consumerConfig);

            if (start)
            {
                consumer.Start();
            }

            return(consumer);
        }
        public IMessageConsumer CreateTopicSubscription(string[] topics,
                                                        string subscriptionName,
                                                        OnMessagesReceived onMessagesReceived,
                                                        string consumerId,
                                                        ConsumerConfig consumerConfig,
                                                        bool start = true)
        {
            var consumer = new EQueueConsumer(_clusterName,
                                              _nameServerList,
                                              topics,
                                              subscriptionName,
                                              consumerId,
                                              BuildOnEQueueMessageReceived(onMessagesReceived),
                                              consumerConfig);

            if (start)
            {
                consumer.Start();
            }

            return(consumer);
        }