This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 0da4080d191b CAMEL-26703: camel-sql - docs: fix recoveryByInstance 
name, default createString and orphan lock conditions (#29400)
0da4080d191b is described below

commit 0da4080d191b04d4b7c822795750aa28045bc0fb
Author: allthingssecurity <[email protected]>
AuthorDate: Sun Nov 8 13:30:56 2026 +0530

    CAMEL-26703: camel-sql - docs: fix recoveryByInstance name, default 
createString and orphan lock conditions (#29400)
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 .../org/apache/camel/catalog/docs/sql-component.adoc          | 11 +++++++----
 components/camel-sql/src/main/docs/sql-component.adoc         | 11 +++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/sql-component.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/sql-component.adoc
index 225964f01b22..b1823c53b43c 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/sql-component.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/sql-component.adoc
@@ -719,7 +719,7 @@ your needs:
 |`tableExistsString` |`SELECT 1 FROM CAMEL_MESSAGEPROCESSED WHERE 1 = 0` |This 
query is used to figure out whether the table already exists or
 not. It must throw an exception to indicate the table doesn't exist.
 
-|`createString` |`CREATE TABLE CAMEL_MESSAGEPROCESSED (processorName 
VARCHAR(255),messageId VARCHAR(100), createdAt TIMESTAMP)` |The statement which 
is used to create the table.
+|`createString` |`CREATE TABLE CAMEL_MESSAGEPROCESSED (processorName 
VARCHAR(255), messageId VARCHAR(100), createdAt TIMESTAMP, PRIMARY KEY 
(processorName, messageId))` |The statement which is used to create the table.
 
 |`queryString` |`SELECT COUNT(*) FROM CAMEL_MESSAGEPROCESSED WHERE 
processorName = ? AND messageId = ?` |The query which is used to figure out 
whether the message already exists
 in the repository (the result is not equals to '0'). It takes two
@@ -735,6 +735,9 @@ repository.
 |`deleteString` |`DELETE FROM CAMEL_MESSAGEPROCESSED WHERE processorName = ? 
AND messageId = ?` |The statement which is used to delete the entry from the 
database.
 It takes two parameters. This first one is the processor name (`String`) and
 the second one is the message id (`String`).
+
+|`clearString` |`DELETE FROM CAMEL_MESSAGEPROCESSED WHERE processorName = ?` 
|The statement which is used to delete all the entries of the
+processor name from the database. It takes one parameter, the processor name 
(`String`).
 |===
 
 The option `tableName` can be used to use the default SQL queries but with a 
different table name.
@@ -747,9 +750,9 @@ One of the limitations of 
`org.apache.camel.processor.idempotent.jdbc.JdbcMessag
 
 * lock entry does not exist then the lock is provided using the base 
implementation of `JdbcMessageIdRepository`.
 
-* lock already exists and the `createdAt` < `System.currentTimeMillis() - 
lockMaxAgeMillis`. In this case, it is assumed that an active instance has the 
lock and the lock is not provided to the new instance requesting the lock
+* lock already exists and the `createdAt` >= `System.currentTimeMillis() - 
lockMaxAgeMillis`. In this case, it is assumed that an active instance has the 
lock and the lock is not provided to the new instance requesting the lock
 
-* lock already exists and the `createdAt` > = `System.currentTimeMillis() - 
lockMaxAgeMillis`. In this case, it is assumed that there is no active instance 
which has the lock and the lock is provided to the requesting instance. The 
reason behind is that if the original instance which had the lock, if it was 
still running, it would have updated the Timestamp on createdAt using its 
keepAlive mechanism
+* lock already exists and the `createdAt` < `System.currentTimeMillis() - 
lockMaxAgeMillis`. In this case, it is assumed that there is no active instance 
which has the lock and the lock is provided to the requesting instance. The 
reason behind is that if the original instance which had the lock, if it was 
still running, it would have updated the Timestamp on createdAt using its 
keepAlive mechanism
 
 This repository has two additional configuration parameters
 
@@ -1024,7 +1027,7 @@ You may use `ClusteredJdbcAggregationRepository` that 
provides a limited support
 recovery mechanism is dealt separately by members of the cluster,
 i.e., a member may only recover exchanges that it completed itself.
 
-To enable this behavior, property `recoverByInstance` must be set to true, and 
`instanceId` property must be defined using a unique identifier (a string) for 
each member of the cluster.
+To enable this behavior, property `recoveryByInstance` must be set to true, 
and `instanceId` property must be defined using a unique identifier (a string) 
for each member of the cluster.
 
 Besides, completed table must have a `instance_id VARCHAR(255)` column.
 
diff --git a/components/camel-sql/src/main/docs/sql-component.adoc 
b/components/camel-sql/src/main/docs/sql-component.adoc
index 225964f01b22..b1823c53b43c 100644
--- a/components/camel-sql/src/main/docs/sql-component.adoc
+++ b/components/camel-sql/src/main/docs/sql-component.adoc
@@ -719,7 +719,7 @@ your needs:
 |`tableExistsString` |`SELECT 1 FROM CAMEL_MESSAGEPROCESSED WHERE 1 = 0` |This 
query is used to figure out whether the table already exists or
 not. It must throw an exception to indicate the table doesn't exist.
 
-|`createString` |`CREATE TABLE CAMEL_MESSAGEPROCESSED (processorName 
VARCHAR(255),messageId VARCHAR(100), createdAt TIMESTAMP)` |The statement which 
is used to create the table.
+|`createString` |`CREATE TABLE CAMEL_MESSAGEPROCESSED (processorName 
VARCHAR(255), messageId VARCHAR(100), createdAt TIMESTAMP, PRIMARY KEY 
(processorName, messageId))` |The statement which is used to create the table.
 
 |`queryString` |`SELECT COUNT(*) FROM CAMEL_MESSAGEPROCESSED WHERE 
processorName = ? AND messageId = ?` |The query which is used to figure out 
whether the message already exists
 in the repository (the result is not equals to '0'). It takes two
@@ -735,6 +735,9 @@ repository.
 |`deleteString` |`DELETE FROM CAMEL_MESSAGEPROCESSED WHERE processorName = ? 
AND messageId = ?` |The statement which is used to delete the entry from the 
database.
 It takes two parameters. This first one is the processor name (`String`) and
 the second one is the message id (`String`).
+
+|`clearString` |`DELETE FROM CAMEL_MESSAGEPROCESSED WHERE processorName = ?` 
|The statement which is used to delete all the entries of the
+processor name from the database. It takes one parameter, the processor name 
(`String`).
 |===
 
 The option `tableName` can be used to use the default SQL queries but with a 
different table name.
@@ -747,9 +750,9 @@ One of the limitations of 
`org.apache.camel.processor.idempotent.jdbc.JdbcMessag
 
 * lock entry does not exist then the lock is provided using the base 
implementation of `JdbcMessageIdRepository`.
 
-* lock already exists and the `createdAt` < `System.currentTimeMillis() - 
lockMaxAgeMillis`. In this case, it is assumed that an active instance has the 
lock and the lock is not provided to the new instance requesting the lock
+* lock already exists and the `createdAt` >= `System.currentTimeMillis() - 
lockMaxAgeMillis`. In this case, it is assumed that an active instance has the 
lock and the lock is not provided to the new instance requesting the lock
 
-* lock already exists and the `createdAt` > = `System.currentTimeMillis() - 
lockMaxAgeMillis`. In this case, it is assumed that there is no active instance 
which has the lock and the lock is provided to the requesting instance. The 
reason behind is that if the original instance which had the lock, if it was 
still running, it would have updated the Timestamp on createdAt using its 
keepAlive mechanism
+* lock already exists and the `createdAt` < `System.currentTimeMillis() - 
lockMaxAgeMillis`. In this case, it is assumed that there is no active instance 
which has the lock and the lock is provided to the requesting instance. The 
reason behind is that if the original instance which had the lock, if it was 
still running, it would have updated the Timestamp on createdAt using its 
keepAlive mechanism
 
 This repository has two additional configuration parameters
 
@@ -1024,7 +1027,7 @@ You may use `ClusteredJdbcAggregationRepository` that 
provides a limited support
 recovery mechanism is dealt separately by members of the cluster,
 i.e., a member may only recover exchanges that it completed itself.
 
-To enable this behavior, property `recoverByInstance` must be set to true, and 
`instanceId` property must be defined using a unique identifier (a string) for 
each member of the cluster.
+To enable this behavior, property `recoveryByInstance` must be set to true, 
and `instanceId` property must be defined using a unique identifier (a string) 
for each member of the cluster.
 
 Besides, completed table must have a `instance_id VARCHAR(255)` column.
 

Reply via email to