Example #1
0
        public StaticRoutingApp(AppSettings settings)
        {
            // Explicitly add a single message type
            Publish.Message <PingMessage>()
            .To(settings.Transactions);

            // Publish any message type contained in the assembly
            // to this channel, by supplying a type contained
            // within that assembly
            Publish.MessagesFromAssemblyContaining <PingMessage>()
            .To(settings.Transactions);

            // Publish any message type contained in the named
            // assembly to this channel
            Publish.MessagesFromAssembly(Assembly.Load(new AssemblyName("MyMessageLibrary")))
            .To(settings.Transactions);

            // Publish any message type contained in the
            // namespace given to this channel
            Publish.MessagesFromNamespace("MyMessageLibrary")
            .To(settings.Transactions);

            // Publish any message type contained in the namespace
            // of the type to this channel
            Publish.MessagesFromNamespaceContaining <PingMessage>()
            .To(settings.Transactions);
        }
        public DelayedMessageApp() : base()
        {
            Publish.MessagesFromAssemblyContaining <DelayedMessageApp>()
            .To("loopback://incoming");

            Transports.ListenForMessagesFrom("loopback://incoming");

            Logging.UseConsoleLogging = true;
        }
        public ScheduledMessageApp() : base()
        {
            Services.AddSingleton(Receiver);

            Publish.MessagesFromAssemblyContaining <ScheduledMessageApp>()
            .To("loopback://incoming");

            Transports.ListenForMessagesFrom("loopback://incoming");

            Handlers.DisableConventionalDiscovery();
            Handlers.IncludeType <ScheduledMessageCatcher>();
        }
        public ScheduledMessageApp()
        {
            Services.AddSingleton(Receiver);

            Publish.MessagesFromAssemblyContaining <ScheduledMessageApp>()
            .To("loopback://durable/incoming");

            Transports.ListenForMessagesFrom("loopback://durable/incoming");

            Handlers.Discovery(x =>
            {
                x.DisableConventionalDiscovery();
                x.IncludeType <ScheduledMessageCatcher>();
            });

            Settings.PersistMessagesWithSqlServer(Servers.SqlServerConnectionString);
        }
Example #5
0
        public ScheduledMessageApp()
        {
            Services.AddSingleton(Receiver);

            Publish.MessagesFromAssemblyContaining <ScheduledMessageApp>()
            .To("loopback://durable/incoming");

            Transports.ListenForMessagesFrom("loopback://durable/incoming");

            Handlers.Discovery(x =>
            {
                x.DisableConventionalDiscovery();
                x.IncludeType <ScheduledMessageCatcher>();
            });

            Settings.ConfigureMarten(marten =>
            {
                marten.Connection(Servers.PostgresConnectionString);
            });

            Include <MartenBackedPersistence>();
        }