hazelcast-heroku-discovery

Hazelcast Discovery Plugin for Heroku Private Spaces

Лицензия

Лицензия

MIT
Категории

Категории

Hazelcast Библиотеки уровня приложения Distributed Applications Heroku Контейнер PaaS Providers
Группа

Группа

com.github.jkutner
Идентификатор

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

hazelcast-heroku-discovery
Последняя версия

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

3.7.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

hazelcast-heroku-discovery
Hazelcast Discovery Plugin for Heroku Private Spaces
Ссылка на сайт

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

https://github.com/jkutner/hazelcast-heroku-discovery
Система контроля версий

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

https://github.com/jkutner/hazelcast-heroku-discovery

Скачать hazelcast-heroku-discovery

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

<!-- https://jarcasting.com/artifacts/com.github.jkutner/hazelcast-heroku-discovery/ -->
<dependency>
    <groupId>com.github.jkutner</groupId>
    <artifactId>hazelcast-heroku-discovery</artifactId>
    <version>3.7.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.jkutner/hazelcast-heroku-discovery/
implementation 'com.github.jkutner:hazelcast-heroku-discovery:3.7.2'
// https://jarcasting.com/artifacts/com.github.jkutner/hazelcast-heroku-discovery/
implementation ("com.github.jkutner:hazelcast-heroku-discovery:3.7.2")
'com.github.jkutner:hazelcast-heroku-discovery:jar:3.7.2'
<dependency org="com.github.jkutner" name="hazelcast-heroku-discovery" rev="3.7.2">
  <artifact name="hazelcast-heroku-discovery" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.jkutner', module='hazelcast-heroku-discovery', version='3.7.2')
)
libraryDependencies += "com.github.jkutner" % "hazelcast-heroku-discovery" % "3.7.2"
[com.github.jkutner/hazelcast-heroku-discovery "3.7.2"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.hazelcast : hazelcast jar 3.7

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.slf4j : slf4j-simple jar 1.7.21
com.github.stefanbirkner : system-rules jar 1.16.0

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

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

Hazelcast Heroku Discovery Build Status

This Hazelcast Discovery Plugin will lookup IP addresses of other members by resolving service names against the Heroku DNS Discovery in Heroku Private Spaces.

Usage

In Maven:

<dependency>
  <groupId>com.github.jkutner</groupId>
  <artifactId>hazelcast-heroku-discovery</artifactId>
  <version>3.7.0</version>
</dependency>

In Gradle:

dependencies {
    compile('com.github.jkutner:hazelcast-heroku-discovery:3.7.0')
}

A minimal hazelcast.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.7.xsd"
           xmlns="http://www.hazelcast.com/schema/config"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <properties>
    <property name="hazelcast.discovery.enabled">true</property>
  </properties>
  <network>
    <join>
      <!-- deactivate normal discovery -->
      <multicast enabled="false"/>
      <tcp-ip enabled="false" />

      <!-- activate the Heroku DNS Discovery -->
      <discovery-strategies>
        <discovery-strategy
          enabled="true"
          class="com.github.jkutner.hazelcast.HerokuDiscoveryStrategy">
        </discovery-strategy>
      </discovery-strategies>
    </join>
  </network>
</hazelcast>

Hazelcast Discovery SPI

Hazelcast, since 3.6, offers a, so called, Discovery SPI to integrate external discovery mechanisms into the system. For more information please rely on the official documentation, available here.

Configuration

No configuration is required by default. The plugin will detect the service name from the $HEROKU_DNS_FORMATION_NAME environment variable set by Heroku.

If you want to configure the hazelcast.merge.first.run.delay.seconds, set the following in your hazelcast.xml:

<discovery-strategy
  enabled="true"
  class="com.github.jkutner.hazelcast.HerokuDiscoveryStrategy">
    <properties>
      <property name="mergeDelay">30</property>
    </properties>
</discovery-strategy>

If you want to configure the service names (i.e. the process types) that will be discovered, you can set a ; delimited list like this:

<discovery-strategy
  enabled="true"
  class="com.github.jkutner.hazelcast.HerokuDiscoveryStrategy">
    <properties>
      <property name="serviceNames">web;worker;job</property>
    </properties>
</discovery-strategy>

License

MIT

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

Версия
3.7.2
3.7.1
3.7.0