server icon indicating copy to clipboard operation
server copied to clipboard

Remove extra JSON.stringify in event bus publisher

Open coderabbitai[bot] opened this issue 9 months ago • 0 comments
trafficstars

The event bus publisher has an extra JSON.stringify statement that causes consumers to perform double JSON.parse. This affects multiple components including the VC Engine library and other engines.

References

  • PR discussion: https://github.com/alkem-io/virtual-contributor-ingest-space/pull/64#discussion_r1925172934
  • Code location: https://github.com/alkem-io/server/blob/ea039ae45ea61f6941eda564bd124cff452f83f7/src/services/infrastructure/event-bus/publisher.ts#L22

Impact

  • Requires double JSON.parse in consumers
  • Affects VC Engine library and other engines
  • Makes the code harder to understand and maintain

Required Changes

  1. Remove the extra JSON.stringify in the event bus publisher
  2. Update VC Engine library to handle the change
  3. Update other engines to handle the change

coderabbitai[bot] avatar Jan 23 '25 14:01 coderabbitai[bot]