diff --git a/package.json b/package.json index b45cc9d81eac9166c7c33f51bcb581bf79a5048d..199e2fb41a94e5d02647105eb594ee8674620084 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@libero/event-bus", - "version": "0.2.3", + "version": "0.2.4", "description": "", "main": "dist/index.js", "scripts": { diff --git a/src/rabbit-event-bus/index.ts b/src/rabbit-event-bus/index.ts index 0353959878c1802e31f7531ffc755e1fba303fd9..2d139127c48e81b163519775dd14903a4253c594 100644 --- a/src/rabbit-event-bus/index.ts +++ b/src/rabbit-event-bus/index.ts @@ -93,10 +93,7 @@ export default class RabbitEventBus extends EventBus implements EventPublisher, } public async subscribe(eventType: string, handler: (event: Event) => Promise<boolean>): Promise<number> { - // TODO: this should be fixed as part of refactor/reshape... add async/await for now - this.connector.map(async connector => { - await connector.subscribe(eventType, handler); - }); + await this.connector.get().subscribe(eventType, handler); // Add the subscription to the next connector's list of subscriptions return this.subscriptions.push({