From 814e4192d0329fca5408f2627a45c4533009b47e Mon Sep 17 00:00:00 2001 From: Simon Zambrovski Date: Thu, 24 Nov 2022 22:43:17 +0100 Subject: [PATCH 01/10] Update for next development version --- bom/bom/pom.xml | 2 +- bom/parent/pom.xml | 2 +- example/axon/flight-axon/pom.xml | 2 +- example/axon/hotel-axon/pom.xml | 2 +- example/axon/reservation-axon/pom.xml | 2 +- example/common/pom.xml | 2 +- example/itest/pom.xml | 2 +- example/pom.xml | 2 +- example/spring-cloud/flight-kafka/pom.xml | 2 +- example/spring-cloud/hotel-kafka/pom.xml | 2 +- example/spring-cloud/reservation-kafka/pom.xml | 2 +- extension/axon/pom.xml | 2 +- extension/cockpit-plugin/pom.xml | 2 +- extension/core/pom.xml | 2 +- extension/spring-boot-starter/pom.xml | 2 +- extension/spring-cloud-stream/pom.xml | 2 +- pom.xml | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bom/bom/pom.xml b/bom/bom/pom.xml index 6e831ad..365f329 100644 --- a/bom/bom/pom.xml +++ b/bom/bom/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-root - 1.0.1 + 1.0.2-SNAPSHOT ../../pom.xml diff --git a/bom/parent/pom.xml b/bom/parent/pom.xml index 4880adb..76cabb0 100644 --- a/bom/parent/pom.xml +++ b/bom/parent/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-root - 1.0.1 + 1.0.2-SNAPSHOT ../../pom.xml diff --git a/example/axon/flight-axon/pom.xml b/example/axon/flight-axon/pom.xml index ae8bd9c..8a22f6c 100644 --- a/example/axon/flight-axon/pom.xml +++ b/example/axon/flight-axon/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.1 + 1.0.2-SNAPSHOT ../../pom.xml diff --git a/example/axon/hotel-axon/pom.xml b/example/axon/hotel-axon/pom.xml index 0a27389..f51b30f 100644 --- a/example/axon/hotel-axon/pom.xml +++ b/example/axon/hotel-axon/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.1 + 1.0.2-SNAPSHOT ../../pom.xml diff --git a/example/axon/reservation-axon/pom.xml b/example/axon/reservation-axon/pom.xml index 28ad31b..b9ed0e3 100644 --- a/example/axon/reservation-axon/pom.xml +++ b/example/axon/reservation-axon/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.1 + 1.0.2-SNAPSHOT ../../pom.xml diff --git a/example/common/pom.xml b/example/common/pom.xml index 187ae82..10192e9 100644 --- a/example/common/pom.xml +++ b/example/common/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.1 + 1.0.2-SNAPSHOT ../pom.xml diff --git a/example/itest/pom.xml b/example/itest/pom.xml index 3c46e18..eb530d9 100644 --- a/example/itest/pom.xml +++ b/example/itest/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.1 + 1.0.2-SNAPSHOT ../pom.xml diff --git a/example/pom.xml b/example/pom.xml index 6a9393a..56b0e57 100644 --- a/example/pom.xml +++ b/example/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.0.1 + 1.0.2-SNAPSHOT ../bom/parent/pom.xml diff --git a/example/spring-cloud/flight-kafka/pom.xml b/example/spring-cloud/flight-kafka/pom.xml index 7ff6a01..eab274b 100644 --- a/example/spring-cloud/flight-kafka/pom.xml +++ b/example/spring-cloud/flight-kafka/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.1 + 1.0.2-SNAPSHOT ../../pom.xml diff --git a/example/spring-cloud/hotel-kafka/pom.xml b/example/spring-cloud/hotel-kafka/pom.xml index 2fccd16..b36628f 100644 --- a/example/spring-cloud/hotel-kafka/pom.xml +++ b/example/spring-cloud/hotel-kafka/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.1 + 1.0.2-SNAPSHOT ../../pom.xml diff --git a/example/spring-cloud/reservation-kafka/pom.xml b/example/spring-cloud/reservation-kafka/pom.xml index e5c3b37..5f31c64 100644 --- a/example/spring-cloud/reservation-kafka/pom.xml +++ b/example/spring-cloud/reservation-kafka/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.1 + 1.0.2-SNAPSHOT ../../pom.xml diff --git a/extension/axon/pom.xml b/extension/axon/pom.xml index 309acec..25d5d77 100644 --- a/extension/axon/pom.xml +++ b/extension/axon/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.0.1 + 1.0.2-SNAPSHOT ../../bom/parent/pom.xml diff --git a/extension/cockpit-plugin/pom.xml b/extension/cockpit-plugin/pom.xml index 27b4f4f..25ef5e3 100644 --- a/extension/cockpit-plugin/pom.xml +++ b/extension/cockpit-plugin/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.0.1 + 1.0.2-SNAPSHOT ../../bom/parent/pom.xml diff --git a/extension/core/pom.xml b/extension/core/pom.xml index 05f2aa6..ba38c68 100644 --- a/extension/core/pom.xml +++ b/extension/core/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.0.1 + 1.0.2-SNAPSHOT ../../bom/parent/pom.xml diff --git a/extension/spring-boot-starter/pom.xml b/extension/spring-boot-starter/pom.xml index 8026121..3ce15dc 100644 --- a/extension/spring-boot-starter/pom.xml +++ b/extension/spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.0.1 + 1.0.2-SNAPSHOT ../../bom/parent/pom.xml diff --git a/extension/spring-cloud-stream/pom.xml b/extension/spring-cloud-stream/pom.xml index b48a5ee..f42bd01 100644 --- a/extension/spring-cloud-stream/pom.xml +++ b/extension/spring-cloud-stream/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.0.1 + 1.0.2-SNAPSHOT ../../bom/parent/pom.xml diff --git a/pom.xml b/pom.xml index 8e3da07..fabc598 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ io.holunda camunda-bpm-correlate-root - 1.0.1 + 1.0.2-SNAPSHOT pom ${project.artifactId} https://github.com/holunda-io/camunda-bpm-correlate/ From cd0ab73955937ec7206c47653257db2b22aa8398 Mon Sep 17 00:00:00 2001 From: Simon Zambrovski Date: Tue, 29 Nov 2022 12:49:20 +0100 Subject: [PATCH 02/10] implement sorting on message retrieval, fix #37 --- .../components/edit-retries-modal.tsx | 2 +- .../correlate/persist/MessageRepository.kt | 4 +- .../persist/impl/MyBatisMessageMapper.kt | 8 +-- .../impl/MyBatisMessageRepositoryIT.kt | 50 +++++++++++++++++++ .../core/src/test/resources/some-messages.sql | 9 ++-- 5 files changed, 61 insertions(+), 12 deletions(-) diff --git a/extension/cockpit-plugin/src/main/frontend/components/edit-retries-modal.tsx b/extension/cockpit-plugin/src/main/frontend/components/edit-retries-modal.tsx index 94d3acc..1d52eab 100644 --- a/extension/cockpit-plugin/src/main/frontend/components/edit-retries-modal.tsx +++ b/extension/cockpit-plugin/src/main/frontend/components/edit-retries-modal.tsx @@ -42,7 +42,7 @@ export const EditRetriesModal = ({ message, onClose, onSubmit, maxRetries }: Edi
Message could not be correlated from the first attempt.
- {retries == maxRetries ? + {retries >= maxRetries ?
All ${maxRetries} are exhausted. To continue retries please decrease the number of retries below: diff --git a/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/MessageRepository.kt b/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/MessageRepository.kt index 73a766f..ebd49bf 100644 --- a/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/MessageRepository.kt +++ b/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/MessageRepository.kt @@ -10,11 +10,11 @@ interface MessageRepository { /** * Finds all messages. - * @param page number start element to fetch from. + * @param page number start element to fetch from. Starts from 0. * @param pageSize number elements to fetch. * @return list of all messages. */ - fun findAll(page: Int, pageSize: Int): List + fun findAll(page: Int = 0, pageSize: Int): List /** * Finds all messages without payload. diff --git a/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MyBatisMessageMapper.kt b/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MyBatisMessageMapper.kt index 5745415..617224f 100644 --- a/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MyBatisMessageMapper.kt +++ b/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MyBatisMessageMapper.kt @@ -15,7 +15,7 @@ interface MyBatisMessageMapper { /** * Finds all messages using paging. */ - @Select("SELECT * FROM COR_MESSAGE") + @Select("SELECT * FROM COR_MESSAGE M ORDER BY M.INSERTED ASC") @Results( value = [ Result(property = "id", column = "ID", jdbcType = JdbcType.VARCHAR), @@ -36,7 +36,7 @@ interface MyBatisMessageMapper { /** * Find all message light objects (message without payload). */ - @Select("SELECT * FROM COR_MESSAGE M WHERE M.ERROR IS NOT NULL") + @Select("SELECT * FROM COR_MESSAGE M WHERE M.ERROR IS NOT NULL ORDER BY M.INSERTED ASC") @Results( value = [ Result(property = "id", column = "ID", jdbcType = JdbcType.VARCHAR), @@ -57,7 +57,7 @@ interface MyBatisMessageMapper { /** * Loads all messages. */ - @Select("SELECT * FROM COR_MESSAGE") + @Select("SELECT * FROM COR_MESSAGE M ORDER BY M.INSERTED ASC") @Results( value = [ Result(property = "id", column = "ID", jdbcType = JdbcType.VARCHAR), @@ -79,7 +79,7 @@ interface MyBatisMessageMapper { /** * Finds a message by id. */ - @Select("SELECT * from COR_MESSAGE M WHERE M.ID=#{id}") + @Select("SELECT * from COR_MESSAGE M WHERE M.ID=#{id} ORDER BY M.INSERTED ASC") @Results( value = [ Result(property = "id", column = "ID"), diff --git a/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MyBatisMessageRepositoryIT.kt b/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MyBatisMessageRepositoryIT.kt index ff91921..1e9ef30 100644 --- a/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MyBatisMessageRepositoryIT.kt +++ b/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MyBatisMessageRepositoryIT.kt @@ -25,6 +25,11 @@ class MyBatisMessageRepositoryIT { @Autowired private lateinit var repository: MyBatisMessageRepository + companion object { + val MESSAGES_IDS_BY_INSERTED_ASC = listOf("4711", "4716", "4712", "4713", "4714", "4715") + val MESSAGES_IDS_BY_INSERTED_ASC_FAULTS = listOf("4713", "4714", "4715") + } + @Test @Sql(scripts = ["/some-messages.sql"]) fun `selects one by id`() { @@ -33,6 +38,8 @@ class MyBatisMessageRepositoryIT { assertThat(message).isNotNull.apply { extracting( MessageEntity::id.name ).isEqualTo("4711") extracting( MessageEntity::payloadTypeName.name ).isEqualTo("MyType") + extracting( MessageEntity::payloadTypeNamespace.name ).isEqualTo("io.holixon.namespace") + extracting( MessageEntity::payloadEncoding.name ).isEqualTo("JACKSON") } val nothing = repository.findByIdOrNull("does-not-exist") @@ -54,6 +61,49 @@ class MyBatisMessageRepositoryIT { assertThat(count.paused).isEqualTo(2) } + @Test + @Sql(scripts = ["/some-messages.sql"]) + fun `select paged in correct order`() { + val messages = repository.findAll(0, 100); + assertThat(messages.map { it.id }).containsExactlyElementsOf(MESSAGES_IDS_BY_INSERTED_ASC) + } + + @Test + @Sql(scripts = ["/some-messages.sql"]) + fun `select light in correct order`() { + val messages = repository.findAllLight(0, 100, false); + assertThat(messages.map { it.id }).containsExactlyElementsOf(MESSAGES_IDS_BY_INSERTED_ASC) + } + + @Test + @Sql(scripts = ["/some-messages.sql"]) + fun `select light faults in correct order`() { + val messages = repository.findAllLight(0, 100, true); + assertThat(messages.map { it.id }).containsExactlyElementsOf(MESSAGES_IDS_BY_INSERTED_ASC_FAULTS) + } + + @Test + @Sql(scripts = ["/some-messages.sql"]) + fun `select second page in correct order`() { + val messages = repository.findAll(1, 3) + assertThat(messages.map { it.id }).containsExactlyElementsOf(MESSAGES_IDS_BY_INSERTED_ASC.subList(3, MESSAGES_IDS_BY_INSERTED_ASC.size)) + } + + @Test + @Sql(scripts = ["/some-messages.sql"]) + fun `select light second page in correct order`() { + val messages = repository.findAllLight(1, 3, false) + assertThat(messages.map { it.id }).containsExactlyElementsOf(MESSAGES_IDS_BY_INSERTED_ASC.subList(3, MESSAGES_IDS_BY_INSERTED_ASC.size)) + } + + @Test + @Sql(scripts = ["/some-messages.sql"]) + fun `select light faults second page in correct order`() { + val messages = repository.findAllLight(1, 2, true); + assertThat(messages.map { it.id }).containsExactlyElementsOf(MESSAGES_IDS_BY_INSERTED_ASC_FAULTS.subList(2, MESSAGES_IDS_BY_INSERTED_ASC_FAULTS.size)) + } + + @org.springframework.context.annotation.Configuration class MyConfiguration { diff --git a/extension/core/src/test/resources/some-messages.sql b/extension/core/src/test/resources/some-messages.sql index 7500217..f0ee6fa 100644 --- a/extension/core/src/test/resources/some-messages.sql +++ b/extension/core/src/test/resources/some-messages.sql @@ -3,11 +3,10 @@ INSERT INTO COR_MESSAGE(ID, PAYLOAD_ENCODING, PAYLOAD_TYPE_NAMESPACE, PAYLOAD_TY INSERT INTO COR_MESSAGE(ID, PAYLOAD_ENCODING, PAYLOAD_TYPE_NAMESPACE, PAYLOAD_TYPE_NAME, PAYLOAD_TYPE_REVISION, PAYLOAD, INSERTED, TTL_DURATION, EXPIRATION, RETRIES, NEXT_RETRY, ERROR) VALUES ('4712', 'JACKSON', 'io.holixon.namespace', 'MyType', NULL, 'B00', '2022-10-01T10:00:10Z', NULL, NULL, 0, NULL, NULL); INSERT INTO COR_MESSAGE(ID, PAYLOAD_ENCODING, PAYLOAD_TYPE_NAMESPACE, PAYLOAD_TYPE_NAME, PAYLOAD_TYPE_REVISION, PAYLOAD, INSERTED, TTL_DURATION, EXPIRATION, RETRIES, NEXT_RETRY, ERROR) - VALUES ('4713', 'JACKSON', 'io.holixon.namespace', 'MyType', NULL, 'B00', '2022-10-01T10:10:00Z', NULL, NULL, 1, '2022-10-01T10:11:00Z', 'someError'); + VALUES ('4713', 'JACKSON', 'io.holixon.namespace', 'MyType', NULL, 'B00', '2022-10-01T10:10:01Z', NULL, NULL, 1, '2022-10-01T10:11:00Z', 'someError'); INSERT INTO COR_MESSAGE(ID, PAYLOAD_ENCODING, PAYLOAD_TYPE_NAMESPACE, PAYLOAD_TYPE_NAME, PAYLOAD_TYPE_REVISION, PAYLOAD, INSERTED, TTL_DURATION, EXPIRATION, RETRIES, NEXT_RETRY, ERROR) - VALUES ('4714', 'JACKSON', 'io.holixon.namespace', 'MyType', NULL, 'B00', '2022-10-01T10:12:00Z', NULL, NULL, 3, '2022-10-01T10:13:00Z', 'another'); - + VALUES ('4714', 'JACKSON', 'io.holixon.namespace', 'MyType', NULL, 'B00', '2022-10-01T10:12:02Z', NULL, NULL, 3, '2022-10-01T10:13:00Z', 'another'); INSERT INTO COR_MESSAGE(ID, PAYLOAD_ENCODING, PAYLOAD_TYPE_NAMESPACE, PAYLOAD_TYPE_NAME, PAYLOAD_TYPE_REVISION, PAYLOAD, INSERTED, TTL_DURATION, EXPIRATION, RETRIES, NEXT_RETRY, ERROR) - VALUES ('4715', 'JACKSON', 'io.holixon.namespace', 'MyType', NULL, 'B00', '2022-10-01T10:12:00Z', NULL, NULL, 1, '4999-12-03T10:15:30Z', 'another'); + VALUES ('4715', 'JACKSON', 'io.holixon.namespace', 'MyType', NULL, 'B00', '2022-10-01T10:12:03Z', NULL, NULL, 1, '4999-12-03T10:15:30Z', 'another'); INSERT INTO COR_MESSAGE(ID, PAYLOAD_ENCODING, PAYLOAD_TYPE_NAMESPACE, PAYLOAD_TYPE_NAME, PAYLOAD_TYPE_REVISION, PAYLOAD, INSERTED, TTL_DURATION, EXPIRATION, RETRIES, NEXT_RETRY, ERROR) - VALUES ('4716', 'JACKSON', 'io.holixon.namespace', 'MyType', NULL, 'B00', '2022-10-01T10:00:00Z', NULL, NULL, 0, '4999-12-03T10:15:30Z', NULL); + VALUES ('4716', 'JACKSON', 'io.holixon.namespace', 'MyType', NULL, 'B00', '2022-10-01T10:00:04Z', NULL, NULL, 0, '4999-12-03T10:15:30Z', NULL); From b6c1a9c550c950743340573be865beb36316483d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Jan 2023 05:38:21 +0000 Subject: [PATCH 03/10] Bump json5 from 2.2.1 to 2.2.3 in /extension/cockpit-plugin Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- extension/cockpit-plugin/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extension/cockpit-plugin/package-lock.json b/extension/cockpit-plugin/package-lock.json index 71d35df..e457f36 100644 --- a/extension/cockpit-plugin/package-lock.json +++ b/extension/cockpit-plugin/package-lock.json @@ -4158,9 +4158,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -8337,9 +8337,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "jsx-ast-utils": { From ed32daf110223ca5a615f91c88ac860e012e8f0d Mon Sep 17 00:00:00 2001 From: Simon Zambrovski Date: Fri, 20 Jan 2023 18:49:59 +0100 Subject: [PATCH 04/10] implemented batch size, trying to fix byte conversion, #40 --- example/spring-cloud/example.sh | 6 +- .../ReservationProcessingCorrelation.kt | 2 + .../src/main/resources/application.yml | 8 +- .../impl/DefaultMessagePersistenceService.kt | 8 +- .../persist/impl/MessagePersistenceConfig.kt | 7 ++ .../camunda/bpm/correlate/TestFixtures.kt | 20 +++- .../DefaultMessagePersistenceServiceTest.kt | 107 ++++++++++++++++++ .../impl/MessagePersistenceProperties.kt | 4 +- 8 files changed, 152 insertions(+), 10 deletions(-) create mode 100644 extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/correlation/DefaultMessagePersistenceServiceTest.kt diff --git a/example/spring-cloud/example.sh b/example/spring-cloud/example.sh index 4953085..75abf11 100755 --- a/example/spring-cloud/example.sh +++ b/example/spring-cloud/example.sh @@ -9,9 +9,9 @@ CLIENT_BIN=kcat case "$1" in "reservation") - JSON=$(jq ".reservationId =\""$RESERVATION_ID\"" "$DIR/../common/local/reservation-created.json") + JSON=$(jq ".reservationId=\"$RESERVATION_ID\"" $DIR/../common/local/reservation-created.json) EVENT_TYPE=io.holunda.camunda.bpm.example.common.domain.ReservationReceivedEvent - echo "Sending create reservation message: $JSON" + echo "Sending create reservation message: '$JSON'" ;; "flight") @@ -28,7 +28,7 @@ case "$1" in "show") "$CLIENT_BIN" -b "$KAFKA_BOOTSTRAP_SERVER_HOST:$KAFKA_BOOTSTRAP_SERVER_PORT" \ -t "$KAFKA_TOPIC_CORRELATE_INGRESS" \ - -C + -C -f 'Key: %k, payload: %s\n' exit 0 ;; "all") diff --git a/example/spring-cloud/reservation-kafka/src/main/kotlin/io/holunda/camunda/bpm/example/kafka/correlation/correlate/ReservationProcessingCorrelation.kt b/example/spring-cloud/reservation-kafka/src/main/kotlin/io/holunda/camunda/bpm/example/kafka/correlation/correlate/ReservationProcessingCorrelation.kt index 754f9a0..dd7981a 100644 --- a/example/spring-cloud/reservation-kafka/src/main/kotlin/io/holunda/camunda/bpm/example/kafka/correlation/correlate/ReservationProcessingCorrelation.kt +++ b/example/spring-cloud/reservation-kafka/src/main/kotlin/io/holunda/camunda/bpm/example/kafka/correlation/correlate/ReservationProcessingCorrelation.kt @@ -4,6 +4,7 @@ import io.holunda.camunda.bpm.correlate.correlation.CorrelationMessage import io.holunda.camunda.bpm.correlate.correlation.SingleMessageCorrelationStrategy import io.holunda.camunda.bpm.correlate.correlation.impl.MessageIdCorrelationMessageComparator import io.holunda.camunda.bpm.correlate.event.CorrelationHint +import io.holunda.camunda.bpm.correlate.persist.impl.DefaultMessagePersistenceService import io.holunda.camunda.bpm.example.common.domain.ReservationReceivedEvent import io.holunda.camunda.bpm.example.common.domain.flight.FlightReservationConfirmedEvent import io.holunda.camunda.bpm.example.common.domain.hotel.HotelReservationConfirmedEvent @@ -52,6 +53,7 @@ class ReservationProcessingCorrelation( RESERVATION_ID.name to payload.bookingReference ) ) + is DefaultMessagePersistenceService.PayloadNotAvailable -> throw IllegalArgumentException("No payload was available, could not determine correlation hint for message ${message.messageMetaData}") else -> throw IllegalArgumentException("Could not determine correlation hint for message ${message.messageMetaData}") } } diff --git a/example/spring-cloud/reservation-kafka/src/main/resources/application.yml b/example/spring-cloud/reservation-kafka/src/main/resources/application.yml index f3e7de1..d9b00bb 100644 --- a/example/spring-cloud/reservation-kafka/src/main/resources/application.yml +++ b/example/spring-cloud/reservation-kafka/src/main/resources/application.yml @@ -18,7 +18,7 @@ spring: stream: bindings: correlate-ingress-binding: - content-type: application/json + # content-type: application/octet-stream // do we need this? destination: ${KAFKA_TOPIC_CORRELATE_INGRES:correlate-ingress} binder: correlate-ingress-binder group: ${KAFKA_GROUP_ID} @@ -34,9 +34,9 @@ spring: brokers: ${KAFKA_BOOTSTRAP_SERVER_HOST:localhost}:${KAFKA_BOOTSTRAP_SERVER_PORT:9092} configuration: security.protocol: ${KAFKA_SECURITY_PROTOCOL_OVERRIDE:PLAINTEXT} -# consumer-properties: -# key-deserializer: org.apache.kafka.common.serialization.ByteArrayDeserializer -# value-deserializer: org.apache.kafka.common.serialization.ByteArrayDeserializer + consumerProperties: + key.deserializer: org.apache.kafka.common.serialization.ByteArrayDeserializer + value.deserializer: org.apache.kafka.common.serialization.ByteArrayDeserializer camunda: bpm: diff --git a/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/DefaultMessagePersistenceService.kt b/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/DefaultMessagePersistenceService.kt index 3206427..f42cb24 100644 --- a/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/DefaultMessagePersistenceService.kt +++ b/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/DefaultMessagePersistenceService.kt @@ -96,7 +96,7 @@ class DefaultMessagePersistenceService( logger.debug { "Built ${batches.size} batches." } /* - * Fast access fun to retry info for message. + * Fast access function to retry info for message. */ fun CorrelationMessage.retryInfo() = messagesWithRetries.getValue(this) @@ -110,6 +110,12 @@ class DefaultMessagePersistenceService( // take those without errors or if they are due for retry hasNoErrors || dueForRetry } + }.map { correlationBatch -> + if (messagePersistenceConfig.batchSizeLimit() != -1) { + correlationBatch.copy(correlationMessages = correlationBatch.correlationMessages.take(messagePersistenceConfig.batchSizeLimit())) + } else { + correlationBatch + } } } diff --git a/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MessagePersistenceConfig.kt b/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MessagePersistenceConfig.kt index 8cc86c3..be8cd6d 100644 --- a/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MessagePersistenceConfig.kt +++ b/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MessagePersistenceConfig.kt @@ -13,5 +13,12 @@ interface MessagePersistenceConfig { * Retrieves the page size for paging. */ fun getPageSize(): Int + + /** + * Limits the global size of messages after batch building process. Defaults to unlimited. + * Special value of interest is 1, because only the first message in batch is taken in current run, + * and all others are ignored and will be processed during the next correlation attempt. + */ + fun batchSizeLimit(): Int = -1 } diff --git a/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/TestFixtures.kt b/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/TestFixtures.kt index 700c875..e72aa9c 100644 --- a/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/TestFixtures.kt +++ b/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/TestFixtures.kt @@ -7,6 +7,8 @@ import io.holunda.camunda.bpm.correlate.event.CorrelationHint import io.holunda.camunda.bpm.correlate.ingress.MessageFilter import io.holunda.camunda.bpm.correlate.ingress.message.ChannelMessage import io.holunda.camunda.bpm.correlate.ingress.message.ObjectMessage +import io.holunda.camunda.bpm.correlate.persist.MessageEntity +import java.time.Instant import java.util.* fun messageId() = UUID.randomUUID().toString() @@ -20,6 +22,7 @@ fun emptyMessageMetadata() = MessageMetaData( timeToLive = null, expiration = null ) + fun acceptingFilter() = AcceptingMessageFilter() fun rejectingFilter() = RejectingMessageFilter() @@ -34,6 +37,21 @@ fun correlationMessage() = CorrelationMessage( payload = UUID.randomUUID().toString() ) +fun messageEntity(id: String = UUID.randomUUID().toString()) = MessageEntity( + id = id, + payload = ByteArray(0), + payloadEncoding = "jackson", + payloadTypeNamespace = requireNotNull(PayloadType::class.java.packageName), + payloadTypeName = requireNotNull(PayloadType::class.java.simpleName), + payloadTypeRevision = null, + inserted = Instant.now(), + timeToLiveDuration = null, + expiration = null, + retries = 0, + nextRetry = null, + error = null +) + /** * Reject all. */ @@ -66,4 +84,4 @@ interface LazyLoadingMessage { * Imagine this method is performing expensive or impossible (the return type is not on the classpath) de-serialization. */ fun deserializePayload(): T -} \ No newline at end of file +} diff --git a/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/correlation/DefaultMessagePersistenceServiceTest.kt b/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/correlation/DefaultMessagePersistenceServiceTest.kt new file mode 100644 index 0000000..e1b6b2f --- /dev/null +++ b/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/correlation/DefaultMessagePersistenceServiceTest.kt @@ -0,0 +1,107 @@ +package io.holunda.camunda.bpm.correlate.correlation + +import io.holunda.camunda.bpm.correlate.PayloadType2 +import io.holunda.camunda.bpm.correlate.correlation.impl.MessageIdCorrelationMessageComparator +import io.holunda.camunda.bpm.correlate.messageEntity +import io.holunda.camunda.bpm.correlate.persist.MessageRepository +import io.holunda.camunda.bpm.correlate.persist.SingleMessageErrorHandlingStrategy +import io.holunda.camunda.bpm.correlate.persist.encoding.PayloadDecoder +import io.holunda.camunda.bpm.correlate.persist.impl.DefaultMessagePersistenceService +import io.holunda.camunda.bpm.correlate.persist.impl.MessagePersistenceConfig +import io.holunda.camunda.bpm.correlate.runningInstanceHint +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.BeforeEach +import org.junit.jupiter.api.Test +import org.mockito.kotlin.any +import org.mockito.kotlin.mock +import org.mockito.kotlin.whenever +import java.time.Clock +import java.time.Instant +import java.time.ZoneId + +internal class DefaultMessagePersistenceServiceTest { + + private val messagePersistenceConfig: MessagePersistenceConfig = mock() + private val messageRepository: MessageRepository = mock() + private val singleMessageCorrelationStrategy: SingleMessageCorrelationStrategy = mock() + private val singleMessageErrorHandlingStrategy: SingleMessageErrorHandlingStrategy = mock() + private val decoder: PayloadDecoder = mock() + + private val service: DefaultMessagePersistenceService = DefaultMessagePersistenceService( + messagePersistenceConfig = messagePersistenceConfig, + messageRepository = messageRepository, + payloadDecoders = listOf(decoder), + clock = Clock.system(ZoneId.of("UTC")), + singleMessageCorrelationStrategy = singleMessageCorrelationStrategy, + singleMessageErrorHandlingStrategy = singleMessageErrorHandlingStrategy + ) + + private val message1 = messageEntity().apply { inserted = Instant.now() } + private val message2 = messageEntity().apply { inserted = Instant.now().plusSeconds(1) } + private val message3 = messageEntity().apply { inserted = Instant.now().plusSeconds(2) } + + + @BeforeEach + fun `setup mocks`() { + whenever(decoder.supports(any())).thenReturn(true) + whenever(decoder.decode(any(), any())).thenReturn(PayloadType2()) + // send second message to different batch + whenever(singleMessageCorrelationStrategy.correlationSelector()).thenReturn { + if (it.messageMetaData.messageId == message2.id) { + runningInstanceHint("ONE") + } else { + runningInstanceHint("ANOTHER") + } + } + + whenever(singleMessageCorrelationStrategy.correlationMessageSorter()).thenReturn(MessageIdCorrelationMessageComparator()) + + whenever(messageRepository.findAll(any(), any())).thenReturn(listOf(message1, message2, message3)) + listOf(message1, message2, message3).forEach { + whenever(messageRepository.findByIdOrNull(it.id)).thenReturn(it) + } + } + + @Test + fun `should build batches`() { + + whenever(messagePersistenceConfig.batchSizeLimit()).thenReturn(-1) + + val batches = service.fetchMessageBatches() + assertThat(batches.size).isEqualTo(2) + assertThat(batches[0].correlationMessages.map { it.messageMetaData.messageId }).containsExactlyInAnyOrderElementsOf(listOf(message1.id, message3.id)) + assertThat(batches[1].correlationMessages.map { it.messageMetaData.messageId }).containsExactlyElementsOf(listOf(message2.id)) + } + + @Test + fun `should build batches and take the entire batch because the limit is high`() { + whenever(messagePersistenceConfig.batchSizeLimit()).thenReturn(5) + + val batches = service.fetchMessageBatches() + assertThat(batches.size).isEqualTo(2) + assertThat(batches[0].correlationMessages.map { it.messageMetaData.messageId }).containsExactlyInAnyOrderElementsOf(listOf(message1.id, message3.id)) + assertThat(batches[1].correlationMessages.map { it.messageMetaData.messageId }).containsExactlyElementsOf(listOf(message2.id)) + } + + + @Test + fun `should build batches and take only first message`() { + whenever(messagePersistenceConfig.batchSizeLimit()).thenReturn(1) + + val batches = service.fetchMessageBatches() + assertThat(batches.size).isEqualTo(2) + assertThat(batches[0].correlationMessages.map { it.messageMetaData.messageId }).containsExactlyElementsOf(listOf(message1.id)) + assertThat(batches[1].correlationMessages.map { it.messageMetaData.messageId }).containsExactlyElementsOf(listOf(message2.id)) + } + + + @Test + fun `should build batches and not process them`() { + whenever(messagePersistenceConfig.batchSizeLimit()).thenReturn(0) + + val batches = service.fetchMessageBatches() + assertThat(batches.size).isEqualTo(2) + assertThat(batches[0].correlationMessages).isEmpty() + assertThat(batches[1].correlationMessages).isEmpty() + } +} diff --git a/extension/spring-boot-starter/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MessagePersistenceProperties.kt b/extension/spring-boot-starter/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MessagePersistenceProperties.kt index 594e395..548cafd 100644 --- a/extension/spring-boot-starter/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MessagePersistenceProperties.kt +++ b/extension/spring-boot-starter/src/main/kotlin/io/holunda/camunda/bpm/correlate/persist/impl/MessagePersistenceProperties.kt @@ -8,9 +8,11 @@ import org.springframework.boot.context.properties.ConstructorBinding @ConstructorBinding data class MessagePersistenceProperties( val messageMaxRetries: Int = 100, - val messageFetchPageSize: Int = 100 + val messageFetchPageSize: Int = 1000, + val messageBatchSize: Int = -1 ) : MessagePersistenceConfig { override fun getMaxRetries(): Int = messageMaxRetries override fun getPageSize(): Int = messageFetchPageSize + override fun batchSizeLimit(): Int = messageBatchSize } From d917e9530fffd5e65a65f55fc438f58b9ee93ae1 Mon Sep 17 00:00:00 2001 From: Simon Zambrovski Date: Fri, 20 Jan 2023 18:58:58 +0100 Subject: [PATCH 05/10] add identity comparator, and fix test --- .../correlation/impl/IdentityMessageComparator.kt | 12 ++++++++++++ .../DefaultMessagePersistenceServiceTest.kt | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/correlation/impl/IdentityMessageComparator.kt diff --git a/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/correlation/impl/IdentityMessageComparator.kt b/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/correlation/impl/IdentityMessageComparator.kt new file mode 100644 index 0000000..e911350 --- /dev/null +++ b/extension/core/src/main/kotlin/io/holunda/camunda/bpm/correlate/correlation/impl/IdentityMessageComparator.kt @@ -0,0 +1,12 @@ +package io.holunda.camunda.bpm.correlate.correlation.impl + +import io.holunda.camunda.bpm.correlate.correlation.CorrelationMessage + +/** + * Correlation message comparator taking not changing the order. + */ +class IdentityMessageComparator : Comparator { + override fun compare(left: CorrelationMessage, right: CorrelationMessage): Int = -1 +} + + diff --git a/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/correlation/DefaultMessagePersistenceServiceTest.kt b/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/correlation/DefaultMessagePersistenceServiceTest.kt index e1b6b2f..fd0e35a 100644 --- a/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/correlation/DefaultMessagePersistenceServiceTest.kt +++ b/extension/core/src/test/kotlin/io/holunda/camunda/bpm/correlate/correlation/DefaultMessagePersistenceServiceTest.kt @@ -36,9 +36,9 @@ internal class DefaultMessagePersistenceServiceTest { singleMessageErrorHandlingStrategy = singleMessageErrorHandlingStrategy ) - private val message1 = messageEntity().apply { inserted = Instant.now() } - private val message2 = messageEntity().apply { inserted = Instant.now().plusSeconds(1) } - private val message3 = messageEntity().apply { inserted = Instant.now().plusSeconds(2) } + private val message1 = messageEntity("1").apply { inserted = Instant.now() } + private val message2 = messageEntity("2").apply { inserted = Instant.now().plusSeconds(1) } + private val message3 = messageEntity("3").apply { inserted = Instant.now().plusSeconds(2) } @BeforeEach From 09827691bcdb65f3916c769d357cf3051f2e9889 Mon Sep 17 00:00:00 2001 From: Simon Zambrovski Date: Fri, 20 Jan 2023 19:00:01 +0100 Subject: [PATCH 06/10] fix comparator for messages with UUID --- .../correlation/correlate/ReservationProcessingCorrelation.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/spring-cloud/reservation-kafka/src/main/kotlin/io/holunda/camunda/bpm/example/kafka/correlation/correlate/ReservationProcessingCorrelation.kt b/example/spring-cloud/reservation-kafka/src/main/kotlin/io/holunda/camunda/bpm/example/kafka/correlation/correlate/ReservationProcessingCorrelation.kt index dd7981a..3f18931 100644 --- a/example/spring-cloud/reservation-kafka/src/main/kotlin/io/holunda/camunda/bpm/example/kafka/correlation/correlate/ReservationProcessingCorrelation.kt +++ b/example/spring-cloud/reservation-kafka/src/main/kotlin/io/holunda/camunda/bpm/example/kafka/correlation/correlate/ReservationProcessingCorrelation.kt @@ -2,6 +2,7 @@ package io.holunda.camunda.bpm.example.kafka.correlation.correlate import io.holunda.camunda.bpm.correlate.correlation.CorrelationMessage import io.holunda.camunda.bpm.correlate.correlation.SingleMessageCorrelationStrategy +import io.holunda.camunda.bpm.correlate.correlation.impl.IdentityMessageComparator import io.holunda.camunda.bpm.correlate.correlation.impl.MessageIdCorrelationMessageComparator import io.holunda.camunda.bpm.correlate.event.CorrelationHint import io.holunda.camunda.bpm.correlate.persist.impl.DefaultMessagePersistenceService @@ -59,5 +60,5 @@ class ReservationProcessingCorrelation( } } - override fun correlationMessageSorter(): Comparator = MessageIdCorrelationMessageComparator() + override fun correlationMessageSorter(): Comparator = IdentityMessageComparator() } From 412257900bd87150cca065a62ba2bf648da4f8e3 Mon Sep 17 00:00:00 2001 From: Simon Zambrovski Date: Tue, 24 Jan 2023 17:15:38 +0100 Subject: [PATCH 07/10] fix: handling jq and kafka cat messages correctly --- example/spring-cloud/example.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/example/spring-cloud/example.sh b/example/spring-cloud/example.sh index 75abf11..27b8588 100755 --- a/example/spring-cloud/example.sh +++ b/example/spring-cloud/example.sh @@ -43,6 +43,7 @@ case "$1" in esac echo "$JSON" | "$CLIENT_BIN" \ + -D "\0" \ -b "$KAFKA_BOOTSTRAP_SERVER_HOST:$KAFKA_BOOTSTRAP_SERVER_PORT" \ -t "$KAFKA_TOPIC_CORRELATE_INGRESS" \ -P \ From b9228dbdbed26c08c356a9a9f5207c5d4ae81361 Mon Sep 17 00:00:00 2001 From: Simon Zambrovski Date: Tue, 24 Jan 2023 17:38:49 +0100 Subject: [PATCH 08/10] add some docs --- docs/user-guide/scheduled-processing.md | 32 ++++++++++++------- .../application-camunda-correlate.yml | 6 ++-- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/docs/user-guide/scheduled-processing.md b/docs/user-guide/scheduled-processing.md index ac46186..41eba98 100644 --- a/docs/user-guide/scheduled-processing.md +++ b/docs/user-guide/scheduled-processing.md @@ -24,23 +24,26 @@ correlate: persistence: # persistence setting messageMaxRetries: 100 messageFetchPageSize: 100 + messageBatchSize: 1 retry: retryMaxBackoffMinutes: 5 retryBackoffBase: 2.0 + ``` -| Property | Values | Meaning | Default | -|----------------------------------|---------------------|-------------------------------------------------|---------| -| batch.mode | `all`, `fail_first` | Batch processing mode | all | -| batch.query.pollInitialDelay | Duration in ISO8601 | Start delay before correlation scheduler starts | PT10S | -| batch.query.pollInterval | Duration in ISO8601 | Delay between correlation attempts | PT6S | -| batch.cleanup.pollInitialDelay | Duration in ISO8601 | Start delay before clean-up scheduler starts | | -| batch.cleanup.pollInterval | Duration in ISO8601 | Delay between clean-ups | | -| persistence.messageMaxRetries | Integer | Maximum retries before giving up correlation | 100 | -| persistence.messageFetchPageSize | Integer | Paging size by message fetch | 100 | -| retry.retryMaxBackoffMinutes | Integer | Maximum backoff-time in minutes | 180 | -| retry.retryBackoffBase | Float | Base for exponential backoff-time | 180 | +| Property | Values | Meaning | Default | +|----------------------------------|---------------------|-----------------------------------------------------|---------| +| batch.mode | `all`, `fail_first` | Batch processing mode | all | +| batch.query.pollInitialDelay | Duration in ISO8601 | Start delay before correlation scheduler starts | PT10S | +| batch.query.pollInterval | Duration in ISO8601 | Delay between correlation attempts | PT6S | +| batch.cleanup.pollInitialDelay | Duration in ISO8601 | Start delay before clean-up scheduler starts | | +| batch.cleanup.pollInterval | Duration in ISO8601 | Delay between clean-ups | | +| persistence.messageMaxRetries | Integer | Maximum retries before giving up correlation | 100 | +| persistence.messageFetchPageSize | Integer | Paging size by message fetch | 100 | +| persistence.messageBatchSize | Integer | Limit the number of messages processed from a batch | -1 | +| retry.retryMaxBackoffMinutes | Integer | Maximum backoff-time in minutes | 180 | +| retry.retryBackoffBase | Float | Base for exponential backoff-time | 180 | ### Reading message @@ -57,6 +60,13 @@ Batches of messages are checked to fulfill the following criteria: Messages of one batch are correlated in order of their sorting. If a correlation error occurs, the batch correlation is either interrupted (`fail_first` mode) or the batch is correlated to the end (`all` mode). +An important parameter for batch processing is the `message-batch-size`. This parameter specifies the number of messages +taken from a batch for synchronous correlation. Effectively, this parameter has two interesting values. Set this parameter +to `-1` (default) and all messages from one batch will be correlated directly one after another. Set this parameter to +`1` and the batch will be constructed, but only the first message will be correlated in current run. If successful, the +next message will be fetched during the next message query (after the `batch.query.pollInterval`, which should be a small interval). +By doing so, you can deal with asynchronous continuations in your process. + ### Error detection If the error is detected during the correlation, it is handled by the library. If the message time-to-live is set and the diff --git a/example/spring-cloud/reservation-kafka/src/main/resources/application-camunda-correlate.yml b/example/spring-cloud/reservation-kafka/src/main/resources/application-camunda-correlate.yml index 1139ab7..2c801b4 100644 --- a/example/spring-cloud/reservation-kafka/src/main/resources/application-camunda-correlate.yml +++ b/example/spring-cloud/reservation-kafka/src/main/resources/application-camunda-correlate.yml @@ -27,9 +27,11 @@ correlate: 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 + message-max-retries: 5 # default 100 -> will try to deliver 5 times at most + message-fetch-page-size: 100 # default 100 + # message-batch-size: 1 # default is -1 meaning unlimited retry: retryMaxBackoffMinutes: 5 # default 180 -> maximum 5 minutes between retries retryBackoffBase: 5.0 # value in minutes default 2.0 -> base in the power of retry to calculate the next retry From 6627a44d6773963c24dfb4bf220bd1caff54fc73 Mon Sep 17 00:00:00 2001 From: Simon Zambrovski Date: Tue, 24 Jan 2023 17:45:03 +0100 Subject: [PATCH 09/10] Update versions for release --- bom/bom/pom.xml | 2 +- bom/parent/pom.xml | 2 +- example/axon/flight-axon/pom.xml | 2 +- example/axon/hotel-axon/pom.xml | 2 +- example/axon/reservation-axon/pom.xml | 2 +- example/common/pom.xml | 2 +- example/itest/pom.xml | 2 +- example/pom.xml | 2 +- example/spring-cloud/flight-kafka/pom.xml | 2 +- example/spring-cloud/hotel-kafka/pom.xml | 2 +- example/spring-cloud/reservation-kafka/pom.xml | 2 +- extension/axon/pom.xml | 2 +- extension/cockpit-plugin/pom.xml | 2 +- extension/core/pom.xml | 2 +- extension/spring-boot-starter/pom.xml | 2 +- extension/spring-cloud-stream/pom.xml | 2 +- pom.xml | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bom/bom/pom.xml b/bom/bom/pom.xml index 365f329..6054716 100644 --- a/bom/bom/pom.xml +++ b/bom/bom/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-root - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../../pom.xml diff --git a/bom/parent/pom.xml b/bom/parent/pom.xml index 76cabb0..c1590fd 100644 --- a/bom/parent/pom.xml +++ b/bom/parent/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-root - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../../pom.xml diff --git a/example/axon/flight-axon/pom.xml b/example/axon/flight-axon/pom.xml index 8a22f6c..224eaaa 100644 --- a/example/axon/flight-axon/pom.xml +++ b/example/axon/flight-axon/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../../pom.xml diff --git a/example/axon/hotel-axon/pom.xml b/example/axon/hotel-axon/pom.xml index f51b30f..1b980dd 100644 --- a/example/axon/hotel-axon/pom.xml +++ b/example/axon/hotel-axon/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../../pom.xml diff --git a/example/axon/reservation-axon/pom.xml b/example/axon/reservation-axon/pom.xml index b9ed0e3..5af9f09 100644 --- a/example/axon/reservation-axon/pom.xml +++ b/example/axon/reservation-axon/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../../pom.xml diff --git a/example/common/pom.xml b/example/common/pom.xml index 10192e9..c590974 100644 --- a/example/common/pom.xml +++ b/example/common/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../pom.xml diff --git a/example/itest/pom.xml b/example/itest/pom.xml index eb530d9..875ffb7 100644 --- a/example/itest/pom.xml +++ b/example/itest/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../pom.xml diff --git a/example/pom.xml b/example/pom.xml index 56b0e57..32df03d 100644 --- a/example/pom.xml +++ b/example/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../bom/parent/pom.xml diff --git a/example/spring-cloud/flight-kafka/pom.xml b/example/spring-cloud/flight-kafka/pom.xml index eab274b..63919eb 100644 --- a/example/spring-cloud/flight-kafka/pom.xml +++ b/example/spring-cloud/flight-kafka/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../../pom.xml diff --git a/example/spring-cloud/hotel-kafka/pom.xml b/example/spring-cloud/hotel-kafka/pom.xml index b36628f..8c841ed 100644 --- a/example/spring-cloud/hotel-kafka/pom.xml +++ b/example/spring-cloud/hotel-kafka/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../../pom.xml diff --git a/example/spring-cloud/reservation-kafka/pom.xml b/example/spring-cloud/reservation-kafka/pom.xml index 5f31c64..eb7a476 100644 --- a/example/spring-cloud/reservation-kafka/pom.xml +++ b/example/spring-cloud/reservation-kafka/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../../pom.xml diff --git a/extension/axon/pom.xml b/extension/axon/pom.xml index 25d5d77..51a943b 100644 --- a/extension/axon/pom.xml +++ b/extension/axon/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../../bom/parent/pom.xml diff --git a/extension/cockpit-plugin/pom.xml b/extension/cockpit-plugin/pom.xml index 25ef5e3..ceb150f 100644 --- a/extension/cockpit-plugin/pom.xml +++ b/extension/cockpit-plugin/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../../bom/parent/pom.xml diff --git a/extension/core/pom.xml b/extension/core/pom.xml index ba38c68..bd7ef6c 100644 --- a/extension/core/pom.xml +++ b/extension/core/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../../bom/parent/pom.xml diff --git a/extension/spring-boot-starter/pom.xml b/extension/spring-boot-starter/pom.xml index 3ce15dc..ec4d646 100644 --- a/extension/spring-boot-starter/pom.xml +++ b/extension/spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../../bom/parent/pom.xml diff --git a/extension/spring-cloud-stream/pom.xml b/extension/spring-cloud-stream/pom.xml index f42bd01..ffd2472 100644 --- a/extension/spring-cloud-stream/pom.xml +++ b/extension/spring-cloud-stream/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT ../../bom/parent/pom.xml diff --git a/pom.xml b/pom.xml index fabc598..3d35595 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ io.holunda camunda-bpm-correlate-root - 1.0.2-SNAPSHOT + 1.1.0-SNAPSHOT pom ${project.artifactId} https://github.com/holunda-io/camunda-bpm-correlate/ From 987dfc470a19a152b1809d548a0b5f0a5767fadb Mon Sep 17 00:00:00 2001 From: Simon Zambrovski Date: Tue, 24 Jan 2023 17:47:21 +0100 Subject: [PATCH 10/10] Update for next development version --- bom/bom/pom.xml | 2 +- bom/parent/pom.xml | 2 +- example/axon/flight-axon/pom.xml | 2 +- example/axon/hotel-axon/pom.xml | 2 +- example/axon/reservation-axon/pom.xml | 2 +- example/common/pom.xml | 2 +- example/itest/pom.xml | 2 +- example/pom.xml | 2 +- example/spring-cloud/flight-kafka/pom.xml | 2 +- example/spring-cloud/hotel-kafka/pom.xml | 2 +- example/spring-cloud/reservation-kafka/pom.xml | 2 +- extension/axon/pom.xml | 2 +- extension/cockpit-plugin/pom.xml | 2 +- extension/core/pom.xml | 2 +- extension/spring-boot-starter/pom.xml | 2 +- extension/spring-cloud-stream/pom.xml | 2 +- pom.xml | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bom/bom/pom.xml b/bom/bom/pom.xml index 6054716..91984bd 100644 --- a/bom/bom/pom.xml +++ b/bom/bom/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-root - 1.1.0-SNAPSHOT + 1.1.0 ../../pom.xml diff --git a/bom/parent/pom.xml b/bom/parent/pom.xml index c1590fd..81c7a76 100644 --- a/bom/parent/pom.xml +++ b/bom/parent/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-root - 1.1.0-SNAPSHOT + 1.1.0 ../../pom.xml diff --git a/example/axon/flight-axon/pom.xml b/example/axon/flight-axon/pom.xml index 224eaaa..9f4d882 100644 --- a/example/axon/flight-axon/pom.xml +++ b/example/axon/flight-axon/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.1.0-SNAPSHOT + 1.1.0 ../../pom.xml diff --git a/example/axon/hotel-axon/pom.xml b/example/axon/hotel-axon/pom.xml index 1b980dd..0de07d9 100644 --- a/example/axon/hotel-axon/pom.xml +++ b/example/axon/hotel-axon/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.1.0-SNAPSHOT + 1.1.0 ../../pom.xml diff --git a/example/axon/reservation-axon/pom.xml b/example/axon/reservation-axon/pom.xml index 5af9f09..b1f155d 100644 --- a/example/axon/reservation-axon/pom.xml +++ b/example/axon/reservation-axon/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.1.0-SNAPSHOT + 1.1.0 ../../pom.xml diff --git a/example/common/pom.xml b/example/common/pom.xml index c590974..10ecc17 100644 --- a/example/common/pom.xml +++ b/example/common/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.1.0-SNAPSHOT + 1.1.0 ../pom.xml diff --git a/example/itest/pom.xml b/example/itest/pom.xml index 875ffb7..2147d5f 100644 --- a/example/itest/pom.xml +++ b/example/itest/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.1.0-SNAPSHOT + 1.1.0 ../pom.xml diff --git a/example/pom.xml b/example/pom.xml index 32df03d..8d3fbf7 100644 --- a/example/pom.xml +++ b/example/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.1.0-SNAPSHOT + 1.1.0 ../bom/parent/pom.xml diff --git a/example/spring-cloud/flight-kafka/pom.xml b/example/spring-cloud/flight-kafka/pom.xml index 63919eb..6746131 100644 --- a/example/spring-cloud/flight-kafka/pom.xml +++ b/example/spring-cloud/flight-kafka/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.1.0-SNAPSHOT + 1.1.0 ../../pom.xml diff --git a/example/spring-cloud/hotel-kafka/pom.xml b/example/spring-cloud/hotel-kafka/pom.xml index 8c841ed..5a472ae 100644 --- a/example/spring-cloud/hotel-kafka/pom.xml +++ b/example/spring-cloud/hotel-kafka/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.1.0-SNAPSHOT + 1.1.0 ../../pom.xml diff --git a/example/spring-cloud/reservation-kafka/pom.xml b/example/spring-cloud/reservation-kafka/pom.xml index eb7a476..3d4fa79 100644 --- a/example/spring-cloud/reservation-kafka/pom.xml +++ b/example/spring-cloud/reservation-kafka/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-example-parent - 1.1.0-SNAPSHOT + 1.1.0 ../../pom.xml diff --git a/extension/axon/pom.xml b/extension/axon/pom.xml index 51a943b..c84d67b 100644 --- a/extension/axon/pom.xml +++ b/extension/axon/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.1.0-SNAPSHOT + 1.1.0 ../../bom/parent/pom.xml diff --git a/extension/cockpit-plugin/pom.xml b/extension/cockpit-plugin/pom.xml index ceb150f..eb33fc9 100644 --- a/extension/cockpit-plugin/pom.xml +++ b/extension/cockpit-plugin/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.1.0-SNAPSHOT + 1.1.0 ../../bom/parent/pom.xml diff --git a/extension/core/pom.xml b/extension/core/pom.xml index bd7ef6c..5d503bc 100644 --- a/extension/core/pom.xml +++ b/extension/core/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.1.0-SNAPSHOT + 1.1.0 ../../bom/parent/pom.xml diff --git a/extension/spring-boot-starter/pom.xml b/extension/spring-boot-starter/pom.xml index ec4d646..395f20b 100644 --- a/extension/spring-boot-starter/pom.xml +++ b/extension/spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.1.0-SNAPSHOT + 1.1.0 ../../bom/parent/pom.xml diff --git a/extension/spring-cloud-stream/pom.xml b/extension/spring-cloud-stream/pom.xml index ffd2472..b499fbb 100644 --- a/extension/spring-cloud-stream/pom.xml +++ b/extension/spring-cloud-stream/pom.xml @@ -5,7 +5,7 @@ io.holunda camunda-bpm-correlate-parent - 1.1.0-SNAPSHOT + 1.1.0 ../../bom/parent/pom.xml diff --git a/pom.xml b/pom.xml index 3d35595..4bace20 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ io.holunda camunda-bpm-correlate-root - 1.1.0-SNAPSHOT + 1.1.0 pom ${project.artifactId} https://github.com/holunda-io/camunda-bpm-correlate/