You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While running two source connectors on the single cosmos DB container (say User) both use the same User-leases container (i.e same continuation token) So the changes in the User container are processed by only one connector whose worker-id is specified in the User-lease container.
Expected Behavior
For each source connector, there must be different Leases containers.
Reproduce
I have created two Cosmos DB source connectors in a single Kafka connect instance:
1. create-user-cosmosdb-source-connector
This will fetch the record from Cosmos UserDB-->User container and store it in the "create-user" Kafka topic if the property OperationType is 1 else ignore it.
2. create-user-cosmosdb-source-connector
This will fetch the record from Cosmos UserDB-->User container and store it in the "update_user" Kafka topic if the property OperationType is 2 else ignore it.
But when running in parallel both use the same continuation token of the Cosmos lease container (i.e. User-leases). So the message is processed by only one connector whose worker-id is specified in the User-lease container.
@webdirektindia - I reviewed the code, and it is intentionally only creating a single lease container, so that it can share it across different change feed processor instances (in this case, different kafka source connector instances). What is your use case of processing the same change twice in separate kafka source connectors?
Description
While running two source connectors on the single cosmos DB container (say User) both use the same User-leases container (i.e same continuation token) So the changes in the User container are processed by only one connector whose worker-id is specified in the User-lease container.
Expected Behavior
For each source connector, there must be different Leases containers.
Reproduce
I have created two Cosmos DB source connectors in a single Kafka connect instance:
1. create-user-cosmosdb-source-connector
This will fetch the record from Cosmos UserDB-->User container and store it in the "create-user" Kafka topic if the property OperationType is 1 else ignore it.
JSON config:
2. create-user-cosmosdb-source-connector
This will fetch the record from Cosmos UserDB-->User container and store it in the "update_user" Kafka topic if the property OperationType is 2 else ignore it.
JSON config:
But when running in parallel both use the same continuation token of the Cosmos lease container (i.e. User-leases). So the message is processed by only one connector whose worker-id is specified in the User-lease container.
Record present in the User-leases container:
The text was updated successfully, but these errors were encountered: