examples icon indicating copy to clipboard operation
examples copied to clipboard

Add ElastiCache (Valkey) message queue template

Open vasigorc opened this issue 1 year ago • 7 comments

Description

Adds a template demonstrating AWS ElastiCache integration for message queue functionality using Redis Streams.

What this template shows

  • Message production to Redis Streams
  • Consumer group message consumption with XREADGROUP and XAUTOCLAIM
  • Message acknowledgement and pending list management
  • Contact form to message processor workflow

Type of Change

  • [x] New Example
  • [ ] Example updates (Bug fixes, new features, etc.)
  • [ ] Other (changes to the codebase, but not to examples)

Simple demo flow looks like this:

https://github.com/user-attachments/assets/fdacfaca-fd49-487e-aa2a-1bb30d6d2a5b

New Example Checklist

  • [x] 🛫 npm run new-example was used to create the example
  • [ ] 📚 The template wasn't used but I carefuly read the Adding a new example steps and implemented them in the example
  • [ ] 📱 Is it responsive? Are mobile and tablets considered?

vasigorc avatar Nov 26 '25 17:11 vasigorc

@vasigorc is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Nov 26 '25 17:11 vercel[bot]

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mintlify-docs-rewrite Error Error Jul 14, 2026 7:46pm

vercel[bot] avatar Mar 23 '26 18:03 vercel[bot]

Deployment failed with the following error:

The `vercel.ts` schema validation failed with the following message: `rewrites[0]` missing required property `destination`

Learn More: https://vercel.com/docs/concepts/projects/project-configuration

vercel[bot] avatar Mar 23 '26 18:03 vercel[bot]

I'm noticing some other issues, rectifying along with addressing the review comments above.

Jonathan-Improving avatar May 07 '26 16:05 Jonathan-Improving

Hey @vasigorc 👋

Minor suggestion: could you add clientName: "vercel_message_queue_client" to the GlideClient.createClient() config in app/api/messages/route.ts? This sends a CLIENT SETNAME command on connection, making the connection identifiable in CLIENT LIST and monitoring dashboards — good practice to demonstrate in a template since users will copy this pattern.

const client = await GlideClient.createClient({
    addresses: [{host, port}],
    requestTimeout: 5000,
    clientName: "vercel_message_queue_client",
});

atao2004 avatar May 29 '26 16:05 atao2004

Hey @vasigorc 👋

Minor suggestion: could you add clientName: "vercel_message_queue_client" to the GlideClient.createClient() config in app/api/messages/route.ts? This sends a CLIENT SETNAME command on connection, making the connection identifiable in CLIENT LIST and monitoring dashboards — good practice to demonstrate in a template since users will copy this pattern.

const client = await GlideClient.createClient({
    addresses: [{host, port}],
    requestTimeout: 5000,
    clientName: "vercel_message_queue_client",
});

Hi @atao2004 — good catch, agree it's a sensible pattern to show in a template. I've opened Bit-Quill/examples#2 against this PR's branch with the change plus a small regression test asserting createClient is called with clientName: "vercel_message_queue_client". Once @jonathanneufeld merges it, the update will roll into this PR. Thanks for the review!

vasigorc avatar May 29 '26 17:05 vasigorc

@plmrry can you please close this PR as duplicate https://github.com/vercel/examples/pull/1533 has been merged.

mykola-pereyma avatar Jul 27 '26 22:07 mykola-pereyma

Duplicated and merged in #1533 by a vercelian (me) for security reasons.

plmrry avatar Jul 27 '26 22:07 plmrry