So I'm running into an issue, if I have the same event fire multiple times in quick succession, with promises nested, My sessions are overlapped and my first event call is now having data from my second or third call.
Essentially here is my poc I'm working on. Note that logger.js is just an exported winton logger with custom levels equal to the levels array.
This next file, test.js is the file that I am simulating an event I receive from kafka. The id property is what I am using to track my logs with. I am using message as a payload test, sometimes I may have more than just an id and a message.
So I'm running into an issue, if I have the same event fire multiple times in quick succession, with promises nested, My sessions are overlapped and my first event call is now having data from my second or third call.
Essentially here is my poc I'm working on. Note that logger.js is just an exported winton logger with custom levels equal to the levels array.
This next file,
test.js
is the file that I am simulating an event I receive from kafka. Theid
property is what I am using to track my logs with. I am usingmessage
as a payload test, sometimes I may have more than just anid
and amessage
.Currently it outputs:
However, I am expecting this:
Essentially,
1a2a3a
should be paired withHello Earth!
and2s3s4s
should be paired with 'Hello Venus!`