chore: group & release events for local eventbus (#7649)
* chore: stage & release events for local eventbus * chore: address review * chore: mock emitter correctly
This commit is contained in:
@@ -24,6 +24,16 @@ export abstract class AbstractEventBusModuleService
|
||||
abstract emit<T>(data: EventBusTypes.EmitData<T>[]): Promise<void>
|
||||
abstract emit<T>(data: EventBusTypes.Message<T>[]): Promise<void>
|
||||
|
||||
/*
|
||||
Grouped events are useful when you have distributed transactions
|
||||
where you need to explicitly group, release and clear events upon
|
||||
lifecycle events of a transaction.
|
||||
*/
|
||||
// Given a eventGroupId, all the grouped events will be released
|
||||
abstract releaseGroupedEvents(eventGroupId: string): Promise<void>
|
||||
// Given a eventGroupId, all the grouped events will be cleared
|
||||
abstract clearGroupedEvents(eventGroupId: string): Promise<void>
|
||||
|
||||
protected storeSubscribers({
|
||||
event,
|
||||
subscriberId,
|
||||
|
||||
Reference in New Issue
Block a user