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"]); }); }
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"]); }); }
public SubscriberApp() { Hosting.UseUrls("http://localhost:5004"); Transports.Http.EnableListening(true); Subscribe.At("http://loadbalancer/messages"); Subscribe.ToAllMessages(); Transports.LightweightListenerAt(22222); }
public AppUsingHttpTransport() { // While *sending* by the HTTP transport is enabled by default, // you have to explicitly enable the HTTP transport listening Transports.Http.EnableListening(true) // The default is 10 seconds .ConnectionTimeout(2.Seconds()) // Override the releative Url of the message // listening routes. The default is _messages .RelativeUrl("_jasper"); // You'll have to have Kestrel or some other // web server for this to function Hosting .UseUrls("http://*:5000") .UseKestrel(); }
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"]); }); }
public SubscriberApp() { Hosting.UseUrls("http://localhost:5004"); Transports.LightweightListenerAt(22222); }