Skip to content

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
zambrovski committed Nov 24, 2022
2 parents a395e53 + 00aba77 commit 1c06239
Show file tree
Hide file tree
Showing 121 changed files with 894 additions and 212 deletions.
10 changes: 10 additions & 0 deletions .codacy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
engines:
duplications:
exclude_paths:
- "**/src/test/kotlin/**"

exclude_paths:
- "README.md"
- ".github/**"
- "docs/**"
18 changes: 12 additions & 6 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

# Setup JDK and Maven
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
Expand All @@ -39,8 +39,14 @@ jobs:
- name: Run itest
run: ./mvnw integration-test failsafe:verify -Pitest -U -B -T4

# - name: Upload coverage to Codecov
# if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
# uses: codecov/[email protected]
# with:
# token: ${{secrets.CODECOV_TOKEN}}
- name: Upload coverage to Codecov
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
uses: codecov/codecov-action@v3
with:
token: "${{secrets.CODECOV_TOKEN}}"

- name: Upload test coverage to Codacy
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
run: bash <(curl -Ls https://coverage.codacy.com/get.sh)
env:
CODACY_PROJECT_TOKEN: "${{secrets.CODACY_PROJECT_TOKEN}}"
21 changes: 14 additions & 7 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

# Setup JDK and .m2/settings.xml
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: zulu
cache: maven
Expand All @@ -43,10 +43,17 @@ jobs:
- name: Deploy a new release version to Maven Central
run: ./mvnw clean deploy -B -DskipTests -DskipExamples -Prelease -Dgpg.keyname="${{ secrets.GPG_KEYNAME }}" -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}"
env:
OSS_CENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
OSS_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
OSS_CENTRAL_USERNAME: "${{ secrets.SONATYPE_USERNAME }}"
OSS_CENTRAL_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}"

# - name: Upload coverage information
# uses: codecov/codecov-action@v2
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage to Codecov
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
uses: codecov/codecov-action@v3
with:
token: "${{secrets.CODECOV_TOKEN}}"

