All Projects → jacqueskang → EventBus

jacqueskang / EventBus

Licence: MIT license
A .NET Core ultra lightweight in-memory event bus implementation.

Programming Languages

C#
18002 projects
HTML
75241 projects

Projects that are alternatives of or similar to EventBus

Run Aspnetcore Microservices
Microservices on .Net platforms which used Asp.Net Web API, Docker, RabbitMQ, MassTransit, Grpc, Ocelot API Gateway, MongoDB, Redis, PostgreSQL, SqlServer, Dapper, Entity Framework Core, CQRS and Clean Architecture implementation. Also includes Cross-Cutting concerns like Implementing Centralized Distributed Logging with Elasticsearch, Kibana and SeriLog, use the HealthChecks with Watchdog, Implement Retry and Circuit Breaker patterns with Polly and so on.. See Microservices Architecture and Step by Step Implementation on .NET Course w/ discount->
Stars: ✭ 406 (+456.16%)
Mutual labels:  eventbus, event-driven
Rabbus
A tiny wrapper over amqp exchanges and queues 🚌 ✨
Stars: ✭ 86 (+17.81%)
Mutual labels:  eventbus, event-driven
Mbassador
Powerful event-bus optimized for high throughput in multi-threaded applications. Features: Sync and Async event publication, weak/strong references, event filtering, annotation driven
Stars: ✭ 877 (+1101.37%)
Mutual labels:  eventbus, event-driven
Asombroso Ddd
Una lista cuidadosamente curada de recursos sobre Domain Driven Design, Eventos, Event Sourcing, Command Query Responsibility Segregation (CQRS).
Stars: ✭ 41 (-43.84%)
Mutual labels:  eventbus, event-driven
KDispatcher
Simple and light-weight event dispatcher for Kotlin
Stars: ✭ 64 (-12.33%)
Mutual labels:  eventbus, event-driven
Eventline
Micro-framework for routing and handling events for bots and applications 🤖. IFTTT for developers 👩‍💻👨‍💻
Stars: ✭ 305 (+317.81%)
Mutual labels:  eventbus, event-driven
Resugan
simple, powerful and unobstrusive event driven architecture framework for ruby
Stars: ✭ 82 (+12.33%)
Mutual labels:  eventbus, event-driven
reacted
Actor based reactive java framework for microservices in local and distributed environment
Stars: ✭ 17 (-76.71%)
Mutual labels:  eventbus, event-driven
azeroth-event
Lightweight event-driven framework
Stars: ✭ 18 (-75.34%)
Mutual labels:  eventbus, event-driven
Aws Serverless Event Fork Pipelines
AWS Event Fork Pipelines helps you build event-driven serverless applications by providing pipelines for common event-handling requirements, such as event backup, analytics, and replay. The pipelines are based on AWS SAM, and can be deployed directly from AWS SAR into your AWS account.
Stars: ✭ 126 (+72.6%)
Mutual labels:  sns, event-driven
terraform-aws-sns-topic
Terraform Module to Provide an Amazon Simple Notification Service (SNS)
Stars: ✭ 22 (-69.86%)
Mutual labels:  sns, aws-sns
evon
Fast and versatile event dispatcher code generator for Golang
Stars: ✭ 15 (-79.45%)
Mutual labels:  eventbus, event-driven
IntroduceToEclicpseVert.x
This repository contains the code of Vert.x examples contained in my articles published on platforms such as kodcu.com, medium, dzone. How to run each example is described in its readme file.
Stars: ✭ 27 (-63.01%)
Mutual labels:  eventbus, event-driven
ontopic
Display SNS messages on your terminal
Stars: ✭ 20 (-72.6%)
Mutual labels:  sns, aws-sns
mpeventbus
Android event bus for multiple processes. Send and receive events within or between Android processes.
Stars: ✭ 14 (-80.82%)
Mutual labels:  eventbus
Learning.EventStore
A framework for CQRS, Eventsourcing, and messaging that uses Redis pub/sub for messaging and offers event persistence in Redis, SQL Server, or PostgreSQL.
Stars: ✭ 58 (-20.55%)
Mutual labels:  event-driven
atpy
Event-driven Algorithmic Trading For Python
Stars: ✭ 23 (-68.49%)
Mutual labels:  event-driven
ency
Enhanced concurrency primitives for Javascript.
Stars: ✭ 32 (-56.16%)
Mutual labels:  event-driven
llb
Dead simple event-driven load-balancer
Stars: ✭ 27 (-63.01%)
Mutual labels:  event-driven
libio
libio is a cross platform high performance io library written in C. It provides ability to write event driven servers and applications with continuous code without callback hell
Stars: ✭ 16 (-78.08%)
Mutual labels:  event-driven

JKang.EventBus

.NET Core event bus implementation supporting:

  • In-memory event dispatching (publishing and subscription)
  • publishing event to Amazon SNS
  • publishing event to Amazon SQS

NuGet packages

Quick start:

  1. Create a console application with the following NuGet packages installed:
> Install-Package Microsoft.Extensions.DependencyInjection
> Install-Package JKang.EventBus
  1. Create an event class
    public class MyEvent
    {
        public string Message { get; set; }
    }
  1. Optionally implement one or multiple handlers subscribing to the event
    class MyEventHandler : IEventHandler<MyEvent>
    {
        public Task HandleEventAsync(MyEvent @event)
        {
            Console.WriteLine($"Received message '{@event.Message}'");
            return Task.CompletedTask;
        }
    }
  1. Configure and register event bus using Dependency Injection
    static void Main(string[] args)
    {
        IServiceCollection services = new ServiceCollection();

        services.AddEventBus(builder =>
        {
            builder.AddInMemoryEventBus(subscriber =>
            {
                subscriber.Subscribe<MyEvent, MyEventHandler>();
                //subscriber.SubscribeAllHandledEvents<MyEventHandler>(); // other way
            });
        });
    }
  1. Publish an event
    IServiceProvider serviceProvider = services.BuildServiceProvider();
    using (IServiceScope scope = serviceProvider.CreateScope())
    {
        IEventPublisher eventPublisher = scope.ServiceProvider.GetRequiredService<IEventPublisher>();
        eventPublisher.PublishEventAsync(new MyEvent { Message = "Hello, event bus!" }).Wait();
    }

Publish event to Amazon Simple Notification Service (SNS)

  1. Install NuGet package JKang.EventBus.AmazonSns

  2. Configure publishing events to AWS SNS

        services.AddEventBus(builder =>
        {
            builder
                //.AddInMemoryEventBus() // uncomment to keep using in-memory event bus in the same time
                .PublishToAmazonSns(x => x.Region = "eu-west-3");
        });
  1. Optionally It's possible to customize AWS SNS topic name using annotation
    [AmazonSnsTopic("my-event")]
    public class MyEvent { }

Publish event to Amazon Simple Queue Service (SQS)

  1. Install NuGet package JKang.EventBus.AmazonSqs

  2. Configure publishing events to AWS SQS

        services.AddEventBus(builder =>
        {
            builder
                //.AddInMemoryEventBus() // uncomment to keep using in-memory event bus in the same time
                .PublishToAmazonSqs(options =>
                    {
                        options.AccessKeyId = "";
                        options.SecretAccessKey = "";
                        options.DefaultQueueUrl = "";
                        options.Region = "us-east-1";
                    });
        });
  1. Optionally It's possible to customize AWS SQS queue url using annotation
    [AmazonSqsQueue("https://sqs.ap-southeast-2.amazonaws.com/189107071895/youtube-demo")]
    public class MyEvent { }

Any contributions or comments are welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].