Reactive CQRS ES lib

Library to handle reactive CQRS commands and events

Лицензия

Лицензия

Категории

Категории

React Взаимодействие с пользователем Веб-фреймворки
Группа

Группа

io.github.yasiekz
Идентификатор

Идентификатор

reactive-cqrs-es-lib
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Reactive CQRS ES lib
Library to handle reactive CQRS commands and events
Ссылка на сайт

Ссылка на сайт

https://github.com/yasiekz/reactive-cqrs-es-lib
Система контроля версий

Система контроля версий

https://github.com/yasiekz/reactive-cqrs-es-lib

Скачать reactive-cqrs-es-lib

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.github.yasiekz/reactive-cqrs-es-lib/ -->
<dependency>
    <groupId>io.github.yasiekz</groupId>
    <artifactId>reactive-cqrs-es-lib</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.yasiekz/reactive-cqrs-es-lib/
implementation 'io.github.yasiekz:reactive-cqrs-es-lib:1.0.0'
// https://jarcasting.com/artifacts/io.github.yasiekz/reactive-cqrs-es-lib/
implementation ("io.github.yasiekz:reactive-cqrs-es-lib:1.0.0")
'io.github.yasiekz:reactive-cqrs-es-lib:jar:1.0.0'
<dependency org="io.github.yasiekz" name="reactive-cqrs-es-lib" rev="1.0.0">
  <artifact name="reactive-cqrs-es-lib" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.yasiekz', module='reactive-cqrs-es-lib', version='1.0.0')
)
libraryDependencies += "io.github.yasiekz" % "reactive-cqrs-es-lib" % "1.0.0"
[io.github.yasiekz/reactive-cqrs-es-lib "1.0.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.springframework : spring-context jar 5.1.7.RELEASE
io.projectreactor : reactor-core jar 3.2.9.RELEASE

test (3)

Идентификатор библиотеки Тип Версия
org.junit.jupiter : junit-jupiter jar 5.4.0
org.mockito : mockito-core jar 2.28.2
io.projectreactor : reactor-test jar 3.2.9.RELEASE

Модули Проекта

Данный проект не имеет модулей.

Build Status codecov

Reactive CQRS + ES lib

This is simple lib which adds reactive command handling classes to your springboot app

Key features:

  • dispatches command to reactive handlers

Scheduled functionality

  • Event bus
  • Command bus with handler that could return event
  • automatically apply event on bus

Usage

Import lib

With maven

<dependency>
  <groupId>io.github.yasiekz</groupId>
  <artifactId>reactive-cqrs-es-lib</artifactId>
  <version>1.0.0</version>
</dependency>

With gradle

repositories {
    mavenCentral()
}

dependencies {
    implementation 'io.github.yasiekz:reactive-cqrs-es-lib:1.0.0'
}
Register bean in @Configuration class
@Configuration
public class CqrsConfiguration {
    
    @Bean
    public CommandDispatcher createSimpleCommandBus(List<SimpleCommandHandler> handlers) {
        return new SimpleCommandBus(handlers);
    }
}
Create some commands
import io.github.yasiekz.reactive.cqrses.command.Command;

public class DummyCommand extends Command {
    // some data here with getters
}

Important Commands should be immutable!

Create handler for Command
package io.github.yasiekz.reactive.cqrses.command.SimpleCommandHandler;

import reactor.core.publisher.Mono;

public class DummyCommandHandler implements SimpleCommandHandler<DummyCommand> {

    @Override
    public Mono<Void> handle(final DummyCommand command) {
        // do something with command using reactive flow
    }
}

Local run

Requirements

  • Java 11 to build project
  • Spring boot 2.1.x

Run tests

./gradlew check

Версии библиотеки

Версия
1.0.0