File tree Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " strontium" ,
3
- "version" : " 2.4.14 " ,
3
+ "version" : " 2.4.15 " ,
4
4
"description" : " Strontium is a TypeScript toolkit for High Performance API servers built for Production not Projects." ,
5
5
"main" : " lib/src/index.js" ,
6
6
"types" : " lib/src/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -93,18 +93,26 @@ export class GCPSConsumer implements Process {
93
93
)
94
94
95
95
await Promise . all (
96
- messages . map (
97
- async ( m ) =>
98
- await this . executeTask (
99
- m . ackId ,
100
- {
101
- eventName :
102
- m . message . attributes . STRONTIUM_EVENT_NAME ,
103
- message : m . message . data ,
104
- } ,
105
- container
96
+ messages . map ( async ( m ) => {
97
+ if ( m . message . attributes === undefined ) {
98
+ if ( this . logger ) {
99
+ this . logger . info (
100
+ `[GCPS - TASK - START] Event discarded due to corrupted attributes.`
106
101
)
107
- )
102
+ }
103
+
104
+ return this . ack ( m . ackId )
105
+ }
106
+
107
+ return this . executeTask (
108
+ m . ackId ,
109
+ {
110
+ eventName : m . message . attributes . STRONTIUM_EVENT_NAME ,
111
+ message : m . message . data ,
112
+ } ,
113
+ container
114
+ )
115
+ } )
108
116
)
109
117
}
110
118
}
You can’t perform that action at this time.
0 commit comments