hermes-spring-cloud-starter-stream

Spring Cloud Stream Hermes Binder

Лицензия

Лицензия

Категории

Категории

Hermes Библиотеки уровня приложения Messaging
Группа

Группа

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

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

hermes-spring-cloud-starter-stream
Последняя версия

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

0.2.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

hermes-spring-cloud-starter-stream
Spring Cloud Stream Hermes Binder
Ссылка на сайт

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

https://github.com/jmnarloch/hermes-spring-cloud-starter-stream
Система контроля версий

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

https://github.com/jmnarloch/hermes-spring-cloud-starter-stream.git

Скачать hermes-spring-cloud-starter-stream

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

<!-- https://jarcasting.com/artifacts/io.jmnarloch/hermes-spring-cloud-starter-stream/ -->
<dependency>
    <groupId>io.jmnarloch</groupId>
    <artifactId>hermes-spring-cloud-starter-stream</artifactId>
    <version>0.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.jmnarloch/hermes-spring-cloud-starter-stream/
implementation 'io.jmnarloch:hermes-spring-cloud-starter-stream:0.2.0'
// https://jarcasting.com/artifacts/io.jmnarloch/hermes-spring-cloud-starter-stream/
implementation ("io.jmnarloch:hermes-spring-cloud-starter-stream:0.2.0")
'io.jmnarloch:hermes-spring-cloud-starter-stream:jar:0.2.0'
<dependency org="io.jmnarloch" name="hermes-spring-cloud-starter-stream" rev="0.2.0">
  <artifact name="hermes-spring-cloud-starter-stream" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.jmnarloch', module='hermes-spring-cloud-starter-stream', version='0.2.0')
)
libraryDependencies += "io.jmnarloch" % "hermes-spring-cloud-starter-stream" % "0.2.0"
[io.jmnarloch/hermes-spring-cloud-starter-stream "0.2.0"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.springframework.cloud : spring-cloud-stream jar 1.0.2.RELEASE
pl.allegro.tech.hermes : hermes-client jar 0.8.8
org.springframework.boot : spring-boot-configuration-processor Необязательный jar 1.3.5.RELEASE

test (7)

Идентификатор библиотеки Тип Версия
org.mockito : mockito-all jar 1.10.19
org.springframework.boot : spring-boot-starter-web jar 1.2.5.RELEASE
junit : junit jar 4.12
com.github.tomakehurst : wiremock jar 1.58
org.springframework.boot : spring-boot-starter-test jar 1.2.5.RELEASE
org.springframework.cloud : spring-cloud-stream-binder-test jar 1.0.2.RELEASE
org.awaitility : awaitility jar 2.0.0

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

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

Spring Cloud Stream Hermes binder

A Sprning Cloud Stream binder for Allegro Hermes

Build Status Coverage Status

Setup

Add the Spring Cloud starter to your project:

<dependency>
  <groupId>io.jmnarloch</groupId>
  <artifactId>hermes-spring-cloud-starter-stream</artifactId>
  <version>0.2.0</version>
</dependency>

Features

This project adds a binder for Allegro Hermes to Spring Cloud Stream.

By the way the Hermes has been designed there is no simple way to create a consumer so at this point only binding a producer MessageChannel is being supported.

Creating the binding

Creating the bindings for the Spring Cloud Stream is straightforward process and has been described in Spring Cloud Stream reference guide

You can always bind to the generic Source.class using @EnableBinding and afterwards specify the final destination through the properties:

spring:
  cloud:
    stream:
      bindings:
        output:
          destination: 'io.jmnarloch.events.purchases'

This way you specify the fully qualified name of the Hermes topic.

Alternative approach is to design the your own binding, example:

interface Events {

        @Output
        MessageChannel purchases();
}

In this case the topic name will be establish based on the method name, if you want to use specific topic name you can do this by specific the value of the @Output annotation. Alternatively you can use the binding properties as showed above.

Binder properties

spring.cloud.stream.hermes.binder.uri - specifies the Hermes producer URI

License

Apache 2.0

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

Версия
0.2.0
0.1.0