File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -406,14 +406,14 @@ async handleUserCreated(@Payload() data: IncomingMessage) {
406
406
await this .client .commitOffsets ([ { topic: data .topic , partition: data .partition , offset: data .offset } ])
407
407
}
408
408
@@switch
409
-
410
- constructor (@Inject (KAFKA ) client : ClientKafka ) {}
411
-
412
- @EventPattern (' user_created' )
413
- async handleUserCreated (data ) {
409
+ @Bind (Payload (), Ctx ())
410
+ @EventPattern (' user.created' )
411
+ async handleUserCreated (data , context ) {
414
412
// business logic
415
413
416
- await this .client .commitOffsets ([ { topic: data .topic , partition: data .partition , offset: data .offset } ])
414
+ const originalMessage = context .getMessage ();
415
+ const { topic, partition, offset } = originalMessage ;
416
+ await this .client .commitOffsets ([{ topic , partition , offset }])
417
417
}
418
418
```
419
419
You can’t perform that action at this time.
0 commit comments