Exemplo n.º 1
0
        public static void Main()
        {
            var configuration = new CatalystConfiguration(
                new Uri(DEFAULT_ENGINE_URI),
                new IEventConsumerFactory[]
                    {
                        new RabbitMqEventConsumerFactory("localhost"),
                        new MsmqEventConsumerFactory()
                    },
                new IDataPublisherFactory[]
                    {
                        new RabbitMqDataPublisherFactory(),
                        new MsmqDataPublisherFactory()
                    });

            // create a catalyst adapter
            var adapter = new Catalyst(configuration);
            // attach to the default instance - i.e the default database
            var instance = adapter.GetDefaultInstance();
            // create an injector ... the purpose of the injector is to ensure that
            // events exist and are flowing through the system.
            var injector = new InjectSynthetic(instance);
            injector.Start();
            injector.WaitOne();
            // create a consumer ... the purpose of the consumer is to demonstrate
            // how to setup statements and consume event flow from the engine.
            var consumer = new Consumer(instance, "SyntheticEvent");
            consumer.Start();
        }
Exemplo n.º 2
0
        public static void Main()
        {
            var configuration = new CatalystConfiguration(
                new Uri(DEFAULT_ENGINE_URI),
                new IEventConsumerFactory[]
            {
                new RabbitMqEventConsumerFactory("localhost"),
                new MsmqEventConsumerFactory()
            },
                new IDataPublisherFactory[]
            {
                new RabbitMqDataPublisherFactory(),
                new MsmqDataPublisherFactory()
            });


            // create a catalyst adapter
            var adapter = new Catalyst(configuration);
            // attach to the default instance - i.e the default database
            var instance = adapter.GetDefaultInstance();
            // create an injector ... the purpose of the injector is to ensure that
            // events exist and are flowing through the system.
            var injector = new InjectSynthetic(instance);

            injector.Start();
            injector.WaitOne();
            // create a consumer ... the purpose of the consumer is to demonstrate
            // how to setup statements and consume event flow from the engine.
            var consumer = new Consumer(instance, "SyntheticEvent");

            consumer.Start();
        }