Menu

Chat SDK now supports concurrent message handling - Vercel
📰
0

Chat SDK now supports concurrent message handling - Vercel

Vercel News·Malte Ubl·4 days ago
#BJjfADc7
Reading 0:00
15s threshold

Chat SDK now lets you control what happens when a new message arrives before a previous one finishes processing, with the new concurrency option for the Chat class.

const bot = new Chat({

concurrency: {

strategy: "queue",

maxQueueSize: 20,

onQueueFull: "drop-oldest",

queueEntryTtlMs: 60_000,

},

// ...

});

Multiple options are supported to customize your concurrency strategy.

Four strategies are available:

  • drop (default): discards incoming messages

  • queue: processes the latest message after the handler finishes

  • debounce: waits for a pause in conversation, processes only the final message

  • concurrent: processes every message immediately, no locking

Read the documentation to get started.

The Complete Guide to Chat SDK

Learn how Chat SDK works end-to-end: from core concepts to building your first bot to deploying it across Slack, Teams, and more.

Read the guide

Read More