Skip to content

Commit

Permalink
Wait for producer to be ready before send
Browse files Browse the repository at this point in the history
  • Loading branch information
awlayton committed Jul 23, 2021
1 parent fd9317a commit c17851d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions oada/libs/oada-lib-kafka/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ export class Base extends EventEmitter {
topic?: string;
part: number | null;
}) {
// Wait for producer to be ready?
await this.ready

// Assume all messages are JSON
const value = JSON.stringify({
time: Date.now(),
Expand Down

0 comments on commit c17851d

Please sign in to comment.