·3 min read

From the Community and for the Community: FIFO, Parallelism, Batch

Sancar KoyunluSancar KoyunluSenior Software Engineer @Upstash

Hey there, wonderful members of our Qstash community! We've had quite a busy month, and we're thrilled to share some updates with you all. Your voices and requests have been heard loud and clear, and we've been hard at work making Qstash even better for everyone.

Ordered Delivery and Smarter Concurrency Control

Ever wished for ordered delivery and the ability to limit concurrency to prevent overloading your endpoints? You're not alone! These features have been highly requested in our Discord channel, and we're delighted to announce that they're now part of QStash.

Community

Implementing these features took some time, but we wanted to ensure they were both reliable and user-friendly.

Here,at last, introducing our latest API addition: QStash Queue!

Ordered Delivery: Keeping Things in Line

With QStash Queue, we've introduced ordered delivery by default. This means your messages will be queued and sent one by one, ensuring a smooth flow of data. Even if one message encounters an issue, like an unresponsive endpoint or an error, it will be retried until successful or moved to DLQ. During all these, all messages will wait patiently.

Setting up ordered delivery is as simple as choosing a queue name:

curl -XPOST -H 'Authorization: Bearer XXX' -H "Content-type: application/json" \
  'https://qstash.upstash.io/v2/enqueue/MY_QUEUE/https://example.com' -d {"data"}
curl -XPOST -H 'Authorization: Bearer XXX' -H "Content-type: application/json" \
  'https://qstash.upstash.io/v2/enqueue/MY_QUEUE/https://example.com' -d {"data"}

See the documentation for more details

Parallelism: Finding the Perfect Balance

Need a bit of parallelism but want to keep it in check? QStash Queue lets you configure the parallelism level to your liking:

curl -XPOST -H 'Authorization: Bearer XXX' \
  'https://qstash.upstash.io/v2/queue/ -d {"queue": "MY_QUEUE", "parallelism": 10}
curl -XPOST -H 'Authorization: Bearer XXX' \
  'https://qstash.upstash.io/v2/queue/ -d {"queue": "MY_QUEUE", "parallelism": 10}

Checkout our documentation for more.

Batch Processing: Efficiency at its Best

Another highly requested feature was batch processing, aimed at boosting performance. Now, you can send batches of messages effortlessly. You can even combine topics and queues with batching:

curl -XPOST https://qstash.upstash.io/v2/batch -H 'Authorization: Bearer XXX'  -H "Content-type: application/json" \
    -d '
     [
      {
        "destination": "https://example.com/destination1"
        "topic" : myTopic, 
        "body" : "message" 
      },
      {
        "destination": "https://example.com/destination2"
      },
      {
        "destination": "https://example.com/destination2"
        "queue": "MY_QUEUE"
      }
     ]'
curl -XPOST https://qstash.upstash.io/v2/batch -H 'Authorization: Bearer XXX'  -H "Content-type: application/json" \
    -d '
     [
      {
        "destination": "https://example.com/destination1"
        "topic" : myTopic, 
        "body" : "message" 
      },
      {
        "destination": "https://example.com/destination2"
      },
      {
        "destination": "https://example.com/destination2"
        "queue": "MY_QUEUE"
      }
     ]'

For more details, see the related documentation

What's on the Horizon?

But wait, there's more! We've got a bunch of exciting ideas in the pipeline, along with some fresh faces joining our team to help bring them to life:

  • Revamping the UI for a more user-friendly experience.
  • Considering supercharging DLQ and LOGS with advanced filtering options to both UI and Rest API.
  • Adding more insightful content to schedules, both in the UI and Rest API.
  • Creating a dedicated space for Queues, because they deserve it!
  • And of course, a few surprises up our sleeves that we're keeping under wraps for now.

If you're part of the QStash community, we want to hear from you! Join us on Discord to share your thoughts, ideas, and any challenges you're facing. We're here to listen and deliver solutions tailored to your needs.

And hey, don't forget to stay in the loop with all our latest features and updates by following us on Twitter!

Let's keep making QStash better together. See you in the community!