Skip to content

Commit

Permalink
SAMZA-2797: Call flush during stop from CoordinatorStreamWriter (#1692)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajothomas authored Nov 22, 2023
1 parent 66495b6 commit e1816f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ public void stop() {
isStarted = false;
}

/**
* Flushes underlying system producer.
* */
public void flush(String source) {
log.info("Flushing coordinator stream producer.");
systemProducer.flush(source);
}

/**
* Serialize and send a coordinator stream message.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public void start() {
*/
public void stop() {
log.info("Stopping the coordinator stream producer.");
coordinatorStreamSystemProducer.flush(SOURCE);
coordinatorStreamSystemProducer.stop();
}

Expand Down

0 comments on commit e1816f3

Please sign in to comment.