Skip to content

Commit

Permalink
dataMoverTopic not required anymore and defaults to empty string
Browse files Browse the repository at this point in the history
Do not create a consumer if no topic provided

Issue: BB-565
  • Loading branch information
KillianG committed Oct 10, 2024
1 parent 5cbb606 commit 48bbfca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extensions/replication/ReplicationConfigValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const joiSchema = joi.object({
bootstrapList: bootstrapListJoi,
},
topic: joi.string().required(),
dataMoverTopic: joi.string().required(),
dataMoverTopic: joi.string().default(''),
replicationStatusTopic: joi.string().required(),
monitorReplicationFailures: joi.boolean().default(true),
replicationFailedTopic: joi.string().required(),
Expand Down
3 changes: 2 additions & 1 deletion extensions/replication/queueProcessor/QueueProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,9 @@ class QueueProcessor extends EventEmitter {
if (options && options.disableConsumer) {
return done();
}
if (this.isReplayTopic) {
if (this.isReplayTopic || !this.repConfig.dataMoverTopic) {

Check warning on line 756 in extensions/replication/queueProcessor/QueueProcessor.js

View check run for this annotation

Codecov / codecov/patch/Backbeat

extensions/replication/queueProcessor/QueueProcessor.js#L756

Added line #L756 was not covered by tests
// Do not process dataMover topic in replay processors
// or if dataMover topic is not configured
return done();
}
this._dataMoverConsumer = this._createConsumer(
Expand Down

0 comments on commit 48bbfca

Please sign in to comment.