Comparing version 1.2.0 to 1.3.0
# Changelog | ||
## [1.3.0](https://www.github.com/AlbertHernandez/bull-bus/compare/v1.2.0...v1.3.0) (2022-01-23) | ||
### Features | ||
* allow to send event options ([572c07e](https://www.github.com/AlbertHernandez/bull-bus/commit/572c07e87aed7c02f94537eace52093030b3db54)) | ||
## [1.2.0](https://www.github.com/AlbertHernandez/bull-bus/compare/v1.1.1...v1.2.0) (2022-01-23) | ||
@@ -4,0 +11,0 @@ |
{ | ||
"name": "bull-bus", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Event Bus for Node.JS using Bull Queues", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -6,2 +6,3 @@ import BullQueue, { QueueOptions } from "bull"; | ||
import { SubscriberName } from "./subscriber-name"; | ||
import { EventOptions } from "./event-options"; | ||
@@ -12,2 +13,3 @@ export class BullBus { | ||
private readonly topicNameToSubscriberNames; | ||
private readonly eventOptions; | ||
@@ -21,2 +23,3 @@ constructor(dependencies: { | ||
>; | ||
eventOptions?: EventOptions; | ||
}) { | ||
@@ -26,2 +29,3 @@ this.queueOptions = dependencies.queueOptions; | ||
this.topicNameToSubscriberNames = dependencies.topicNameToSubscriberNames; | ||
this.eventOptions = dependencies.eventOptions; | ||
} | ||
@@ -38,3 +42,3 @@ | ||
queues.map(async (queue) => { | ||
await queue.add(payload); | ||
await queue.add(payload, this.eventOptions); | ||
}) | ||
@@ -41,0 +45,0 @@ ); |
@@ -8,2 +8,3 @@ import { Job, QueueOptions } from "bull"; | ||
import { SubscriberName } from "../../bull-bus/domain/subscriber-name"; | ||
import { EventOptions } from "../../bull-bus/domain/event-options"; | ||
@@ -20,8 +21,5 @@ export class BullEventBus implements EventBus { | ||
>; | ||
eventOptions?: EventOptions; | ||
}) { | ||
this.bullBus = new BullBus({ | ||
queueOptions: dependencies.queueOptions, | ||
redisUrl: dependencies.redisUrl, | ||
topicNameToSubscriberNames: dependencies.topicNameToSubscriberNames, | ||
}); | ||
this.bullBus = new BullBus(dependencies); | ||
} | ||
@@ -28,0 +26,0 @@ |
465025
40
404