Skip to content

Commit 0c24808

Browse files
fix: add isReady flag on dispatcher
1 parent a5d20ee commit 0c24808

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nestjstools/messaging",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "Simplifies asynchronous and synchronous message handling with support for buses, handlers, channels, and consumers. Build scalable, decoupled applications with ease and reliability.",
55
"author": "Sebastian Iwanczyszyn",
66
"license": "MIT",

src/consumer/consumer-message-mediator.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ export class ConsumerMessageMediator implements ConsumerMessageDispatcher {
1111
this.$message.next(message);
1212
}
1313

14+
isReady(): boolean {
15+
return this.$message.observers.length > 0;
16+
}
17+
1418
listen(): Observable<ConsumerMessage> {
1519
return this.$message.asObservable();
1620
}

0 commit comments

Comments
 (0)