All Projects → camunda-community-hub → zeebe-hazelcast-exporter

camunda-community-hub / zeebe-hazelcast-exporter

Licence: Apache-2.0 License
Export events from Zeebe to Hazelcast

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to zeebe-hazelcast-exporter

zeebe-kafka-exporter
Export events from Zeebe to Kafka
Stars: ✭ 21 (+5%)
Mutual labels:  zeebe, zeebe-exporter
hazelcast-scala
Scala language support for Hazelcast
Stars: ✭ 26 (+30%)
Mutual labels:  hazelcast
hface
look your Hazelcast cluster in the face!
Stars: ✭ 73 (+265%)
Mutual labels:  hazelcast
hazelcast-kubernetes
Hazelcast clustering for Kubernetes made easy.
Stars: ✭ 50 (+150%)
Mutual labels:  hazelcast
zeebe-simple-monitor
A monitoring application to show insides of Zeebe for developers
Stars: ✭ 110 (+450%)
Mutual labels:  zeebe
spring-zeebe
Easily use the Zeebe Java Client in your Spring or Spring Boot projects
Stars: ✭ 103 (+415%)
Mutual labels:  zeebe
awesome-camunda-cloud
Awesome Camunda Cloud Projects
Stars: ✭ 81 (+305%)
Mutual labels:  zeebe
zeebe-helm
Public Zeebe K8s HELM Charts
Stars: ✭ 13 (-35%)
Mutual labels:  zeebe
hazelcast-consul-discovery-spi
Consul based discovery strategy SPI for Hazelcast enabled applications
Stars: ✭ 47 (+135%)
Mutual labels:  hazelcast
zeebe-client-node-js
Node.js client library for Zeebe Microservices Orchestration Engine
Stars: ✭ 109 (+445%)
Mutual labels:  zeebe
quartz-scheduler-hazelcast-jobstore
An implementation of a Quartz Scheduler JobStore using Hazelcast distributed Collections
Stars: ✭ 42 (+110%)
Mutual labels:  hazelcast
moqui-hazelcast
Moqui Framework tool component for Hazelcast, used for distributed async services, entity distributed cache invalidation, web session replication, and distributed cache (javax.cache)
Stars: ✭ 12 (-40%)
Mutual labels:  hazelcast
nestjs-zeebe
Zeebe transport and client for nestjs framework
Stars: ✭ 40 (+100%)
Mutual labels:  zeebe
j2cache
java实现的缓存策略组件,支持多种缓存产品,开发人员可以像Map一样使用,简单方便。支持的存储方案:jvm\redis\ignite\hazelcast\guava
Stars: ✭ 33 (+65%)
Mutual labels:  hazelcast
delta
DDD-centric event-sourcing library for the JVM
Stars: ✭ 15 (-25%)
Mutual labels:  hazelcast
hazelcast-csharp-client
Hazelcast .NET Client
Stars: ✭ 98 (+390%)
Mutual labels:  hazelcast
eze
Embedded Zeebe Engine
Stars: ✭ 13 (-35%)
Mutual labels:  zeebe
workit
Extensible worker for Node.js that works with both Zeebe and Camunda BPM platforms powered by TypeScript
Stars: ✭ 51 (+155%)
Mutual labels:  zeebe
zeeqs
Query API for aggregated Zeebe data
Stars: ✭ 37 (+85%)
Mutual labels:  zeebe
zeebe-script-worker
Zeebe worker for script evaluation
Stars: ✭ 17 (-15%)
Mutual labels:  zeebe

zeebe-hazelcast-exporter

License Build Status

Export records from Zeebe to Hazelcast. Hazelcast is an in-memory data grid which is used as a transport layer.

How it works

The records are transformed into Protobuf and added to one ringbuffer. The ringbuffer has a fixed capacity and will override the oldest entries when the capacity is reached.

Multiple applications can read from the ringbuffer. The application itself controls where to read from by proving a sequence number. Every application can read from a different sequence.

The Java module provide a convenient way to read the records from the ringbuffer.

Usage

Java Application

Add the Maven dependency to your pom.xml

<dependency>
	<groupId>io.zeebe.hazelcast</groupId>
	<artifactId>zeebe-hazelcast-connector</artifactId>
	<version>1.0.1</version>
</dependency>

Connect to Hazelcast and register a listener

ClientConfig clientConfig = new ClientConfig();
clientConfig.getNetworkConfig().addAddress("127.0.0.1:5701");
HazelcastInstance hz = HazelcastClient.newHazelcastClient(clientConfig);

final ZeebeHazelcast zeebeHazelcast = ZeebeHazelcast.newBuilder(hz)
    .addProcessInstanceListener(processInstance -> { ... })
    .readFrom(sequence) / .readFromHead() / .readFromTail()
    .build();

// ...

zeebeHazelcast.close();

Install

Docker

A docker image is published to GitHub Packages that is based on the Zeebe image and includes the Hazelcast exporter (the exporter is enabled by default).

docker pull ghcr.io/camunda-community-hub/zeebe-with-hazelcast-exporter:1.1.2-1.0.1

For a local setup, the repository contains a docker-compose file. It starts a Zeebe broker with the Hazelcast exporter. The version of the exporter is defined in the .env file.

mvn clean install -DskipTests
cd docker
docker-compose up

Manual

  1. Download the latest Zeebe distribution (zeebe-distribution-%{VERSION}.tar.gz )

  2. Download the latest exporter JAR (zeebe-hazelcast-exporter-1.0.1-jar-with-dependencies.jar)

  3. Copy the exporter JAR into the broker folder ~/zeebe-broker-%{VERSION}/exporters.

    cp exporter/target/zeebe-hazelcast-exporter-1.0.1-jar-with-dependencies.jar ~/zeebe-broker-%{VERSION}/exporters/
    
  4. Add the exporter to the broker configuration ~/zeebe-broker-%{VERSION}/config/application.yaml:

    zeebe:
      broker:  
        exporters:
          hazelcast:
            className: io.zeebe.hazelcast.exporter.HazelcastExporter
            jarPath: exporters/zeebe-hazelcast-exporter-1.0.1-jar-with-dependencies.jar
    
  5. Start the broker ~/zeebe-broker-%{VERSION}/bin/broker

Configuration

In the Zeebe configuration file, you can change

  • the Hazelcast port
  • the Hazelcast cluster name
  • the value and record types which are exported
  • the ringbuffer's name
  • the ringbuffer's capacity
  • the ringbuffer's time-to-live
  • the record serialization format

Default values:

zeebe:
  broker:
    exporters:
      hazelcast:
        className: io.zeebe.hazelcast.exporter.HazelcastExporter
        jarPath: exporters/zeebe-hazelcast-exporter.jar
	args:
	      # Hazelcast port
    	  port = 5701
    	  
    	  # Hazelcast cluster name
    	  clusterName = "dev"
    
          # comma separated list of io.zeebe.protocol.record.ValueType to export or empty to export all types 
          enabledValueTypes = ""
    
          # comma separated list of io.zeebe.protocol.record.RecordType to export or empty to export all types
          enabledRecordTypes = ""
        
          # Hazelcast ringbuffer's name
          name = "zeebe"
    
          # Hazelcast ringbuffer's capacity
          capacity = 10000 

          # Hazelcast ringbuffer's time-to-live in seconds. Don't remove the records until reaching the capacity by setting it to 0.  
          timeToLiveInSeconds = 0

          # record serialization format: [protobuf|json]
          format = "protobuf"

The values can be overridden by environment variables with the same name and a ZEEBE_HAZELCAST_ prefix (e.g. ZEEBE_HAZELCAST_PORT).

Connect to an External/Remote Hazelcast Cluster

By default, the exporter creates an in-memory Hazelcast instance and publishes the records to it. But it can also be configured to export the records to a remote/external Hazecast instance by setting the argument remoteAddress or the environment variable ZEEBE_HAZELCAST_REMOTE_ADDRESS to the address of the remote Hazelcast instance.

  • the remote Hazelcast address
  • the remote Hazelcast cluster name
  • the connection timeout

Default values:

zeebe:
  broker:
    exporters:
      hazelcast:
        className: io.zeebe.hazelcast.exporter.HazelcastExporter
        jarPath: exporters/zeebe-hazelcast-exporter.jar
	args:
	      # remote Hazelcast address
    	  remoteAddress = 127.0.0.1:5702
    	  
    	  # Hazelcast cluster name
    	  clusterName = "dev"
    	  
    	  # connection timeout
    	  remoteConnectionTimeout = "PT30S"
Full docker-compose.yml with external Hazelcast

version: "2"

networks:
  zeebe_network:
    driver: bridge

services:
  zeebe:
    container_name: zeebe_broker
    image: camunda/zeebe:1.1.2
    environment:
      - ZEEBE_LOG_LEVEL=debug
      - ZEEBE_HAZELCAST_REMOTE_ADDRESS=hazelcast:5701
    ports:
      - "26500:26500"
      - "9600:9600"
    volumes:
      - ../exporter/target/zeebe-hazelcast-exporter-1.0.1-jar-with-dependencies.jar:/usr/local/zeebe/exporters/zeebe-hazelcast-exporter.jar
      - ./application.yaml:/usr/local/zeebe/config/application.yaml
    networks:
      - zeebe_network
    depends_on:
      - hazelcast

  hazelcast:
    container_name: hazelcast
    image: hazelcast/hazelcast:4.2
    ports:
      - "5701:5701"
    environment:
      - JAVA_OPTS="-Dhazelcast.local.publicAddress=hazelcast:5701"
    networks:
      - zeebe_network
      
  hazelcast-management:
    container_name: hazelcast-management
    image: hazelcast/management-center:4.2
    ports:
      - "8083:8080"
    networks:
      - zeebe_network
    depends_on:
      - hazelcast    

Build it from Source

The exporter and the Java connector can be built with Maven

mvn clean install

Code of Conduct

This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

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].