- name: Upload test coverage to Codacy
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
run: bash <(curl -Ls https://coverage.codacy.com/get.sh)
env:
CODACY_PROJECT_TOKEN: "${{secrets.CODACY_PROJECT_TOKEN}}"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
.flattened-pom.xml

release.properties
dependency-reduced-pom.xml
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
[![sponsored](https://img.shields.io/badge/sponsoredBy-Holisticon-RED.svg)](https://holisticon.de/)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.holunda/camunda-bpm-correlate/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.holunda/camunda-bpm-correlate)
![Compatible with: Camunda Platform 7](https://img.shields.io/badge/Compatible%20with-Camunda%20Platform%207-26d07c)
[![codecov](https://codecov.io/gh/holunda-io/camunda-bpm-correlate/branch/develop/graph/badge.svg?token=EWjlAeLt8v)](https://codecov.io/gh/holunda-io/camunda-bpm-correlate)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b751121e82a6432d90a8844725dc9af7)](https://www.codacy.com/gh/holunda-io/camunda-bpm-correlate/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=holunda-io/camunda-bpm-correlate&amp;utm_campaign=Badge_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/b751121e82a6432d90a8844725dc9af7)](https://www.codacy.com/gh/holunda-io/camunda-bpm-correlate/dashboard?utm_source=github.com&utm_medium=referral&utm_content=holunda-io/camunda-bpm-correlate&utm_campaign=Badge_Coverage)

## Why should you use it?

Expand Down
23 changes: 20 additions & 3 deletions bom/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

<parent>
<groupId>io.holunda</groupId>
<artifactId>camunda-bpm-correlate-parent</artifactId>
<version>1.0.0</version>
<relativePath>../parent/pom.xml</relativePath>
<artifactId>camunda-bpm-correlate-root</artifactId>
<version>1.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>camunda-bpm-correlate-bom</artifactId>
Expand Down Expand Up @@ -43,4 +43,21 @@
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<executions>
<execution>
<id>flatten</id>
<configuration>
<flattenMode>bom</flattenMode>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
19 changes: 17 additions & 2 deletions bom/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda</groupId>
<artifactId>camunda-bpm-correlate-root</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand All @@ -14,13 +14,28 @@
<name>POM / Parent</name>

<properties>
<spring-boot.version>2.7.5</spring-boot.version>
<camunda-7.version>7.18.0</camunda-7.version>
<camunda-bpm-data.version>1.2.7</camunda-bpm-data.version>
<camunda-bpm-data.version>1.2.8</camunda-bpm-data.version>
<shedlock.version>4.38.0</shedlock.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-bom</artifactId>
<version>${kotlin.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bom</artifactId>
Expand Down
23 changes: 23 additions & 0 deletions detekt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
comments:
active: true
excludes: [ "**/test/**","**/*Test.kt","*/src/test/kotlin/**/*.kt","**/*Stages.kt","**/*ITest.kt" ]
CommentOverPrivateFunction:
active: false
CommentOverPrivateProperty:
active: false
EndOfSentenceFormat:
active: false
endOfSentenceFormat: ([.?!][ \t\n\r\f<])|([.?!:]$)
UndocumentedPublicClass:
active: true
searchInNestedClass: true
searchInInnerClass: true
searchInInnerObject: true
searchInInnerInterface: true
UndocumentedPublicFunction:
active: true

performance:
active: true
SpreadOperator:
active: false
27 changes: 23 additions & 4 deletions docs/developer-guide/project-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To get sources of the project, please execute:

```sh
git clone https://github.com/holunda-io/camunda-bpm-correlate.git
cd camunda-rest-client-spring-boot
cd camunda-bpm-correlate
```

We are using gitflow in our git SCM for naming branches. That means that you should start from `develop` branch,
Expand Down Expand Up @@ -57,10 +57,29 @@ By default, the sources and javadoc API documentation are not generated from the
GitHub Actions are building all branches on commit hook (for codecov).
In addition, a GitHub Actions are used to build PRs and all branches.

### Release Management
### Publish a new release

The release is produced by using the GitHub feature "Close Milestone". A special GitHub action
is preparing the release notes as a draft. Then click on "Publish Release" to make it public.
We use gitflow plugin to handle versioning and branch manipulations between `develop` and `master`. Technically,
every push to the `master` branch triggers the execution of the GH actions job producing a release and publishing
it into Maven Central. To do it correctly (with correct versions) please run:

```sh
./mvnw gitflow:release-start
```

Acknowledge the proposed version (or change if needed) and then run:

```sh
./mvnw gitflow:release-finish
```

### Milestone / Release Management

After the publication of the new release, it is time to tell the users that you produced a new version.
The `GitHub release` is produced by using the GitHub feature `Close Milestone`. A special GitHub action
is preparing the release notes as a draft. Then click on `Publish Release` to make it public.
This will trigger some GitHub internal notifications and people subscribed to notification about the library
will get notified.

#### What modules get deployed to repository

Expand Down
74 changes: 39 additions & 35 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Install Dependency

First install the extension using the corresponding ingress adapter (in this example we use Kafka):
First install the extension using the corresponding ingress adapter (in this example we use Spring Cloud Stream for connecting with Kafka):

```xml

<properties>
<camunda-bpm-correlate.version>0.0.2</camunda-bpm-correlate.version>
<camunda-bpm-correlate.version>1.0.0</camunda-bpm-correlate.version>
</properties>

<dependencies>
Expand All @@ -31,18 +31,51 @@ First install the extension using the corresponding ingress adapter (in this exa

## Configuration

Configure your basic Spring Cloud Streams Kafka configuration to looks like this (or similar). Important is
the name of the function definition.
Please add the configuration of the extension:

```yaml

correlate:
enabled: true
channels:
my-kafka-channel:
enabled: true
type: stream
beanName: special-name
batch:
mode: all # default fail_first -> 'all' will correlate one message after another, resulting in ignoring the order of receiving
query: # query scheduler
pollInitialDelay: PT10S
pollInterval: PT6S
cleanup: # cleanup of expired messages
pollInitialDelay: PT1M
pollInterval: PT1M
message:
timeToLiveAsString: PT10S # errors during TTL seconds after receiving are ignored
payloadEncoding: jackson # our bytes are actually JSON written by Jackson.
persistence:
messageMaxRetries: 5 # default 100 -> will try to deliver 5 times at most
messageFetchPageSize: 100 # default 100
retry:
retryMaxBackoffMinutes: 5 # default 180 -> maximum 5 minutes between retries
retryBackoffBase: 2.0 # value in minutes default 2.0 -> base in the power of retry to calculate the next retry

```

Now configure your basic Spring Cloud Streams Kafka configuration to looks like this (or similar).
Pay attention to the name of the function definition and the bindings' in channels. It results from the
value of `correlate.channels.<channel-nam>.beanName` and accordingly is part of the expression to
bind the parameter of the binding (`special-name-in-0`).

```yaml

spring:
cloud:
stream:
function:
definition: streamByteMessageConsumer
definition: special-name
bindings:
streamByteMessageConsumer-in-0: correlate-ingress-binding
special-name-in-0: correlate-ingress-binding
bindings:
correlate-ingress-binding:
content-type: application/json
Expand Down Expand Up @@ -71,32 +104,3 @@ spring:
security.protocol: ${KAFKA_SECURITY_PROTOCOL_OVERRIDE:PLAINTEXT}

```

In addition, add the configuration of the extension:

```yaml

correlate:
enabled: true
channels:
stream:
channelEnabled: true
message:
timeToLiveAsString: PT10S # errors during TTL seconds after receiving are ignored
payloadEncoding: jackson # our bytes are actually JSON written by Jackson.
batch:
mode: all # default fail_first -> 'all' will correlate one message after another, resulting in ignoring the order of receiving
query: # query scheduler
pollInitialDelay: PT10S
pollInterval: PT6S
cleanup: # cleanup of expired messages
pollInitialDelay: PT1M
pollInterval: PT1M
persistence:
messageMaxRetries: 5 # default 100 -> will try to deliver 5 times at most
messageFetchPageSize: 100 # default 100
retry:
retryMaxBackoffMinutes: 5 # default 180 -> maximum 5 minutes between retries
retryBackoffBase: 2.0 # value in minutes default 2.0 -> base in the power of retry to calculate the next retry

```
1 change: 1 addition & 0 deletions docs/introduction/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ Currently, the library supports the following features:
* Correlation error strategies: ignore, drop, retry
* Message Buffering (TTL)
* Message Expiry
* Camunda Cockpit Plugin to display the content of the inbox table
3 changes: 1 addition & 2 deletions docs/introduction/further-outlook.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
## Other ideas

* Plugin for Camunda Cockpit
* More metrics for Prometheus
* More ingress adapters:
* Apache Camel
* JMS
* REST implementing Camunda API

Is the library missing a feature important for you?
Expand Down
3 changes: 2 additions & 1 deletion docs/user-guide/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ the response messages coming in. For demonstration purposes, the service delays
that the "expected" answer by the flight is received after the "unexpected" response from the hotel
is received. Therefor, you will see the exception (`MismatchedCorrelationException`) in the log first.

After this, you can inspect the content of the inbox by calling an endpoint [http://localhost:8080/admin/list-messages/](http://localhost:8080/admin/list-messages/).
After this, you can inspect the content of the inbox by calling an endpoint [http://localhost:8080/admin/list-messages/](http://localhost:8080/admin/list-messages/),
as alternative you might open the Camunda Cockpit and check the messages inside the plugin section `Correlation`.

### Axon Events aka using Camunda Platform 7 as Microservice Orchestrator

Expand Down
7 changes: 3 additions & 4 deletions example/axon/example.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/env bash

DIR="$(dirname $0)"
DIR=$(dirname "$0")

CLIENT_BIN="curl"
TIMESTAMP=$(date +%s%N)
CLIENT_BIN=curl
RESERVATION_ID=$(cat /proc/sys/kernel/random/uuid)

case "$1" in
Expand All @@ -18,7 +17,7 @@ case "$1" in
;;
esac

$CLIENT_BIN \
"$CLIENT_BIN" \
-X POST localhost:8080/process/reservation \
-H "Content-Type: application/json" \
-d "$JSON"
2 changes: 1 addition & 1 deletion example/axon/flight-axon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda</groupId>
<artifactId>camunda-bpm-correlate-example-parent</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Loading

0 comments on commit 1c06239

Please sign in to comment.