Buffered queue race
Solution: Check if a "processing" task is already scheduled. If so, cancel the existing task, concatenate the new message, and reschedule the task.
Expectation: Convex should internally handle race conditions in the scheduler, ensuring that no more than one processing task is ever scheduled at a time.
Issue: When messages arrive at a slow pace, everything works as expected. However, when messages arrive simultaneously, a race condition occurs, resulting in multiple scheduled tasks.
Test code:
