Skip to content

cuteant/EventStore-DotNetty-Fork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EventStore .NETCore Fork

This is a fork from EventStore project: https://github.com/eventstore/eventstore

~ Features

EasyEventStore

A Nice .NET Client API for EventStore.

Goals:

  1. To make working with Event Store on .NET as easy as possible.
  2. To build an API that is close to interchangable with EasyNetQ.

To publish with EasyEventStore (assuming you've already created an IEventStoreBus instance):

  1. Create an instance of your message, it can be any serializable .NET type.
  2. Call the Publish method on IBus passing it your message instance.

Here's the code...

var message = new MyMessage { Text = "Hello EventStore" };
bus.PublishEventAsync(message);

To subscribe to a message we need to give EasyEventStore an action to perform whenever a message arrives. We do this by passing subscribe a delegate:

bus.VolatileSubscribe<MyMessage>((sub, e) => Console.WriteLine(e.Body.Text));
bus.CatchUpSubscribe<MyMessage>((sub, e) => Console.WriteLine(e.Body.Text));
bus.PersistentSubscribe<MyMessage>((sub, e) => Console.WriteLine(e.Body.Text));

Now every time that an instance of MyMessage is published, EasyEventStore will call our delegate and print the message's Text property to the console.

To send a message, use the Send method on IEventStoreBus, specifying the name of the stream you wish to send the message to and the message itself:

bus.SendEventAsync("my.stream", new MyMessage{ Text = "Hello Widgets!" });

To setup a message receiver for a particular message type, use the Receive method on IEventStoreBus:

bus.VolatileSubscribe("my.stream", (sub, e) => Console.WriteLine("MyMessage: {0}", ((MyMessage)e.Body).Text));

You can set up multiple receivers for different message types on the same queue by using the Receive overload that takes an Action<IHandlerRegistration>, for example:

bus.VolatileSubscribeAsync("my.stream", settings,
    addHandlers: _ =>_
    .Add<MyMessage>(message => deliveredMyMessage = message)
    .Add<MyOtherMessage>(message => deliveredMyOtherMessage = message);

~ ORIGINAL README ~

Event Store

The open-source, functional database with Complex Event Processing in JavaScript.

This is the repository for the open source version of Event Store, which includes the clustering implementation for high availability.

Support

Information on commercial support and options such as LDAP authentication can be found on the Event Store website at https://eventstore.org/support.

CI Status

Build Status

Documentation

Documentation for Event Store can be found here

Community

We have a fairly active google groups list. If you prefer slack, there is also an #eventstore channel here.

Release Packages

The latest release packages are hosted in the downloads section on the Event Store Website

We also host native packages for Linux on Package Cloud and Windows packages can be installed via Chocolatey (4.0.0 onwards only).

Building Event Store

Event Store is written in a mixture of C#, C++ and JavaScript. It can run either on Mono or .NET, however because it contains platform specific code (including hosting the V8 JavaScript engine), it must be built for the platform on which you intend to run it.

Linux

Prerequisites

Required Environment Variables

export FrameworkPathOverride=/usr/lib/mono/4.7.1-api

Windows

Prerequisites

Mac OS X

Prerequisites

Required Environment Variables

export FrameworkPathOverride=/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.7.1-api/

Build EventStore

Once you've installed the prerequisites for your system, you can launch a Release build of EventStore as follows:

dotnet build -c Release src/EventStore.sln

To start a single node, you can then run:

bin/Release/EventStore.ClusterNode/net471/EventStore.ClusterNode.exe --db ../db --log ../logs

You'll need to launch the node with mono on Linux or Mac OS X.

Note: The build system has changed after version 4.1.1-hotfix1, therefore the above instructions will not work for old releases.

Running the tests

You can launch the tests as follows:

EventStore Core tests

dotnet test src/EventStore.Core.Tests/EventStore.Core.Tests.csproj -- RunConfiguration.TargetPlatform=x64

EventStore Projections tests

dotnet test src/EventStore.Projections.Core.Tests/EventStore.Projections.Core.Tests.csproj -- RunConfiguration.TargetPlatform=x64

Building the EventStore Client / Embedded Client

You can build the client / embedded client with the steps below. This will generate a nuget package file (.nupkg) that you can include in your project.

Client

dotnet pack -c Release src/EventStore.ClientAPI/EventStore.ClientAPI.csproj /p:Version=5.0.0

Embedded Client

dotnet pack -c Release src/EventStore.ClientAPI.Embedded/EventStore.ClientAPI.Embedded.csproj /p:Version=5.0.0

Building the EventStore web UI

The web UI is prebuilt and the files are located under src/EventStore.ClusterNode.Web/clusternode-web. If you want to build the web UI, please consult this repository which is also a git submodule of the current repository located under src/EventStore.UI.

Building the Projections Library

The list of precompiled projections libraries can be found in src/libs/x64. If you still want to build the projections library please follow the links below.

Contributing

Development is done on the master branch. We attempt to do our best to ensure that the history remains clean and to do so, we generally ask contributors to squash their commits into a set or single logical commit.

If you want to switch to a particular release, you can check out the tag for this particular version. For example:
git checkout oss-v4.1.0