By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
10alert.com10alert.com10alert.com
  • Threats
    • WordPress ThreatsDanger
    Threats
    A cyber or cybersecurity threat is a malicious act that seeks to damage data, steal data, or disrupt digital life in general. Cyber threats include…
    Show More
    Top News
    GoTrim botnet hacks WordPress sites – Hacker
    GoTrim botnet hacks WordPress sites – Hacker
    10 months ago
    Wordfence Intelligence CE Weekly Vulnerability Report (Feb 6, 2023 to Feb 12, 2023)
    Wordfence Intelligence CE Weekly Vulnerability Report (Feb 6, 2023 to Feb 12, 2023)
    8 months ago
    Wordfence Firewall Blocks Bizarre Large-Scale XSS Campaign
    Wordfence Firewall Blocks Bizarre Large-Scale XSS Campaign
    4 months ago
    Latest News
    Know your Malware – A Beginner’s Guide to Encoding Techniques Used to Obfuscate Malware
    7 hours ago
    Beware of scammers! Dangerous apps in the App Store
    3 days ago
    How To Limit Login Attempts on WordPress (+ Should You?)
    4 days ago
    Wordfence Intelligence Weekly WordPress Vulnerability Report (September 18, 2023 to September 24, 2023)
    4 days ago
  • Fix
    Fix
    Troubleshooting guide you need when errors, bugs or technical glitches might ruin your digital experience.
    Show More
    Top News
    How To Configure Cloudflare To Maximize WordPress Speed + Security
    12 months ago
    Windows 11 build 25179 rolls out in the Dev Channel
    12 months ago
    How to set a static IP address on Windows 11
    12 months ago
    Latest News
    How automatically delete unused files from my Downloads folder?
    8 months ago
    Now you can speed up any video in your browser
    8 months ago
    How to restore access to a file after EFS or view it on another computer?
    8 months ago
    18 Proven Tips to Speed Up Your WordPress Site and Improve SEO | 2023 Guide
    9 months ago
  • How To
    How ToShow More
    Xbox celebrates gaming and disability community
    6 hours ago
    A Socket API that works across JavaScript runtimes — announcing a WinterCG spec and Node.js implementation of connect()
    A Socket API that works across JavaScript runtimes — announcing a WinterCG spec and Node.js implementation of connect()
    6 hours ago
    Running Serverless Puppeteer with Workers and Durable Objects
    Running Serverless Puppeteer with Workers and Durable Objects
    6 hours ago
    everything we announced — plus an AI-powered opportunity for startups
    everything we announced — plus an AI-powered opportunity for startups
    6 hours ago
    Easily manage AI crawlers with our new bot categories
    Easily manage AI crawlers with our new bot categories
    1 day ago
  • News
    News
    This category of resources includes the latest technology news and updates, covering a wide range of topics and innovations in the tech industry. From new…
    Show More
    Top News
    Windows Search Hacks
    12 months ago
    How do I buy from the App Store now?
    12 months ago
    How to move a user profile to another drive in Windows?
    12 months ago
    Latest News
    How to create Copilot desktop shortcut on Windows 11
    15 hours ago
    How to enable extensions for Google Bard AI
    3 days ago
    Window 11 Copilot: 10 Best tips and tricks
    3 days ago
    How to create AI images with Cocreator on Paint for Windows 11
    4 days ago
  • Glossary
  • My Bookmarks
Reading: send, list, and ack messages
Share
Notification Show More
Aa
Aa
10alert.com10alert.com
  • Threats
  • Fix
  • How To
  • News
  • Glossary
  • My Bookmarks
  • Threats
    • WordPress ThreatsDanger
  • Fix
  • How To
  • News
  • Glossary
  • My Bookmarks
Follow US
Apps

send, list, and ack messages

Andra Smith
Last updated: 11 August
Andra Smith 2 months ago
Share
9 Min Read

Debug Queues from the dash: Send, list, and ack messages

Contents
Sending messagesListing messagesNew Queues debugging features — available today!

Today, August 11, 2023, we are excited to announce a new debugging workflow for Cloudflare Queues. Customers using Cloudflare Queues can now send, list, and acknowledge messages directly from the Cloudflare dashboard, enabling a more user-friendly way to interact with Queues. Though it can be difficult to debug asynchronous systems, it’s now easy to examine a queue’s state and test the full flow of information through a queue.

