Skip to content

dcshock/forklift

Repository files navigation

Forklift

The Enterprise Service Bus that supports building and deploying microservices quickly and easily. Forklift makes your life easier by providing common functionality that can be shared by easily by annotating your code. To see what it can do for you check out the full documentation.

Releases

  • September 14 2020 - 3.8

    • Converted build system from sbt to gradle.

    • Upgraded to Java 11, now requires Java 11 Runtime to execute.

    • Upgraded all dependent libraries to current versions.

    • Upgraded to Junit 5.

    • Added a Datadog plug-in allowing the message life-cycle to be monitored.

    • Added the ability for injected beans to be resolved by name not just type.

  • June 13th 2019 - v3.7

    • Add support for password-based authentication to forklift server.

  • April 5th 2019 - v3.6

    • Add support for password-based authentication to the ActiveMQ connector.

  • May 30th 2018 - v3.5

    • Made ActiveMQ consumers acknowledge messages after they are processed so as to provide at-least-once processing and avoid dropping messages.

  • May 21st 2018 - v3.4

    • Fix simple documentation bug

  • May 7th 2018 - v3.3

    • Add methods for the kafka connector so that kafka clients can be configured externally

  • March 21st 2018 - v3.2

    • Fix issues with the kafka connector that caused out-of-order message procesing under load, and duplicate message processing during rebalances.

  • January 17th 2018 - v3.1

    • Upgrade kafka clients to use Kafka 0.11

    • Fix bug in the kafka connector that made it not provide heartbeats in certain situations

  • December 2nd 2017 - v3.0

    • Use REST instead of transport for replay, adding support for Elastic Search 5

  • Novemeber 28th 2017 - v2.3

    • Update build to automate releases to sonatype

    • Align release numbers of subcomponents to avoid having a version 1 of a plugin while a version 2 of the core is being used.

  • September 28th 2017 - v2.2

    • Eliminate unneeded queries to elasticsearch, improving preformance the performance replay processing

    • Fix bug in re-runing failed retries in the retry plugin

  • August 31st 2017 - v2.1

    • Removed limit on the size of the core thread pool for consumer polling threads

  • June 2nd 2017 - v2.0

    • Moved core source annotations from the "forklift.decorators" package to "forklift.source.decorators"

    • Added RoleInput and GroupedTopic sources

    • Made replay and retry usable for kafka by way of RoleInput (see the plugins documentation)

    • Added constructor injection

    • The Replay message consumer is now idempotent, enabling better scaling

    • Internally, made source processing more general

    • Reworked some of the internals of the Kafka Connector

    • Made a few bug fixes for the Kafka Connector

  • April 10th 2017 - v1.1

    • Kafka Connector

    • Core no longer depends on the JMS spec libraries

Current Release Dependencies

Gradle

dependencies {
    api 'com.github.dcshock:forklift:3.7'
}

SBT

libraryDependencies += "com.github.dcshock" % "forklift-server" % "3.7"

Maven

<dependency>
    <groupId>com.github.dcshock</groupId>
    <artifactId>forklift-server</artifactId>
    <version>3.7</version>
</dependency>

Dockerfile

FROM dcshock/forklift:1.1

# Add jar'd binks projects to the deployment directory
ADD my.jar $FORKLIFT_CONSUMER_HOME/my.jar

# See boot.sh file below
ADD boot.sh /opt/boot.sh
CMD ["/opt/boot.sh"]

Docker boot.sh

A boot script that will start forklift based on several environment variables.

#!/bin/sh
# startup forklift

forklift-server
 -consulHost $NODE_IP
 -url consul.activemq-broker
 -monitor1 /usr/local/forklift/consumers
 -monitor2 /config
 -retryESHost $FORKLIFT_ES_HOST
 -retryESPort $FORKLIFT_ES_PORT
 -replayESHost $FORKLIFT_ES_HOST
 -replayESPort $FORKLIFT_ES_PORT
 $FORKLIFT_RETRIES

Components

Forklift is separated into individual libraries that make up the framework. forklift-server will bring in all the necessary dependencies and plugins to use Forklift with ActiveMQ.

Forklift-Server

Forklift packaged as a set of server based components that can be executed at runtime.

Forklift-Activemq

A connector for ActiveMQ.

Forklift-Kafka

A connector for Kafka.

Forklift-Stats

A plugin for Forklift that collects stats for each message and places them in properties for storage by other plugins.

Forklift-Retry

A broker agnostic implementation of retries. Uses elastic search for storage.

Forklift-Replay

A broker agnostic implementation of message replay logging. Uses elastic search for storage. Kibana makes a great tool to view Forklift replay logs.

Forklift-Datadog

A plugin for monitoring the lifecycle events within Datadog metrics.

See the plugins documentation for more information on how to install and use plugins.