Redningsselskapet / nestjs-plugins

Plugins for NestJS framework
ISC License
27 stars 22 forks source link

Consumer event handlers omitted when using inheritAppConfig and ClassSerializerInterceptor #57

Open jobcespedes opened 9 months ago

jobcespedes commented 9 months ago

Describe the bug No event handler is trigger when using inheritAppConfig and ClassSerializerInterceptor

To Reproduce Steps to reproduce the behavior:

  1. Start the microservice application with inheritAppConfig: true.
  2. Set Serializer as Global Interceptor with app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get(Reflector)))
  3. Emit an event order.updated
  4. See that function with decorator @EventHandler('order.updated') is omitted
  5. Comment out Serializer as Global Interceptor with // app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get(Reflector)))
  6. Emit an event order.updated
  7. See that function with decorator @EventHandler('order.updated') is triggered

Expected behavior All functions with decorator @EventHandler() are triggered