With guaranteed delivery, message batching, consumer concurrency, and more, Cloudflare Queues is a powerful tool to connect services reliably and efficiently. Queues integrate deeply with the existing Cloudflare Workers ecosystem, so developers can also leverage our many other products and services. Queues can be bound to producer Workers, which allow Workers to send messages to a queue, and to consumer Workers, which pull messages from the queue.

We’ve received feedback that while Queues are effective and performant, customers find it hard to debug them. After a message is sent to a queue from a producer worker, there’s no way to inspect the queue’s contents without a consumer worker. The limited transparency was frustrating, and the need to write a skeleton worker just to debug a queue was high-friction.

Now, with the addition of new features to send, list, and acknowledge messages in the Cloudflare dashboard, we’ve unlocked a much simpler debugging workflow. You can send messages from the Cloudflare dashboard to check if their consumer worker is processing messages as expected, and verify their producer worker’s output by previewing messages from the Cloudflare dashboard.

The pipeline of messages through a queue is now more open and easily examined. Users just getting started with Cloudflare Queues also no longer have to write code to send their first message: it’s as easy as clicking a button in the Cloudflare dashboard.

Sending messages

Both features are located in a new Messages tab on any queue’s page. Scroll to Send message to open the message editor.

From here, you can write a message and click Send message to send it to your queue. You can also choose to send JSON, which opens a JSON editor with syntax highlighting and formatting. If you’ve saved your message as a file locally, you can drag-and-drop the file over the textbox or click Upload a file to send it as well.

This feature makes testing changes in a queue’s consumer worker much easier. Instead of modifying an existing producer worker or creating a new one, you can send one-off messages. You can also easily verify if your queue consumer settings are behaving as expected: send a few messages from the Cloudflare dashboard to check that messages are batched as desired.

Behind the scenes, this feature leverages the same pipeline that Cloudflare Workers uses to send messages, so you can be confident that your message will be processed as if sent via a Worker.

Listing messages

On the same page, you can also inspect the messages you just sent from the Cloudflare dashboard. On any queue’s page, open the Messages tab and scroll to Queued messages.

If you have a consumer attached to your queue, you’ll fetch a batch of messages of the same size as configured in your queue consumer settings by default, to provide a realistic view of what would be sent to your consumer worker. You can change this value to preview messages one-at-a-time or even in much larger batches than would be normally sent to your consumer.

After fetching a batch of messages, you can preview the message’s body, even if you’ve sent raw bytes or a JavaScript object supported by the structured clone algorithm. You can also check the message’s timestamp; number of retries; producer source, such as a Worker or the Cloudflare dashboard; and type, such as text or JSON. This information can help you debug the queue’s current state and inspect where and when messages originated from.

The batch of messages that’s returned is the same batch that would be sent to your consumer Worker on its next run. Messages are even guaranteed to be in the same order on the UI as sent to your consumer. This feature grants you a looking glass view into your queue, matching the exact behavior of a consumer worker. This works especially well for debugging messages sent by producer workers and verifying queue consumer settings.

Listing messages from the Cloudflare dashboard also doesn’t interfere with an existing connected consumer. Messages that are previewed from the Cloudflare dashboard stay in the queue and do not have their number of retries affected.

This ‘peek’ functionality is unique to Cloudflare Queues: Amazon SQS bumps the number of retries when a message is viewed, and RabbitMQ retries the message, forcing it to the back of the queue. Cloudflare Queues’ approach means that previewing messages does not have any unintended side effects on your queue and your consumer. If you ever need to debug queues used in production, don’t worry – listing messages is entirely safe.

As well, you can now remove messages from your queue from the Cloudflare dashboard. If you’d like to remove a message or clear the full batch from the queue, you can select messages to acknowledge. This is useful for preventing buggy messages from being repeatedly retried without having to write a dummy consumer.

You might have noticed that this message preview feature operates similarly to another popular feature request for an HTTP API to pull batches of messages from a queue. Customers will be able to make a request to the API endpoint to receive a batch of messages, then acknowledge the batch to remove the messages from the queue. Under the hood, both listing messages from the Cloudflare dashboard and HTTP Pull/Ack use a common infrastructure, and HTTP Pull/Ack is coming very soon!

These debugging features have already been invaluable for testing example applications we’ve built on Cloudflare Queues. At an internal hack week event, we built a web crawler with Queues as an example use-case (check out the tutorial here!). During development, we took advantage of this user-friendly way to send messages to quickly iterate on a consumer worker before we built a producer worker. As well, when we encountered bugs in our consumer worker, the message previews were handy to realize we were sending malformed messages, and the message acknowledgement feature gave us an easy way to remove them from the queue.

New Queues debugging features — available today!

The Cloudflare dashboard features announced today provide more transparency into your application and enable more user-friendly debugging.

All Cloudflare Queues customers now have access to these new debugging tools. And if you’re not already using Queues, you can join the Queues Open Beta by enabling Cloudflare Queues here.
Get started on Cloudflare Queues with our guide and create your next app with us today! Your first message is a single click away.


Source: cloudflare.com

Translate this article

TAGGED: Cloudflare
Andra Smith August 11, 2023 August 11, 2023
Share This Article
Facebook Twitter Reddit Telegram Email Copy Link Print

STAY CONECTED

24.8k Followers Like
253.9k Followers Follow
33.7k Subscribers Subscribe
124.8k Members Follow

LAST 10 ALERT

Xbox celebrates gaming and disability community
Windows 6 hours ago
A Socket API that works across JavaScript runtimes — announcing a WinterCG spec and Node.js implementation of connect()
A Socket API that works across JavaScript runtimes — announcing a WinterCG spec and Node.js implementation of connect()
Apps 6 hours ago
Running Serverless Puppeteer with Workers and Durable Objects
Running Serverless Puppeteer with Workers and Durable Objects
Apps 6 hours ago
everything we announced — plus an AI-powered opportunity for startups
everything we announced — plus an AI-powered opportunity for startups
Apps 6 hours ago
Know your Malware – A Beginner’s Guide to Encoding Techniques Used to Obfuscate Malware
Know your Malware – A Beginner’s Guide to Encoding Techniques Used to Obfuscate Malware
Wordpress Threats 10 hours ago

You Might Also Like

A Socket API that works across JavaScript runtimes — announcing a WinterCG spec and Node.js implementation of connect()
Apps

A Socket API that works across JavaScript runtimes — announcing a WinterCG spec and Node.js implementation of connect()

6 hours ago
Running Serverless Puppeteer with Workers and Durable Objects
Apps

Running Serverless Puppeteer with Workers and Durable Objects

6 hours ago
everything we announced — plus an AI-powered opportunity for startups
Apps

everything we announced — plus an AI-powered opportunity for startups

6 hours ago
Easily manage AI crawlers with our new bot categories
Apps

Easily manage AI crawlers with our new bot categories

1 day ago
Show More

Related stories

How to install September 2023 update with 23H2 features for Windows 11
How to upgrade to Windows 11 23H2 with Installation Assistant
How to get the latest Windows 11 innovations
How to blur image background in Photos for Windows 11
How to download official Windows 11 23H2 ISO file
PHP Object Injection Vulnerability in Flatsome Theme

10 New Stories

How to create Copilot desktop shortcut on Windows 11
Easily manage AI crawlers with our new bot categories
Cloudflare is free of CAPTCHAs; Turnstile is free for everyone
Post-quantum cryptography goes GA
Detecting zero-days before zero-day
See what threats are lurking in your Office 365 with Cloudflare Email Retro Scan
Previous Next
Hot News
Xbox celebrates gaming and disability community
A Socket API that works across JavaScript runtimes — announcing a WinterCG spec and Node.js implementation of connect()
Running Serverless Puppeteer with Workers and Durable Objects
everything we announced — plus an AI-powered opportunity for startups
Know your Malware – A Beginner’s Guide to Encoding Techniques Used to Obfuscate Malware
10alert.com10alert.com
Follow US
© 10 Alert Network. All Rights Reserved.
  • Privacy Policy
  • Contact
  • Customize Interests
  • My Bookmarks
  • Glossary
Go to mobile version
adbanner
AdBlock Detected
Our site is an advertising supported site. Please whitelist to support our site.
Okay, I'll Whitelist
Welcome Back!

Sign in to your account

Lost your password?