Example #1
0
        public ReceiverApp()
        {
            Configuration
            .AddJsonFile("appsettings.json")
            .AddEnvironmentVariables();

            Hosting.UseUrls("http://*:5061").UseKestrel();

            Hosting.ConfigureLogging(x =>
            {
                //x.AddConsole();
                x.SetMinimumLevel(LogLevel.Information);
            });

            Settings.ConfigureMarten((config, options) =>
            {
                options.PLV8Enabled             = false;
                options.AutoCreateSchemaObjects = AutoCreate.None;
                options.Connection(config.Configuration["marten"]);
                options.DatabaseSchemaName = "receiver";
                options.Schema.For <SentTrack>();
                options.Schema.For <ReceivedTrack>();
            });

            Include <MartenBackedPersistence>();



            Settings.Configure(c =>
            {
                Transports.ListenForMessagesFrom(c.Configuration["listener"]);
            });
        }
Example #2
0
        public SenderApp()
        {
            Configuration.AddJsonFile("appsettings.json").AddEnvironmentVariables();

            Hosting.UseUrls("http://*:5060").UseKestrel();

            Hosting.ConfigureLogging(x =>
            {
                x.SetMinimumLevel(LogLevel.Error);
                x.AddConsole();
            });

            Settings.Alter <MessagingSettings>(x => x.NodeReassignmentPollingTime = 5.Seconds());

            Settings.PersistMessagesWithSqlServer((context, settings) =>
            {
                settings.ConnectionString = context.Configuration["mssql"];
                settings.SchemaName       = "sender";
            });


            Settings.Configure(c =>
            {
                Transports.ListenForMessagesFrom(c.Configuration["listener"]);
                Publish.AllMessagesTo(c.Configuration["receiver"]);
            });
        }
Example #3
0
        public RabbitReceiver()
        {
            Handlers.DisableConventionalDiscovery().IncludeType <RabbitedMessageReceiver>();

            Hosting.ConfigureLogging(x =>
            {
                x.AddConsole();
                x.AddDebug();
            });

            Transports.ListenForMessagesFrom("rabbitmq://localhost:5672/numbers");

            Settings.PersistMessagesWithSqlServer(Servers.SqlServerConnectionString, "rabbit_receiver");
        }
Example #4
0
        public RabbitSender()
        {
            Handlers.DisableConventionalDiscovery();

            Hosting.ConfigureLogging(x =>
            {
                x.AddConsole();
                x.AddDebug();
            });

            Publish.AllMessagesTo("rabbitmq://localhost:5672/numbers");

            Settings.PersistMessagesWithSqlServer(Servers.SqlServerConnectionString, "rabbit_sender");

            Services.AddSingleton <IHostedService, TimedSender>();
        }
Example #5
0
        public RabbitMqUsingApp()
        {
            Hosting.ConfigureLogging(x =>
            {
                x.AddConsole();
                x.AddDebug();
            });

            Transports.ListenForMessagesFrom("rabbitmq://localhost:5672/messages3");

            Services.AddSingleton <ColorHistory>();
            Services.AddSingleton <MessageTracker>();

            Publish.AllMessagesTo("rabbitmq://localhost:5672/messages3");

            Include <MessageTrackingExtension>();
        }
Example #6
0
        public ReceiverApp()
        {
            Configuration.AddJsonFile("appsettings.json").AddEnvironmentVariables();

            Hosting.UseUrls("http://*:5061").UseKestrel();

            Hosting.ConfigureLogging(x =>
            {
                x.SetMinimumLevel(LogLevel.Information);
                x.AddConsole();
            });

            Settings.PersistMessagesWithSqlServer((context, settings) =>
            {
                settings.SchemaName       = "receiver";
                settings.ConnectionString = context.Configuration["mssql"];
            });


            Settings.Configure(c =>
            {
                Transports.ListenForMessagesFrom(c.Configuration["listener"]);
            });
        }