public static void AddPubSub(this ISiloBuilder siloBuilder)
        {
            siloBuilder.AddPlacementDirector <LocalPlacementStrategy, LocalPlacementDirector>();

            siloBuilder.ConfigureServices(services =>
            {
                services.AddSingleton <OrleansPubSub>();
                services.AddSingleton <IPubSub>(c => c.GetRequiredService <OrleansPubSub>());
            });

            siloBuilder.AddStartupTask <OrleansPubSub>();
        }
Example #2
0
        public static void AddPubSub(this ISiloBuilder siloBuilder)
        {
            siloBuilder.AddPlacementDirector <LocalPlacementStrategy, LocalPlacementDirector>();

            siloBuilder.ConfigureServices(services =>
            {
                services.AddSingleton <OrleansStreamingPubSub>();
                services.AddSingleton <IPubSub>(c => c.GetRequiredService <OrleansStreamingPubSub>());
            });

            siloBuilder.AddSimpleMessageStreamProvider(Constants.StreamProviderName);
            siloBuilder.AddMemoryGrainStorage("PubSubStore");

            siloBuilder.AddStartupTask <OrleansStreamingPubSub>();
        }