예제 #1
0
        public void durably()
        {
            var router = new RabbitMqTopicRouter("numbers");

            var configuration = new TopicRouterConfiguration <RabbitMqSubscriberConfiguration>(router, new JasperOptions().Endpoints);

            configuration.DurablyStoreAndForward();

            router.Mode.ShouldBe(EndpointMode.Durable);
        }
        public void durably()
        {
            var router = new RabbitMqTopicRouter("numbers");

            var configuration = new TopicRouterConfiguration <RabbitMqSubscriberConfiguration>(router, new JasperOptions().Endpoints);

            configuration.Durably();

            router.IsDurable.ShouldBeTrue();
        }
예제 #3
0
        /// <summary>
        /// Publish matching messages to Rabbit MQ to the designated exchange by the topic name for the message
        /// type or the designated topic name in the Envelope. This is *only* usable
        /// for "topic" exchanges
        /// </summary>
        /// <param name="publishing"></param>
        /// <param name="exchangeName">The Rabbit MQ exchange name</param>
        /// <returns></returns>
        public static TopicRouterConfiguration <RabbitMqSubscriberConfiguration> ToRabbitTopics(this IPublishToExpression publishing, string exchangeName)
        {
            var transports = publishing.As <PublishingExpression>().Parent;

            var router = new RabbitMqTopicRouter(exchangeName);

            publishing.ViaRouter(router);

            return(new TopicRouterConfiguration <RabbitMqSubscriberConfiguration>(router, transports));
        }
예제 #4
0
        public void inline()
        {
            var router = new RabbitMqTopicRouter("numbers");

            router.Mode = EndpointMode.BufferedInMemory;

            var configuration = new TopicRouterConfiguration <RabbitMqSubscriberConfiguration>(router, new JasperOptions().Endpoints);

            configuration.SendInline();

            router.Mode.ShouldBe(EndpointMode.Inline);
        }
        public void lightweight()
        {
            var router = new RabbitMqTopicRouter("numbers");

            router.IsDurable = true;

            var configuration = new TopicRouterConfiguration <RabbitMqSubscriberConfiguration>(router, new JasperOptions().Endpoints);

            configuration.Lightweight();

            router.IsDurable.ShouldBeFalse();
        }