Skip to content

CDAP-17472 Make consumer id optional for mysql plugin.#122

Merged
sagarkapare merged 1 commit intodevelopfrom
fix/make-consumer-id-optional
Dec 17, 2020
Merged

CDAP-17472 Make consumer id optional for mysql plugin.#122
sagarkapare merged 1 commit intodevelopfrom
fix/make-consumer-id-optional

Conversation

@sagarkapare
Copy link
Copy Markdown
Contributor

When not provided, debezium picks random value for database.server.id. - Reference: https://debezium.io/documentation/reference/1.3/connectors/mysql.html

another Delta Replicator that is reading from the server, and it cannot be the same as the server-id for any MySQL
slave that is replicating from the server.
**Consumer ID:** Optional unique numeric ID to identify this origin as an event consumer. This number cannot be the
same as another Delta Replicator that is reading from the server, and it cannot be the same as the server-id for any
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we append an instance Id after it, is it still required to be different from the one used by another Replicator ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instance id will be same between different replicators ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes.. its integer that starts with 0.

configBuilder = configBuilder.with("database.server.id", config.getConsumerID() + context.getInstanceId());
}

Configuration debeziumConf = configBuilder.build();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we don't need this intermediate variable ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh its used on line 150 as well.

@sagarkapare sagarkapare merged commit 82d80fe into develop Dec 17, 2020
@sagarkapare sagarkapare deleted the fix/make-consumer-id-optional branch December 17, 2020 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants