File tree 1 file changed +2
-2
lines changed
packages/bus-core/src/service-bus
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export class ServiceBus implements Bus {
40
40
this . logger . debug ( 'publish' , { event } )
41
41
const transportOptions = this . prepareTransportOptions ( messageOptions )
42
42
43
- this . messageHooks . publish . map ( callback => callback ( event , messageOptions ) )
43
+ await Promise . all ( this . messageHooks . publish . map ( callback => callback ( event , messageOptions ) ) )
44
44
return this . transport . publish ( event , transportOptions )
45
45
}
46
46
@@ -51,7 +51,7 @@ export class ServiceBus implements Bus {
51
51
this . logger . debug ( 'send' , { command } )
52
52
const transportOptions = this . prepareTransportOptions ( messageOptions )
53
53
54
- this . messageHooks . send . map ( callback => callback ( command , messageOptions ) )
54
+ await Promise . all ( this . messageHooks . send . map ( callback => callback ( command , messageOptions ) ) )
55
55
return this . transport . send ( command , transportOptions )
56
56
}
57
57
You can’t perform that action at this time.
0 commit comments