Skip to content

Commit

Permalink
fix: Emit RoutingCreated event for mediator routing record (#1445)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderShenshin committed May 3, 2023
1 parent 9a43afe commit 4145957
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/core/src/modules/routing/services/MediatorService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,17 @@ export class MediatorService {

await this.mediatorRoutingRepository.save(agentContext, routingRecord)

this.eventEmitter.emit(agentContext, {
type: RoutingEventTypes.RoutingCreatedEvent,
payload: {
routing: {
endpoints: agentContext.config.endpoints,
routingKeys: [],
recipientKey: routingKey,
},
},
})

return routingRecord
}

Expand Down

0 comments on commit 4145957

Please sign in to comment.