nestjs-geteventstore icon indicating copy to clipboard operation
nestjs-geteventstore copied to clipboard

Fix/write event bus config and publish bug

Open Rzial opened this issue 3 years ago • 1 comments

Bug 1

The WriteEventBus class has a bug were the publish function call the parent with an array of "preparedEvents" but since is the single event publish function we shoud do the same as we do on ReadEventBus.

https://github.com/PrestaShopCorp/nestjs-geteventstore/blob/3a14375624d53521fa3aad698c6729f1234dbf59/src/cqrs/write-event-bus.ts#L56

https://github.com/PrestaShopCorp/nestjs-geteventstore/blob/3a14375624d53521fa3aad698c6729f1234dbf59/src/cqrs/read-event-bus.ts#L35

Bug 2

The configuration provider defined for the WriteEventBus configuration had a bug and registered the whole configuration instead causing a bug here regarding the use of the serviceName as stream name.

https://github.com/PrestaShopCorp/nestjs-geteventstore/blob/d2c482ab84c85ef30daea029f07bb4f12fd20ae5/src/event-store/publisher/event-store.publisher.ts#L76

Rzial avatar Mar 21 '22 10:03 Rzial

@Rzial are you able to run the examples folder without errors?

kodeine avatar Apr 10 '22 00:04 kodeine