Ejemplo n.º 1
0
        public IMessageConsumer GetCosumer(string conectionString, string topicPath, string sqlFilter, TimeSpan timeToExpire, string subscriptionName, ISerializer serializer)
        {
            var namespaceManager = NamespaceManager.CreateFromConnectionString(conectionString);
            var description      = GetSubscriptionDescription(topicPath, subscriptionName, timeToExpire);

            var client = GetSubscriptionClient(topicPath, subscriptionName, namespaceManager, description);
            var result = new MessageConsumer(client, serializer);

            return(result);
        }
Ejemplo n.º 2
0
        public IMessageConsumer GetConsumer(ConsumerConfiguration consumerConfiguration)
        {
            var namespaceManager = NamespaceManager.CreateFromConnectionString(consumerConfiguration.ConectionString);
            var description      = GetSubscriptionDescription(consumerConfiguration.TopicPath, consumerConfiguration.SubscriptionName, consumerConfiguration.TimeToExpire);

            var client = GetSubscriptionClient(consumerConfiguration.TopicPath, consumerConfiguration.SubscriptionName, namespaceManager, description, consumerConfiguration.SqlFilter);
            var result = new MessageConsumer(client);

            return(result);
        }