CINXE.COM
How Queues Works · Cloudflare Queues
<!doctype html> <html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-bguv2lll"> <head> <base href="https://developers.cloudflare.com/queues/reference/how-queues-works/"> <script type="module" src="/_astro/Head.astro_astro_type_script_index_0_lang.BN2-VQBT.js"></script> <script type="module" src="/_astro/Head.astro_astro_type_script_index_1_lang.SiXpPIU5.js"></script> <script type="module" src="/_astro/Head.astro_astro_type_script_index_2_lang.DawEFJ7Z.js"></script> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>How Queues Works · Cloudflare Queues</title> <link rel="canonical" href="https://developers.cloudflare.com/queues/reference/how-queues-works/"> <link rel="sitemap" href="/sitemap-index.xml"> <link rel="shortcut icon" href="/favicon.png" type="image/png"> <meta name="generator" content="Astro v5.2.1"> <meta name="generator" content="Starlight v0.31.1"> <meta property="og:type" content="article"> <meta property="og:url" content="https://developers.cloudflare.com/queues/reference/how-queues-works/"> <meta property="og:locale" content="en"> <meta property="og:description" content="Cloudflare Queues is a flexible messaging queue that allows you to queue messages for asynchronous processing. Message queues are great at decoupling components of applications, like the checkout and order fulfillment services for an e-commerce site. Decoupled services are easier to reason about, deploy, and implement, allowing you to ship features that delight your customers without worrying about synchronizing complex deployments. Queues also allow you to batch and buffer calls to downstream services and APIs."> <meta property="og:site_name" content="Cloudflare Docs"> <meta name="twitter:card" content="summary_large_image"> <meta name="description" content="Cloudflare Queues is a flexible messaging queue that allows you to queue messages for asynchronous processing. Message queues are great at decoupling components of applications, like the checkout and order fulfillment services for an e-commerce site. Decoupled services are easier to reason about, deploy, and implement, allowing you to ship features that delight your customers without worrying about synchronizing complex deployments. Queues also allow you to batch and buffer calls to downstream services and APIs."> <meta property="og:title" content="How Queues Works · Cloudflare Queues"> <meta name="pcx_product" content="Queues"> <meta name="algolia_product_filter" content="Queues"> <meta name="pcx_content_group" content="Developer platform"> <meta name="pcx_content_type" content="concept"> <meta name="algolia_content_type" content="concept"> <meta name="image" content="https://developers.cloudflare.com/dev-products-preview.png"> <meta name="og:image" content="https://developers.cloudflare.com/dev-products-preview.png"> <meta name="twitter:image" content="https://developers.cloudflare.com/dev-products-preview.png"> <script> window.StarlightThemeProvider = (() => { const storedTheme = typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme'); const theme = storedTheme || (window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'); document.documentElement.dataset.theme = theme === 'light' ? 'light' : 'dark'; return { updatePickers(theme = storedTheme || 'auto') { document.querySelectorAll('starlight-theme-select').forEach((picker) => { const select = picker.querySelector('select'); if (select) select.value = theme; /** @type {HTMLTemplateElement | null} */ const tmpl = document.querySelector(`#theme-icons`); const newIcon = tmpl && tmpl.content.querySelector('.' + theme); if (newIcon) { const oldIcon = picker.querySelector('svg.label-icon'); if (oldIcon) { oldIcon.replaceChildren(...newIcon.cloneNode(true).childNodes); } } }); }, }; })(); </script> <template id="theme-icons"> <svg aria-hidden="true" class="light astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M5 12a1 1 0 0 0-1-1H3a1 1 0 0 0 0 2h1a1 1 0 0 0 1-1Zm.64 5-.71.71a1 1 0 0 0 0 1.41 1 1 0 0 0 1.41 0l.71-.71A1 1 0 0 0 5.64 17ZM12 5a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1a1 1 0 0 0 1 1Zm5.66 2.34a1 1 0 0 0 .7-.29l.71-.71a1 1 0 1 0-1.41-1.41l-.66.71a1 1 0 0 0 0 1.41 1 1 0 0 0 .66.29Zm-12-.29a1 1 0 0 0 1.41 0 1 1 0 0 0 0-1.41l-.71-.71a1.004 1.004 0 1 0-1.43 1.41l.73.71ZM21 11h-1a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2Zm-2.64 6A1 1 0 0 0 17 18.36l.71.71a1 1 0 0 0 1.41 0 1 1 0 0 0 0-1.41l-.76-.66ZM12 6.5a5.5 5.5 0 1 0 5.5 5.5A5.51 5.51 0 0 0 12 6.5Zm0 9a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Zm0 3.5a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1a1 1 0 0 0-1-1Z" /> </svg> <svg aria-hidden="true" class="dark astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M21.64 13a1 1 0 0 0-1.05-.14 8.049 8.049 0 0 1-3.37.73 8.15 8.15 0 0 1-8.14-8.1 8.59 8.59 0 0 1 .25-2A1 1 0 0 0 8 2.36a10.14 10.14 0 1 0 14 11.69 1 1 0 0 0-.36-1.05Zm-9.5 6.69A8.14 8.14 0 0 1 7.08 5.22v.27a10.15 10.15 0 0 0 10.14 10.14 9.784 9.784 0 0 0 2.1-.22 8.11 8.11 0 0 1-7.18 4.32v-.04Z" /> </svg> <svg aria-hidden="true" class="auto astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z" /> </svg> </template> <link rel="stylesheet" href="/_astro/print.BL8QyxEA.css" media="print"> <link rel="stylesheet" href="/_astro/props.DH3lyL-U.css"> <style>*,*:before,*:after{box-sizing:border-box}*{margin:0}html{color-scheme:dark;accent-color:var(--sl-color-accent)}html[data-theme=light]{color-scheme:light}body{font-family:var(--__sl-font);line-height:var(--sl-line-height);-webkit-font-smoothing:antialiased;color:var(--sl-color-text);background-color:var(--sl-color-bg)}input,button,textarea,select{font:inherit}p,h1,h2,h3,h4,h5,h6,code{overflow-wrap:anywhere}code{font-family:var(--__sl-font-mono)} :root{--astro-code-foreground: var(--sl-color-white);--astro-code-background: var(--sl-color-gray-6);--astro-code-token-constant: var(--sl-color-blue-high);--astro-code-token-string: var(--sl-color-green-high);--astro-code-token-comment: var(--sl-color-gray-2);--astro-code-token-keyword: var(--sl-color-purple-high);--astro-code-token-parameter: var(--sl-color-red-high);--astro-code-token-function: var(--sl-color-red-high);--astro-code-token-string-expression: var(--sl-color-green-high);--astro-code-token-punctuation: var(--sl-color-gray-2);--astro-code-token-link: var(--sl-color-blue-high)} html:not([data-has-toc]){--sl-content-width: 67.5rem} .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.sl-hidden{display:none}.sl-flex{display:flex}.sl-block{display:block}@media (min-width: 50rem){.md\:sl-hidden{display:none}.md\:sl-flex{display:flex}.md\:sl-block{display:block}}@media (min-width: 72rem){.lg\:sl-hidden{display:none}.lg\:sl-flex{display:flex}.lg\:sl-block{display:block}}[data-theme=light] .light\:sl-hidden,[data-theme=dark] .dark\:sl-hidden{display:none}[dir=rtl] .rtl\:flip:not(:where([dir=rtl] [dir=ltr] *)){transform:scaleX(-1)} .sl-banner:where(.astro-laz2plt2){--__sl-banner-text: var(--sl-color-banner-text, var(--sl-color-text-invert));padding:var(--sl-nav-pad-y) var(--sl-nav-pad-x);background-color:var(--sl-color-banner-bg, var(--sl-color-bg-accent));color:var(--__sl-banner-text);line-height:var(--sl-line-height-headings);text-align:center;text-wrap:balance;box-shadow:var(--sl-shadow-sm)}.sl-banner:where(.astro-laz2plt2) a{color:var(--__sl-banner-text)} .content-panel:where(.astro-7nkwcw3z){padding:1.5rem var(--sl-content-pad-x)}.content-panel:where(.astro-7nkwcw3z)+.content-panel:where(.astro-7nkwcw3z){border-top:1px solid var(--sl-color-hairline)}.sl-container:where(.astro-7nkwcw3z){max-width:var(--sl-content-width)}.sl-container:where(.astro-7nkwcw3z)>*+*{margin-top:1.5rem}@media (min-width: 72rem){.sl-container:where(.astro-7nkwcw3z){margin-inline:var(--sl-content-margin-inline, auto)}} p:where(.astro-opzsrvew){border:1px solid var(--sl-color-orange);padding:.75em 1em;background-color:var(--sl-color-orange-low);color:var(--sl-color-orange-high);width:-moz-max-content;width:max-content;max-width:100%;align-items:center;gap:.75em;font-size:var(--sl-text-body-sm);line-height:var(--sl-line-height-headings)} #ot-sdk-btn:where(.astro-hwxmvrii).ot-sdk-show-settings{border:none!important;color:inherit!important;font-size:inherit!important;line-height:inherit!important;padding:inherit!important;font-family:var(--sl-font-family)!important;background-color:inherit!important}#ot-sdk-btn:where(.astro-hwxmvrii).ot-sdk-show-settings:hover{background-color:inherit!important} a:where(.astro-eez2twj6){gap:.5rem;align-items:center;text-decoration:none;color:var(--sl-color-gray-3)}a:where(.astro-eez2twj6):hover{color:var(--sl-color-white)} .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1} footer{flex-direction:column-reverse!important}.meta{margin-top:0!important}.pagination-links{margin-top:3rem!important}.feedback-prompt:where(.astro-fxeopwe4){h2{color:var(--sl-color-white);font-size:var(--sl-text-h5);font-weight:600;line-height:var(--sl-line-height-headings);margin-bottom:.5rem}}@media (min-width: 72rem){html[data-has-toc]{.feedback-prompt{display:none}}}.bleed:where(.astro-fxeopwe4){box-shadow:0 0 0 100vmax #001c43!important;clip-path:inset(0 -100vmax)} </style> <link rel="stylesheet" href="/_astro/markdown.BRpEnTxT.css"> <style>.pagination-links:where(.astro-u2l5gyhi){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(18rem,100%),1fr));gap:1rem}a:where(.astro-u2l5gyhi){display:flex;align-items:center;justify-content:flex-start;gap:.5rem;width:100%;flex-basis:calc(50% - .5rem);flex-grow:1;border:1px solid var(--sl-color-gray-5);border-radius:.5rem;padding:1rem;text-decoration:none;color:var(--sl-color-gray-2);box-shadow:var(--sl-shadow-md);overflow-wrap:anywhere}:where(.astro-u2l5gyhi)[rel=next]{justify-content:end;text-align:end;flex-direction:row-reverse}a:where(.astro-u2l5gyhi):hover{border-color:var(--sl-color-gray-2)}.link-title:where(.astro-u2l5gyhi){color:var(--sl-color-white);font-size:var(--sl-text-2xl);line-height:var(--sl-line-height-headings)}svg:where(.astro-u2l5gyhi){flex-shrink:0} </style> <link rel="stylesheet" href="/_astro/modal.BU9zpcET.css"> <style>:root{--docsearch-primary-color: var(--sl-color-text-accent);--docsearch-text-color: var(--sl-color-text);--docsearch-spacing: 12px;--docsearch-icon-stroke-width: 1.4;--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-muted-color: var(--sl-color-gray-3);--docsearch-container-background: var(--sl-color-backdrop-overlay);--docsearch-modal-width: 560px;--docsearch-modal-height: 600px;--docsearch-modal-background: var(--sl-color-gray-6);--docsearch-modal-shadow: var(--sl-shadow-lg);--docsearch-searchbox-height: 56px;--docsearch-searchbox-background: var(--sl-color-gray-7, var(--sl-color-gray-6));--docsearch-searchbox-focus-background: var(--sl-color-black);--docsearch-searchbox-shadow: inset 0 0 0 1px var(--docsearch-primary-color);--docsearch-hit-height: 56px;--docsearch-hit-color: var(--sl-color-white);--docsearch-hit-active-color: var(--sl-color-black);--docsearch-hit-background: var(--sl-color-black);--docsearch-key-gradient: linear-gradient( var(--sl-color-bg-inline-code) 0%, var(--sl-color-bg-inline-code) 100% );--docsearch-footer-height: 44px;--docsearch-footer-background: var(--sl-color-black);--docsearch-footer-shadow: 0 -1px 0 0 var(--sl-color-hairline-light)}.DocSearch-Modal{border:1px solid var(--sl-color-hairline-light)}.DocSearch-Logo svg *{fill:var(--docsearch-muted-color)} footer:where(.astro-3yyafb3n){flex-direction:column;gap:1.5rem}.meta:where(.astro-3yyafb3n){gap:.75rem 3rem;justify-content:space-between;flex-wrap:wrap;margin-top:3rem;font-size:var(--sl-text-sm);color:var(--sl-color-gray-3)}.meta:where(.astro-3yyafb3n)>p:only-child{margin-inline-start:auto}.kudos:where(.astro-3yyafb3n){align-items:center;gap:.5em;margin:1.5rem auto;font-size:var(--sl-text-xs);text-decoration:none;color:var(--sl-color-gray-3)}.kudos:where(.astro-3yyafb3n) svg{color:var(--sl-color-orange)}.kudos:where(.astro-3yyafb3n):hover{color:var(--sl-color-white)} .hero:where(.astro-opidluyl){display:grid;align-items:center;gap:1rem;padding-bottom:1rem}.hero:where(.astro-opidluyl)>img:where(.astro-opidluyl),.hero:where(.astro-opidluyl)>.hero-html:where(.astro-opidluyl){-o-object-fit:contain;object-fit:contain;width:min(70%,20rem);height:auto;margin-inline:auto}.stack:where(.astro-opidluyl){flex-direction:column;gap:clamp(1.5rem,calc(1.5rem + 1vw),2rem);text-align:center}.copy:where(.astro-opidluyl){flex-direction:column;gap:1rem;align-items:center}a:where(.astro-opidluyl){color:var(--sl-color-white)}h1:where(.astro-opidluyl){font-size:clamp(var(--sl-text-3xl),calc(.25rem + 5vw),var(--sl-text-6xl));line-height:var(--sl-line-height-headings);font-weight:600;color:var(--sl-color-white)}.tagline:where(.astro-opidluyl){font-size:clamp(var(--sl-text-base),calc(.0625rem + 2vw),var(--sl-text-xl));color:var(--sl-color-gray-2)}.actions:where(.astro-opidluyl){gap:1rem 2rem;flex-wrap:wrap;justify-content:center}.copy:where(.astro-opidluyl)>.links:where(.astro-opidluyl){gap:0;flex-direction:row;flex-wrap:wrap}@media (min-width: 50rem){.hero:where(.astro-opidluyl){grid-template-columns:7fr 4fr;gap:3%;padding-block:clamp(2.5rem,calc(1rem + 10vmin),10rem)}.hero:where(.astro-opidluyl)>img:where(.astro-opidluyl),.hero:where(.astro-opidluyl)>.hero-html:where(.astro-opidluyl){order:2;width:min(100%,25rem)}.stack:where(.astro-opidluyl){text-align:start}.copy:where(.astro-opidluyl){align-items:flex-start}.actions:where(.astro-opidluyl){justify-content:flex-start}} .sl-markdown-content:where(.astro-cedpceuv) .heading-wrapper{--icon-size: .75em;--icon-spacing: .25em;line-height:var(--sl-line-height-headings)}.sl-markdown-content:where(.astro-cedpceuv) :not(.heading-wrapper)+:is(.heading-wrapper):not(:where(.not-content *)){margin-top:1.5em}.sl-markdown-content:where(.astro-cedpceuv) .level-h2{font-size:var(--sl-text-h2)}.sl-markdown-content:where(.astro-cedpceuv) .level-h3{font-size:var(--sl-text-h3)}.sl-markdown-content:where(.astro-cedpceuv) .level-h4{font-size:var(--sl-text-h4)}.sl-markdown-content:where(.astro-cedpceuv) .level-h5{font-size:var(--sl-text-h5)}.sl-markdown-content:where(.astro-cedpceuv) .heading-wrapper>:first-child{margin-inline-end:calc(var(--icon-size) + var(--icon-spacing));display:inline}.sl-markdown-content:where(.astro-cedpceuv) .anchor-link{margin-inline-start:calc(-1 * (var(--icon-size)));color:var(--sl-color-gray-3)}.sl-markdown-content:where(.astro-cedpceuv) .anchor-link:hover,.sl-markdown-content:where(.astro-cedpceuv) .anchor-link:focus{color:var(--sl-color-text-accent)}.sl-markdown-content:where(.astro-cedpceuv) .heading-wrapper svg{display:inline;width:var(--icon-size)}.sl-markdown-content:where(.astro-cedpceuv) .anchor-link .sr-only{-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (hover: hover){.sl-markdown-content:where(.astro-cedpceuv) .anchor-link{opacity:0}}.sl-markdown-content:where(.astro-cedpceuv) .heading-wrapper:hover>.anchor-link,.sl-markdown-content:where(.astro-cedpceuv) .anchor-link:focus{opacity:1}@media (min-width: 95em){.sl-markdown-content:where(.astro-cedpceuv) .heading-wrapper{display:flex;flex-direction:row-reverse;justify-content:flex-end;gap:var(--icon-spacing);margin-inline-start:calc(-1 * (var(--icon-size) + var(--icon-spacing)))}.sl-markdown-content:where(.astro-cedpceuv) .heading-wrapper>:first-child,.sl-markdown-content:where(.astro-cedpceuv) .anchor-link{margin:0}} .page:where(.astro-vrdttmbt){flex-direction:column;min-height:100vh}.header:where(.astro-vrdttmbt){z-index:var(--sl-z-index-navbar);position:fixed;inset-inline-start:0;inset-block-start:0;width:100%;height:var(--sl-nav-height);border-bottom:1px solid var(--sl-color-hairline-shade);padding:var(--sl-nav-pad-y) var(--sl-nav-pad-x);padding-inline-end:var(--sl-nav-pad-x);background-color:var(--sl-color-bg-nav)}[data-has-sidebar] .header:where(.astro-vrdttmbt){padding-inline-end:calc(var(--sl-nav-gap) + var(--sl-nav-pad-x) + var(--sl-menu-button-size))}.sidebar-pane:where(.astro-vrdttmbt){visibility:var(--sl-sidebar-visibility, hidden);position:fixed;z-index:var(--sl-z-index-menu);inset-block:var(--sl-nav-height) 0;inset-inline-start:0;width:100%;background-color:var(--sl-color-black);overflow-y:auto}[aria-expanded=true]~.sidebar-pane:where(.astro-vrdttmbt){--sl-sidebar-visibility: visible}.sidebar-content:where(.astro-vrdttmbt){height:100%;min-height:-moz-max-content;min-height:max-content;padding:1rem var(--sl-sidebar-pad-x) 0;flex-direction:column;gap:1rem}@media (min-width: 50rem){.sidebar-content:where(.astro-vrdttmbt):after{content:"";padding-bottom:1px}}.main-frame:where(.astro-vrdttmbt){padding-top:calc(var(--sl-nav-height) + var(--sl-mobile-toc-height));padding-inline-start:var(--sl-content-inline-start)}@media (min-width: 50rem){[data-has-sidebar] .header:where(.astro-vrdttmbt){padding-inline-end:var(--sl-nav-pad-x)}.sidebar-pane:where(.astro-vrdttmbt){--sl-sidebar-visibility: visible;width:var(--sl-sidebar-width);background-color:var(--sl-color-bg-sidebar);border-inline-end:1px solid var(--sl-color-hairline-shade)}} .DocSearch-Button{display:flex;align-items:center;gap:.5rem;border:0;background-color:transparent;color:var(--sl-color-gray-1);cursor:pointer;height:2.5rem;font-size:var(--sl-text-xl)}.DocSearch-Button-Container{display:contents}.DocSearch-Search-Icon{width:.875em;height:.875em;stroke-width:.125rem}.DocSearch-Button-Placeholder,.DocSearch-Button-Keys,.DocSearch-Button-Key{display:none}@media (min-width: 50rem){sl-doc-search{width:100%}.DocSearch-Button{border:1px solid var(--sl-color-gray-5);border-radius:.5rem;padding-inline-start:.75rem;padding-inline-end:1rem;background-color:var(--sl-color-black);color:var(--sl-color-gray-2);font-size:var(--sl-text-sm);width:100%;max-width:22rem}.DocSearch-Button:hover{border-color:var(--sl-color-gray-2);color:var(--sl-color-white)}.DocSearch-Button-Placeholder,.DocSearch-Button-Keys{display:flex}.DocSearch-Button-Keys{margin-inline-start:auto}.DocSearch-Button-Keys:before{content:"";width:1em;height:1em;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5Zm3 15a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10Z'%3E%3C/path%3E%3Cpath d='M15.293 6.707a1 1 0 1 1 1.414 1.414l-8.485 8.486a1 1 0 0 1-1.414-1.415l8.485-8.485Z'%3E%3C/path%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5Zm3 15a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10Z'%3E%3C/path%3E%3Cpath d='M15.293 6.707a1 1 0 1 1 1.414 1.414l-8.485 8.486a1 1 0 0 1-1.414-1.415l8.485-8.485Z'%3E%3C/path%3E%3C/svg%3E");-webkit-mask-size:100%;mask-size:100%;background-color:currentColor}} [data-mobile-menu-expanded]{overflow:hidden}@media (min-width: 50rem){[data-mobile-menu-expanded]{overflow:auto}} .hero:where(.astro-jbfsktt5){display:grid;align-items:center;gap:1rem;padding-bottom:1rem}.hero:where(.astro-jbfsktt5)>img:where(.astro-jbfsktt5),.hero:where(.astro-jbfsktt5)>.hero-html:where(.astro-jbfsktt5){-o-object-fit:contain;object-fit:contain;width:min(70%,20rem);height:auto;margin-inline:auto}.stack:where(.astro-jbfsktt5){flex-direction:column;gap:clamp(1.5rem,calc(1.5rem + 1vw),2rem);text-align:center}.copy:where(.astro-jbfsktt5){flex-direction:column;gap:1rem;align-items:center}.copy:where(.astro-jbfsktt5)>:where(.astro-jbfsktt5){max-width:50ch}h1:where(.astro-jbfsktt5){font-size:clamp(var(--sl-text-3xl),calc(.25rem + 5vw),var(--sl-text-6xl));line-height:var(--sl-line-height-headings);font-weight:600;color:var(--sl-color-white)}.tagline:where(.astro-jbfsktt5){font-size:clamp(var(--sl-text-base),calc(.0625rem + 2vw),var(--sl-text-xl));color:var(--sl-color-gray-2)}.actions:where(.astro-jbfsktt5){gap:1rem 2rem;flex-wrap:wrap;justify-content:center}@media (min-width: 50rem){.hero:where(.astro-jbfsktt5){grid-template-columns:7fr 4fr;gap:3%;padding-block:clamp(2.5rem,calc(1rem + 10vmin),10rem)}.hero:where(.astro-jbfsktt5)>img:where(.astro-jbfsktt5),.hero:where(.astro-jbfsktt5)>.hero-html:where(.astro-jbfsktt5){order:2;width:min(100%,25rem)}.stack:where(.astro-jbfsktt5){text-align:start}.copy:where(.astro-jbfsktt5){align-items:flex-start}.actions:where(.astro-jbfsktt5){justify-content:flex-start}} dialog:where(.astro-vjux6bgf){background:transparent;border:0;height:100vh;height:100dvh;margin:0;max-height:none;max-width:none;overflow:hidden;padding:0;position:fixed;width:100vw;width:100dvw}dialog:where(.astro-vjux6bgf)::backdrop{background:var(--starlight-image-zoom-backdrop-bg, var(--sl-color-black));opacity:0}.starlight-image-zoom-opened dialog:where(.astro-vjux6bgf)::backdrop{opacity:1}figure:where(.astro-vjux6bgf){cursor:zoom-out;height:100%;position:relative;width:100%}figure:where(.astro-vjux6bgf) figcaption{background-color:color-mix(in srgb,var(--sl-color-bg-nav),transparent 10%);border-top:1px solid var(--sl-color-hairline);cursor:initial;inset:auto 0 0;opacity:0;padding:var(--sl-nav-pad-y) var(--sl-nav-pad-x);position:absolute}@media (prefers-reduced-transparency){figure:where(.astro-vjux6bgf) figcaption{background-color:var(--sl-color-bg-nav)}}.starlight-image-zoom-opened figure:where(.astro-vjux6bgf) figcaption{opacity:1}button:where(.astro-vjux6bgf){cursor:zoom-out;opacity:0;z-index:1}.starlight-image-zoom-opened button:where(.astro-vjux6bgf){opacity:1}@media (prefers-reduced-motion: no-preference){button:where(.astro-vjux6bgf),dialog:where(.astro-vjux6bgf)::backdrop,figure:where(.astro-vjux6bgf) figcaption{transition:opacity var(--starlight-image-zoom-animation-duration)}} button:where(.astro-jif73yzw){position:fixed;top:calc((var(--sl-nav-height) - var(--sl-menu-button-size)) / 2);inset-inline-end:var(--sl-nav-pad-x);z-index:var(--sl-z-index-navbar);border:0;border-radius:50%;width:var(--sl-menu-button-size);height:var(--sl-menu-button-size);padding:.5rem;background-color:var(--sl-color-white);color:var(--sl-color-black);box-shadow:var(--sl-shadow-md);cursor:pointer}:where(.astro-jif73yzw)[aria-expanded=true] button:where(.astro-jif73yzw){background-color:var(--sl-color-gray-2);box-shadow:none}[data-theme=light] button:where(.astro-jif73yzw){background-color:var(--sl-color-black);color:var(--sl-color-white)}[data-theme=light] :where(.astro-jif73yzw)[aria-expanded=true] button:where(.astro-jif73yzw){background-color:var(--sl-color-gray-5)} .site-title:where(.astro-m46x6ez3){align-items:center;gap:var(--sl-nav-gap);font-size:var(--sl-text-h4);font-weight:600;color:var(--sl-color-text-accent);text-decoration:none;white-space:nowrap}img:where(.astro-m46x6ez3){height:calc(var(--sl-nav-height) - 2 * var(--sl-nav-pad-y));width:auto;max-width:100%;-o-object-fit:contain;object-fit:contain;-o-object-position:0 50%;object-position:0 50%} :root{.social-icons{--sl-icon-color: var(--sl-color-text)}} :root{--starlight-image-zoom-animation-duration: .3s}starlight-image-zoom-zoomable{display:inline-block;position:relative;width:100%}starlight-image-zoom-zoomable img{cursor:zoom-in}starlight-image-zoom-zoomable button{cursor:zoom-in}starlight-image-zoom-zoomable button:not(:focus):not(:focus-within){border:none;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}.starlight-image-zoom-control{background-color:var(--sl-color-bg-nav);border:2px solid var(--sl-color-gray-2);border-radius:50%;display:grid;height:44px;inset:20px auto auto 20px;margin-top:0!important;padding:10px;place-items:center;position:absolute;width:44px}:is(.starlight-image-zoom-opened,.starlight-image-zoom-transition) .starlight-image-zoom-control{inset:20px 20px auto auto}.starlight-image-zoom-source{visibility:hidden}.starlight-image-zoom-image{cursor:zoom-out}@media (prefers-reduced-motion: no-preference){.starlight-image-zoom-image{transition:transform var(--starlight-image-zoom-animation-duration) cubic-bezier(.4,0,.2,1)}} .header:where(.astro-kmkmnagf){gap:var(--sl-nav-gap);justify-content:space-between;align-items:center;height:100%}.title-wrapper:where(.astro-kmkmnagf){overflow:clip;padding:.25rem;margin:-.25rem;min-width:0}.right-group:where(.astro-kmkmnagf),.social-icons:where(.astro-kmkmnagf){gap:1rem;align-items:center}.social-icons:where(.astro-kmkmnagf):after{content:"";height:2rem;border-inline-end:1px solid var(--sl-color-gray-5)}@media (min-width: 50rem){:root[data-has-sidebar]{--__sidebar-pad: calc(2 * var(--sl-nav-pad-x))}:root:not([data-has-toc]){--__toc-width: 0rem}.header:where(.astro-kmkmnagf){--__sidebar-width: max(0rem, var(--sl-content-inline-start, 0rem) - var(--sl-nav-pad-x));--__main-column-fr: calc( ( 100% + var(--__sidebar-pad, 0rem) - var(--__toc-width, var(--sl-sidebar-width)) - (2 * var(--__toc-width, var(--sl-nav-pad-x))) - var(--sl-content-inline-start, 0rem) - var(--sl-content-width) ) / 2 );display:grid;grid-template-columns:minmax(calc(var(--__sidebar-width) + max(0rem,var(--__main-column-fr) - var(--sl-nav-gap))),auto) 1fr auto;align-content:center}} .right-sidebar-panel:where(.astro-pb3aqygn){padding:1rem var(--sl-sidebar-pad-x)}.sl-container:where(.astro-pb3aqygn){width:calc(var(--sl-sidebar-width) - 2 * var(--sl-sidebar-pad-x))}.right-sidebar-panel:where(.astro-pb3aqygn) h2{color:var(--sl-color-white);font-size:var(--sl-text-h5);font-weight:600;line-height:var(--sl-line-height-headings);margin-bottom:.5rem}.right-sidebar-panel:where(.astro-pb3aqygn) :where(a){display:block;font-size:var(--sl-text-xs);text-decoration:none;color:var(--sl-color-gray-3);overflow-wrap:anywhere}.right-sidebar-panel:where(.astro-pb3aqygn) :where(a):hover{color:var(--sl-color-white)}@media (min-width: 72rem){.sl-container:where(.astro-pb3aqygn){max-width:calc(((100vw - var(--sl-sidebar-width) - 2 * var(--sl-content-pad-x) - 2 * var(--sl-sidebar-pad-x)) * .25))}} :root{--sl-badge-default-border: var(--sl-color-accent);--sl-badge-default-bg: var(--sl-color-accent-low);--sl-badge-default-text: #fff;--sl-badge-note-border: var(--sl-color-blue);--sl-badge-note-bg: var(--sl-color-blue-low);--sl-badge-note-text: #fff;--sl-badge-danger-border: var(--sl-color-red);--sl-badge-danger-bg: var(--sl-color-red-low);--sl-badge-danger-text: #fff;--sl-badge-success-border: var(--sl-color-green);--sl-badge-success-bg: var(--sl-color-green-low);--sl-badge-success-text: #fff;--sl-badge-caution-border: var(--sl-color-orange);--sl-badge-caution-bg: var(--sl-color-orange-low);--sl-badge-caution-text: #fff;--sl-badge-tip-border: var(--sl-color-purple);--sl-badge-tip-bg: var(--sl-color-purple-low);--sl-badge-tip-text: #fff}[data-theme=light]:root{--sl-badge-default-bg: var(--sl-color-accent-high);--sl-badge-note-bg: var(--sl-color-blue-high);--sl-badge-danger-bg: var(--sl-color-red-high);--sl-badge-success-bg: var(--sl-color-green-high);--sl-badge-caution-bg: var(--sl-color-orange-high);--sl-badge-tip-bg: var(--sl-color-purple-high)}.sl-badge:where(.astro-avdet4wd){display:inline-block;border:1px solid var(--sl-color-border-badge);border-radius:.25rem;font-family:var(--sl-font-system-mono);line-height:normal;color:var(--sl-color-text-badge);background-color:var(--sl-color-bg-badge);overflow-wrap:anywhere}.sidebar-content .sl-badge:where(.astro-avdet4wd){line-height:1;font-size:var(--sl-text-xs);padding:.125rem .375rem}.sidebar-content a[aria-current=page]>.sl-badge:where(.astro-avdet4wd){--sl-color-bg-badge: transparent;--sl-color-border-badge: currentColor;color:inherit}.default:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-default-bg);--sl-color-border-badge: var(--sl-badge-default-border);--sl-color-text-badge: var(--sl-badge-default-text)}.note:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-note-bg);--sl-color-border-badge: var(--sl-badge-note-border);--sl-color-text-badge: var(--sl-badge-note-text)}.danger:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-danger-bg);--sl-color-border-badge: var(--sl-badge-danger-border);--sl-color-text-badge: var(--sl-badge-danger-text)}.success:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-success-bg);--sl-color-border-badge: var(--sl-badge-success-border);--sl-color-text-badge: var(--sl-badge-success-text)}.tip:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-tip-bg);--sl-color-border-badge: var(--sl-badge-tip-border);--sl-color-text-badge: var(--sl-badge-tip-text)}.caution:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-caution-bg);--sl-color-border-badge: var(--sl-badge-caution-border);--sl-color-text-badge: var(--sl-badge-caution-text)}.small:where(.astro-avdet4wd){font-size:var(--sl-text-xs);padding:.125rem .25rem}.medium:where(.astro-avdet4wd){font-size:var(--sl-text-sm);padding:.175rem .35rem}.large:where(.astro-avdet4wd){font-size:var(--sl-text-base);padding:.225rem .45rem}.sl-markdown-content :is(h1,h2,h3,h4,h5,h6) .sl-badge:where(.astro-avdet4wd){vertical-align:middle} .card-grid:where(.astro-zntqmydn){display:grid;grid-template-columns:100%;gap:1rem}.card-grid:where(.astro-zntqmydn)>*{margin-top:0!important}@media (min-width: 50rem){.card-grid:where(.astro-zntqmydn){grid-template-columns:1fr 1fr;gap:1.5rem}.stagger:where(.astro-zntqmydn){--stagger-height: 5rem;padding-bottom:var(--stagger-height)}.stagger:where(.astro-zntqmydn)>*:nth-child(2n){transform:translateY(var(--stagger-height))}} .card:where(.astro-v5tidmuc){--sl-card-border: var(--sl-color-purple);--sl-card-bg: var(--sl-color-purple-low);border:1px solid var(--sl-color-gray-5);background-color:var(--sl-color-black);padding:clamp(1rem,calc(.125rem + 3vw),2.5rem);flex-direction:column;gap:clamp(.5rem,calc(.125rem + 1vw),1rem)}.card:where(.astro-v5tidmuc):nth-child(4n+1){--sl-card-border: var(--sl-color-orange);--sl-card-bg: var(--sl-color-orange-low)}.card:where(.astro-v5tidmuc):nth-child(4n+3){--sl-card-border: var(--sl-color-green);--sl-card-bg: var(--sl-color-green-low)}.card:where(.astro-v5tidmuc):nth-child(4n+4){--sl-card-border: var(--sl-color-red);--sl-card-bg: var(--sl-color-red-low)}.card:where(.astro-v5tidmuc):nth-child(4n+5){--sl-card-border: var(--sl-color-blue);--sl-card-bg: var(--sl-color-blue-low)}.title:where(.astro-v5tidmuc){font-weight:600;font-size:var(--sl-text-h4);color:var(--sl-color-white);line-height:var(--sl-line-height-headings);gap:1rem;align-items:center}.card:where(.astro-v5tidmuc) .icon:where(.astro-v5tidmuc){border:1px solid var(--sl-card-border);background-color:var(--sl-card-bg);padding:.2em;border-radius:.25rem}.card:where(.astro-v5tidmuc) .body:where(.astro-v5tidmuc){margin:0;font-size:clamp(var(--sl-text-sm),calc(.5rem + 1vw),var(--sl-text-body))} label:where(.astro-4yphtoen){--sl-label-icon-size: .875rem;--sl-caret-size: 1.25rem;--sl-inline-padding: .5rem;position:relative;display:flex;align-items:center;gap:.25rem;color:var(--sl-color-gray-1)}label:where(.astro-4yphtoen):hover{color:var(--sl-color-gray-2)}.icon:where(.astro-4yphtoen){position:absolute;top:50%;transform:translateY(-50%);pointer-events:none}.label-icon:where(.astro-4yphtoen){font-size:var(--sl-label-icon-size);inset-inline-start:0}.caret:where(.astro-4yphtoen){font-size:var(--sl-caret-size);inset-inline-end:0}select:where(.astro-4yphtoen){border:0;padding-block:.625rem;padding-inline:calc(var(--sl-label-icon-size) + var(--sl-inline-padding) + .25rem) calc(var(--sl-caret-size) + var(--sl-inline-padding) + .25rem);margin-inline:calc(var(--sl-inline-padding) * -1);width:calc(var(--sl-select-width) + var(--sl-inline-padding) * 2);background-color:transparent;text-overflow:ellipsis;color:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}option:where(.astro-4yphtoen){background-color:var(--sl-color-bg-nav);color:var(--sl-color-gray-1)}@media (min-width: 50rem){select:where(.astro-4yphtoen){font-size:var(--sl-text-sm)}} ul:where(.astro-g2bywc46){padding:0;list-style:none}a:where(.astro-g2bywc46){--pad-inline: .5rem;display:block;border-radius:.25rem;padding-block:.25rem;padding-inline:calc(1rem * var(--depth) + var(--pad-inline)) var(--pad-inline);line-height:1.25}a:where(.astro-g2bywc46)[aria-current=true]{color:var(--sl-color-text-accent)}.isMobile:where(.astro-g2bywc46) a:where(.astro-g2bywc46){--pad-inline: 1rem;display:flex;justify-content:space-between;gap:var(--pad-inline);border-top:1px solid var(--sl-color-gray-6);border-radius:0;padding-block:.5rem;color:var(--sl-color-text);font-size:var(--sl-text-sm);text-decoration:none;outline-offset:var(--sl-outline-offset-inside)}.isMobile:where(.astro-g2bywc46):first-child>li:where(.astro-g2bywc46):first-child>a:where(.astro-g2bywc46){border-top:0}.isMobile:where(.astro-g2bywc46) a:where(.astro-g2bywc46)[aria-current=true],.isMobile:where(.astro-g2bywc46) a:where(.astro-g2bywc46)[aria-current=true]:hover,.isMobile:where(.astro-g2bywc46) a:where(.astro-g2bywc46)[aria-current=true]:focus{color:var(--sl-color-white);background-color:unset}.isMobile:where(.astro-g2bywc46) a:where(.astro-g2bywc46)[aria-current=true]:after{content:"";width:1rem;background-color:var(--sl-color-text-accent);-webkit-mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAxNCAxNCc+PHBhdGggZD0nTTEwLjkxNCA0LjIwNmEuNTgzLjU4MyAwIDAgMC0uODI4IDBMNS43NCA4LjU1NyAzLjkxNCA2LjcyNmEuNTk2LjU5NiAwIDAgMC0uODI4Ljg1N2wyLjI0IDIuMjRhLjU4My41ODMgMCAwIDAgLjgyOCAwbDQuNzYtNC43NmEuNTgzLjU4MyAwIDAgMCAwLS44NTdaJy8+PC9zdmc+Cg==);mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAxNCAxNCc+PHBhdGggZD0nTTEwLjkxNCA0LjIwNmEuNTgzLjU4MyAwIDAgMC0uODI4IDBMNS43NCA4LjU1NyAzLjkxNCA2LjcyNmEuNTk2LjU5NiAwIDAgMC0uODI4Ljg1N2wyLjI0IDIuMjRhLjU4My41ODMgMCAwIDAgLjgyOCAwbDQuNzYtNC43NmEuNTgzLjU4MyAwIDAgMCAwLS44NTdaJy8+PC9zdmc+Cg==);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;flex-shrink:0} nav:where(.astro-doynk5tl){position:fixed;z-index:var(--sl-z-index-toc);top:calc(var(--sl-nav-height) - 1px);inset-inline:0;border-top:1px solid var(--sl-color-gray-5);background-color:var(--sl-color-bg-nav)}@media (min-width: 50rem){nav:where(.astro-doynk5tl){inset-inline-start:var(--sl-content-inline-start, 0)}}summary:where(.astro-doynk5tl){gap:.5rem;align-items:center;height:var(--sl-mobile-toc-height);border-bottom:1px solid var(--sl-color-hairline-shade);padding:.5rem 1rem;font-size:var(--sl-text-xs);outline-offset:var(--sl-outline-offset-inside)}summary:where(.astro-doynk5tl)::marker,summary:where(.astro-doynk5tl)::-webkit-details-marker{display:none}.toggle:where(.astro-doynk5tl){flex-shrink:0;gap:1rem;align-items:center;justify-content:space-between;border:1px solid var(--sl-color-gray-5);border-radius:.5rem;padding-block:.5rem;padding-inline-start:.75rem;padding-inline-end:.5rem;line-height:1;background-color:var(--sl-color-black);-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}details:where(.astro-doynk5tl)[open] .toggle:where(.astro-doynk5tl){color:var(--sl-color-white);border-color:var(--sl-color-accent)}details:where(.astro-doynk5tl) .toggle:where(.astro-doynk5tl):hover{color:var(--sl-color-white);border-color:var(--sl-color-gray-2)}[dir=rtl] .caret:where(.astro-doynk5tl){transform:rotate(180deg)}details:where(.astro-doynk5tl)[open] .caret:where(.astro-doynk5tl){transform:rotate(90deg)}.display-current:where(.astro-doynk5tl){white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:var(--sl-color-white)}.dropdown:where(.astro-doynk5tl){--border-top: 1px;margin-top:calc(-1 * var(--border-top));border:var(--border-top) solid var(--sl-color-gray-6);border-top-color:var(--sl-color-hairline-shade);max-height:calc(85vh - var(--sl-nav-height) - var(--sl-mobile-toc-height));overflow-y:auto;background-color:var(--sl-color-black);box-shadow:var(--sl-shadow-md);overscroll-behavior:contain} h1:where(.astro-j6tvhyss){margin-top:1rem;font-size:var(--sl-text-h1);line-height:var(--sl-line-height-headings);font-weight:600;color:var(--sl-color-white)} a:where(.astro-wy4te6ga){color:var(--sl-color-text-accent);padding:.5em;margin:-.5em}a:where(.astro-wy4te6ga):hover{opacity:.66} a:where(.astro-7q3lir66){clip:rect(0,0,0,0);position:fixed;top:.75rem;inset-inline-start:.75rem}a:where(.astro-7q3lir66):focus{clip:unset;z-index:var(--sl-z-index-skiplink);display:block;padding:.5rem 1rem;text-decoration:none;color:var(--sl-color-text-invert);background-color:var(--sl-color-text-accent);box-shadow:var(--sl-shadow-lg)} .c-breadcrumbs{--color-link-breadcrumbs: inherit;--size-font-breadcrumbs: 1rem;--spacing-vertical-separator-breadcrumbs: 6px}.c-breadcrumbs .has-ellipsis{display:var(--display-ellipsis-breadcrumbs, none)}.c-breadcrumbs.is-truncated .has-ellipsis{--display-ellipsis-breadcrumbs: flex}.c-breadcrumbs.is-truncated .c-breadcrumbs__crumb{visibility:var(--visibility-truncated-breadcrumbs, hidden);position:var(--position-truncated-breadcrumbs, absolute)}.c-breadcrumbs.is-truncated .c-breadcrumbs__crumb:first-of-type,.c-breadcrumbs.is-truncated .c-breadcrumbs__crumb:last-of-type,.c-breadcrumbs.is-truncated .c-breadcrumbs__crumb.has-ellipsis{--visibility-truncated-breadcrumbs: visible;--position-truncated-breadcrumbs: relative}.c-breadcrumbs__truncated-button{background-color:transparent;border:none;padding:0;margin:0;cursor:pointer;color:var(--color-truncated-button, var(--color-link-breadcrumbs))}.c-breadcrumbs__crumbs{list-style-type:none;margin:0;padding:0;display:flex;flex-wrap:wrap}.c-breadcrumbs__crumbs:where(.has-no-separators){row-gap:var(--spacing-vertical-separator-breadcrumbs);-moz-column-gap:1rem;column-gap:1rem}.c-breadcrumbs__crumb{display:flex;align-items:center}.c-breadcrumbs__crumb:has(.c-breadcrumbs__separator) .c-breadcrumbs__separator{display:flex;align-items:center;justify-content:center;margin-inline:var(--spacing-vertical-separator-breadcrumbs)}.c-breadcrumbs__crumb:has(svg,image) :where(svg,image){max-width:var(--size-font-breadcrumbs);max-height:var(--size-font-breadcrumbs)}.c-breadcrumbs__link,.c-breadcrumbs__truncated-button{font-size:var(--size-font-breadcrumbs);text-decoration:none;color:var(--color-link-breadcrumbs);line-height:1} svg:where(.astro-c6vsoqas){color:var(--sl-icon-color);font-size:var(--sl-icon-size, 1em);width:1em;height:1em} :root{.sidebar-content{--sl-color-hairline-light: #cacaca !important;>*{a{padding:.2375em var(--sl-sidebar-item-padding-inline)!important;&[aria-current=page]{background-color:unset!important;border:unset!important;border-color:unset!important;color:var(--sl-color-accent)!important;font-weight:600!important}}summary{padding:.1375em var(--sl-sidebar-item-padding-inline)!important}.large{color:var(--sl-color-gray-2)!important;font-weight:unset!important;font-size:unset!important;@media (min-width: 50rem){font-size:var(--sl-text-sm)!important}}.caret{font-size:1rem!important}}}}:root[data-theme=dark]{.sidebar-content{--sl-color-hairline-light: #444444 !important;>* a[aria-current=page]{color:var(--sl-color-accent-high)!important}}} .main-pane:where(.astro-67yu43on){isolation:isolate}@media (min-width: 72rem){.right-sidebar-container:where(.astro-67yu43on){order:2;position:relative;width:calc(var(--sl-sidebar-width) + (100% - var(--sl-content-width) - var(--sl-sidebar-width)) / 2)}.right-sidebar:where(.astro-67yu43on){position:fixed;top:0;border-inline-start:1px solid var(--sl-color-hairline);padding-top:var(--sl-nav-height);width:100%;height:100vh;overflow-y:auto;scrollbar-width:none}.main-pane:where(.astro-67yu43on){width:100%}[data-has-sidebar][data-has-toc] .main-pane:where(.astro-67yu43on){--sl-content-margin-inline: auto 0;order:1;width:calc(var(--sl-content-width) + (100% - var(--sl-content-width) - var(--sl-sidebar-width)) / 2)}} .starlight-aside{padding:1rem;border-inline-start:.25rem solid var(--sl-color-asides-border);color:var(--sl-color-white)}.starlight-aside--note{--sl-color-asides-text-accent: var(--sl-color-blue-high);--sl-color-asides-border: var(--sl-color-blue);background-color:var(--sl-color-blue-low)}.starlight-aside--tip{--sl-color-asides-text-accent: var(--sl-color-purple-high);--sl-color-asides-border: var(--sl-color-purple);background-color:var(--sl-color-purple-low)}.starlight-aside--caution{--sl-color-asides-text-accent: var(--sl-color-orange-high);--sl-color-asides-border: var(--sl-color-orange);background-color:var(--sl-color-orange-low)}.starlight-aside--danger{--sl-color-asides-text-accent: var(--sl-color-red-high);--sl-color-asides-border: var(--sl-color-red);background-color:var(--sl-color-red-low)}.starlight-aside__title{display:flex;gap:.5rem;align-items:center;font-size:var(--sl-text-h5);font-weight:600;line-height:var(--sl-line-height-headings);color:var(--sl-color-asides-text-accent)}.starlight-aside__icon{font-size:1.333em;width:1em;height:1em}.starlight-aside__title+.starlight-aside__content{margin-top:.5rem}.starlight-aside__content a{color:var(--sl-color-asides-text-accent)} sl-sidebar-state-persist:where(.astro-kku4brbg){display:contents} .starlight-aside{border:unset;border-radius:4px;&.starlight-aside--note{background-color:#ecf4ff}&.starlight-aside--caution{background-color:#fff8e4}.starlight-aside__title{margin-left:30px;svg{margin-left:-30px}}.starlight-aside__content{margin-top:unset;margin-left:30px}}:root[data-theme=dark]{.starlight-aside--note{background-color:#001c43}.starlight-aside--caution{background-color:#62490a}} .social-icons:where(.astro-wu23bvmt){margin-inline-end:auto;gap:1rem;align-items:center;padding-block:1rem}.social-icons:where(.astro-wu23bvmt):empty{display:none}.mobile-preferences:where(.astro-wu23bvmt){justify-content:space-between;flex-wrap:wrap;border-top:1px solid var(--sl-color-gray-6);-moz-column-gap:1rem;column-gap:1rem;padding:.5rem 0} starlight-tabs:where(.astro-esqgolmp){display:block}.tablist-wrapper:where(.astro-esqgolmp){overflow-x:auto}:where(.astro-esqgolmp)[role=tablist]{display:flex;list-style:none;border-bottom:2px solid var(--sl-color-gray-5);padding:0}.tab:where(.astro-esqgolmp){margin-bottom:-2px}.tab:where(.astro-esqgolmp)>:where(.astro-esqgolmp)[role=tab]{display:flex;align-items:center;gap:.5rem;padding:0 1.25rem;text-decoration:none;border-bottom:2px solid var(--sl-color-gray-5);color:var(--sl-color-gray-3);outline-offset:var(--sl-outline-offset-inside);overflow-wrap:initial}.tab:where(.astro-esqgolmp) :where(.astro-esqgolmp)[role=tab][aria-selected=true]{color:var(--sl-color-white);border-color:var(--sl-color-text-accent);font-weight:600}.tablist-wrapper:where(.astro-esqgolmp)~[role=tabpanel]{margin-top:1rem} .sl-badge{border:none;font-family:var(--__sl-font);overflow-wrap:unset;align-items:center;border-radius:50px;display:inline-flex;font-size:12px;font-weight:400;line-height:1;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;padding:4px 8px}:root{.sl-badge{&.note{background-color:#b9d6ff!important;color:#003681!important}&.danger{background-color:#feccc8!important;color:#780a02!important}&.success{background-color:#a8e9c0!important;color:#104122!important}&.caution{background-color:#fbcda5!important;color:#592b04!important}&.tip{background-color:#ebcaf6!important;color:#490f5c!important}&.default{background-color:#f2f2f2!important;color:#3d3d3d!important}}}:root[data-theme=dark]{.sl-badge{&.note{background-color:#82b6ff!important;color:#001c43!important}&.danger{background-color:#feccc8!important;color:#3c0501!important}&.success{background-color:#55d584!important;color:#0a2614!important}&.caution{background-color:#fbcda5!important;color:#361a02!important}&.tip{background-color:#ebcaf6!important;color:#350b42!important}&.default{background-color:#d9d9d9!important;color:#4a4a4a!important}}} .sl-link-card:where(.astro-mf7fz2mj){display:grid;grid-template-columns:1fr auto;gap:.5rem;border:1px solid var(--sl-color-gray-5);border-radius:.5rem;padding:1rem;box-shadow:var(--sl-shadow-sm);position:relative}a:where(.astro-mf7fz2mj){text-decoration:none;line-height:var(--sl-line-height-headings)}a:where(.astro-mf7fz2mj):before{content:"";position:absolute;inset:0}.stack:where(.astro-mf7fz2mj){flex-direction:column;gap:.5rem}.title:where(.astro-mf7fz2mj){color:var(--sl-color-white);font-weight:600;font-size:var(--sl-text-lg)}.description:where(.astro-mf7fz2mj){color:var(--sl-color-gray-3);line-height:1.5}.icon:where(.astro-mf7fz2mj){color:var(--sl-color-gray-3)}.sl-link-card:where(.astro-mf7fz2mj):hover{background:var(--sl-color-gray-7, var(--sl-color-gray-6));border-color:var(--sl-color-gray-2)}.sl-link-card:where(.astro-mf7fz2mj):hover .icon:where(.astro-mf7fz2mj){color:var(--sl-color-white)} a:where(.astro-vdgantbb){color:var(--sl-color-text-accent)} .c-breadcrumbs{--spacing-vertical-separator-breadcrumbs: .625rem;padding:.5rem 0;.c-breadcrumbs__link{font-size:.75rem;line-height:1.25rem;font-weight:600}.c-breadcrumbs__separator,.c-breadcrumbs__truncated-button{color:#f6821f}}:root[data-theme=dark]{--color-link-breadcrumbs: #b6b6b6}:root[data-theme=light]{--color-link-breadcrumbs: #595959} html:not([data-has-toc]){--sl-mobile-toc-height: 0rem}html:not([data-has-sidebar]){--sl-content-width: 67.5rem}html{scroll-padding-top:calc(1.5rem + var(--sl-nav-height) + var(--sl-mobile-toc-height))}main:where(.astro-bguv2lll){padding-bottom:3vh}@media (min-width: 50em){:where(.astro-bguv2lll)[data-has-sidebar]{--sl-content-inline-start: var(--sl-sidebar-width)}}@media (min-width: 72em){html{scroll-padding-top:calc(1.5rem + var(--sl-nav-height))}} .sl-steps{--bullet-size: calc(var(--sl-line-height) * 1rem);--bullet-margin: .375rem;list-style:none;counter-reset:steps-counter var(--sl-steps-start, 0);padding-inline-start:0}.sl-steps>li{counter-increment:steps-counter;position:relative;padding-inline-start:calc(var(--bullet-size) + 1rem);padding-bottom:1px;min-height:calc(var(--bullet-size) + var(--bullet-margin))}.sl-steps>li+li{margin-top:0}.sl-steps>li:before{content:counter(steps-counter);position:absolute;top:0;inset-inline-start:0;width:var(--bullet-size);height:var(--bullet-size);line-height:var(--bullet-size);font-size:var(--sl-text-xs);font-weight:600;text-align:center;color:var(--sl-color-white);background-color:var(--sl-color-gray-6);border-radius:99rem;box-shadow:inset 0 0 0 1px var(--sl-color-gray-5)}.sl-steps>li:after{--guide-width: 1px;content:"";position:absolute;top:calc(var(--bullet-size) + var(--bullet-margin));bottom:var(--bullet-margin);inset-inline-start:calc((var(--bullet-size) - var(--guide-width)) / 2);width:var(--guide-width);background-color:var(--sl-color-hairline-light)}.sl-steps>li>:first-child{--lh: calc(1em * var(--sl-line-height));--shift-y: calc(.5 * (var(--bullet-size) - var(--lh)));transform:translateY(var(--shift-y));margin-bottom:var(--shift-y)}.sl-steps>li>:first-child:where(h1,h2,h3,h4,h5,h6){--lh: calc(1em * var(--sl-line-height-headings))}@supports (--prop: 1lh){.sl-steps>li>:first-child{--lh: 1lh}} :root{--color-link-breadcrumbs: var(--sl-color-text-accent)} .expressive-code .copy button{width:2rem!important;height:2rem!important} starlight-file-tree:where(.astro-p67cqifm){--x-space: 1.5rem;--y-space: .125rem;--y-pad: 0;display:block;border:1px solid var(--sl-color-gray-5);padding:1rem;background-color:var(--sl-color-gray-6);font-size:var(--sl-text-xs);font-family:var(--__sl-font-mono);overflow-x:auto}starlight-file-tree:where(.astro-p67cqifm) .directory>details{border:0;padding:0;padding-inline-start:var(--x-space);background:transparent}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary{margin-inline-start:calc(-1 * var(--x-space));border:0;padding:var(--y-pad) .625rem;font-weight:400;color:var(--sl-color-white);max-width:100%}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary::marker,starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary::-webkit-details-marker{color:var(--sl-color-gray-3)}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary:hover,starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary:hover .tree-icon{cursor:pointer;color:var(--sl-color-text-accent);fill:currentColor}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary:hover~ul{border-color:var(--sl-color-gray-4)}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary:hover .highlight .tree-icon{fill:currentColor}starlight-file-tree:where(.astro-p67cqifm) ul{margin-inline-start:.5rem;border-inline-start:1px solid var(--sl-color-gray-5);padding:0;padding-inline-start:.125rem;list-style:none}starlight-file-tree:where(.astro-p67cqifm)>ul{margin:0;border:0;padding:0}starlight-file-tree:where(.astro-p67cqifm) li{margin:var(--y-space) 0;padding:var(--y-pad) 0}starlight-file-tree:where(.astro-p67cqifm) .file{margin-inline-start:calc(var(--x-space) - .125rem);color:var(--sl-color-white)}starlight-file-tree:where(.astro-p67cqifm) .tree-entry{display:inline-flex;align-items:flex-start;flex-wrap:wrap;max-width:calc(100% - 1rem)}@media (min-width: 30em){starlight-file-tree:where(.astro-p67cqifm) .tree-entry{flex-wrap:nowrap}}starlight-file-tree:where(.astro-p67cqifm) .tree-entry>:first-child{flex-shrink:0}starlight-file-tree:where(.astro-p67cqifm) .empty{color:var(--sl-color-gray-3);padding-inline-start:.375rem}starlight-file-tree:where(.astro-p67cqifm) .comment{color:var(--sl-color-gray-3);padding-inline-start:1.625rem;max-width:24rem;min-width:12rem}starlight-file-tree:where(.astro-p67cqifm) .highlight{display:inline-block;border-radius:.25rem;padding-inline-end:.5rem;color:var(--sl-color-text-invert);background-color:var(--sl-color-text-accent)}starlight-file-tree:where(.astro-p67cqifm) svg{display:inline;fill:var(--sl-color-gray-3);vertical-align:middle;margin-inline:.25rem .375rem;width:.875rem;height:.875rem}starlight-file-tree:where(.astro-p67cqifm) .highlight svg.tree-icon{fill:currentColor} ul:where(.astro-3ii7xxms){--sl-sidebar-item-padding-inline: .5rem;list-style:none;padding:0}li:where(.astro-3ii7xxms){overflow-wrap:anywhere}ul:where(.astro-3ii7xxms) ul:where(.astro-3ii7xxms) li:where(.astro-3ii7xxms){margin-inline-start:var(--sl-sidebar-item-padding-inline);border-inline-start:1px solid var(--sl-color-hairline-light);padding-inline-start:var(--sl-sidebar-item-padding-inline)}.large:where(.astro-3ii7xxms){font-size:var(--sl-text-lg);font-weight:600;color:var(--sl-color-white)}.top-level:where(.astro-3ii7xxms)>li:where(.astro-3ii7xxms)+li:where(.astro-3ii7xxms){margin-top:.75rem}summary:where(.astro-3ii7xxms){display:flex;align-items:center;justify-content:space-between;padding:.2em var(--sl-sidebar-item-padding-inline);line-height:1.4;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}summary:where(.astro-3ii7xxms)::marker,summary:where(.astro-3ii7xxms)::-webkit-details-marker{display:none}.caret:where(.astro-3ii7xxms){transition:transform .2s ease-in-out;flex-shrink:0}[dir=rtl] .caret:where(.astro-3ii7xxms){transform:rotate(180deg)}:where(.astro-3ii7xxms)[open]>summary:where(.astro-3ii7xxms) .caret:where(.astro-3ii7xxms){transform:rotate(90deg)}a:where(.astro-3ii7xxms){display:block;border-radius:.25rem;text-decoration:none;color:var(--sl-color-gray-2);padding:.3em var(--sl-sidebar-item-padding-inline);line-height:1.4}a:where(.astro-3ii7xxms):hover,a:where(.astro-3ii7xxms):focus{color:var(--sl-color-white)}:where(.astro-3ii7xxms)[aria-current=page],:where(.astro-3ii7xxms)[aria-current=page]:hover,:where(.astro-3ii7xxms)[aria-current=page]:focus{font-weight:600;color:var(--sl-color-text-invert);background-color:var(--sl-color-text-accent)}a:where(.astro-3ii7xxms)>:where(.astro-3ii7xxms):not(:last-child),.group-label:where(.astro-3ii7xxms)>:where(.astro-3ii7xxms):not(:last-child){margin-inline-end:.25em}@media (min-width: 50rem){.top-level:where(.astro-3ii7xxms)>li:where(.astro-3ii7xxms)+li:where(.astro-3ii7xxms){margin-top:.5rem}.large:where(.astro-3ii7xxms){font-size:var(--sl-text-base)}a:where(.astro-3ii7xxms){font-size:var(--sl-text-sm)}} .footnote{font-size:.75rem;line-height:1rem;color:var(--sl-color-accent);font-weight:600;padding:.25rem;margin:-.25rem}.data-footnote-backref{display:none}.tippy-box{background-color:var(--sl-color-bg-nav);border-color:var(--sl-color-text);border:.1em solid;color:var(--sl-color-white)} .sl-link-button:where(.astro-xwgiixxa){align-items:center;border:1px solid transparent;border-radius:999rem;display:inline-flex;font-size:var(--sl-text-sm);gap:.5em;line-height:1.1875;outline-offset:.25rem;padding:.4375rem 1.125rem;text-decoration:none}.sl-link-button:where(.astro-xwgiixxa).primary{background:var(--sl-color-text-accent);border-color:var(--sl-color-text-accent);color:var(--sl-color-black)}.sl-link-button:where(.astro-xwgiixxa).primary:hover{color:var(--sl-color-black)}.sl-link-button:where(.astro-xwgiixxa).secondary{border-color:inherit;color:var(--sl-color-white)}.sl-link-button:where(.astro-xwgiixxa).minimal{color:var(--sl-color-white);padding-inline:0}.sl-link-button:where(.astro-xwgiixxa) svg{flex-shrink:0}@media (min-width: 50rem){.sl-link-button:where(.astro-xwgiixxa){font-size:var(--sl-text-base);padding:.9375rem 1.25rem}}.sl-markdown-content .sl-link-button:where(.astro-xwgiixxa){margin-inline-end:1rem}.sl-markdown-content .sl-link-button:where(.astro-xwgiixxa):not(:where(p *)){margin-block:1rem} :root{--sl-text-h4: var(--sl-text-base);--sl-text-h5: var(--sl-text-base)} input,textarea,select{background-color:var(--sl-color-bg-nav);border-color:var(--sl-color-gray-5);border-width:2px}input[readonly]{background-color:var(--sl-color-backdrop-overlay);cursor:not-allowed} pre.mermaid:not([data-processed]){visibility:hidden} .sidebar-content{gap:.5rem;padding:1rem 1.5rem;.large{font-weight:unset;font-size:unset;color:unset}[aria-current=page]{background-color:transparent!important;font-weight:500!important;color:var(--sl-color-sidebar-active)!important}.top-level>li{+li{margin-top:.5rem}>a,>details>summary{font-size:1rem;font-weight:400;background-color:transparent;color:var(--sl-color-white);padding:.25rem .5rem;&:hover{background-color:var(--sl-color-sidebar-hover);border-radius:.25rem}}>details>ul{--sl-sidebar-item-padding-inline: .5rem}ul{--sl-sidebar-item-padding-inline: .75rem;margin-inline-start:var(--sl-sidebar-item-padding-inline);border-inline-start:1px solid var(--sl-color-hairline-light);margin-top:.5rem;li{margin-inline-start:unset;border-inline-start:unset;padding-inline-start:unset;+li{margin-top:.375rem}}a,summary{--sl-sidebar-item-padding-inline: .75rem;padding-top:.25rem;padding-bottom:.25rem;font-size:.875rem;color:var(--sl-color-text);&:hover{background-color:var(--sl-color-sidebar-hover);border-radius:0}}}}}:root[data-theme=dark]{--sl-color-bg-sidebar: #1d1d1d;--sl-color-sidebar-active: #82b6ff;--sl-color-sidebar-hover: #3d3d3d}:root[data-theme=light]{--sl-color-sidebar-active: #0051c3;--sl-color-sidebar-hover: #f2f2f2} table *{overflow-wrap:normal} </style> <link rel="stylesheet" href="/_astro/tailwind.Do8Ni6_B.css"> <style>.site-title{gap:calc(.5 * var(--sl-nav-gap));span{color:var(--sl-color-white)}img{height:calc(var(--sl-nav-height) - 3 * var(--sl-nav-pad-y))}} </style> <script type="module" src="/_astro/page.7qqag-5g.js"></script> <style>.card-grid:where(.astro-lrh2lqny){display:grid;gap:1rem}.card-grid:where(.astro-lrh2lqny)>*{margin-top:0!important}@media (min-width: 50rem){.card-grid:where(.astro-lrh2lqny){grid-template-columns:1fr 1fr 1fr 1fr;gap:1.5rem}.stagger:where(.astro-lrh2lqny){--stagger-height: 5rem;padding-bottom:var(--stagger-height)}.stagger:where(.astro-lrh2lqny)>*:nth-child(2n){transform:translateY(var(--stagger-height))}} </style> <style>.card:where(.astro-rcyev3ef){--sl-card-border: var(--sl-color-purple);--sl-card-bg: var(--sl-color-purple-low);border:1px solid var(--sl-color-gray-5);background-color:var(--sl-color-black);padding:clamp(1rem,calc(.125rem + 3vw),2.5rem);flex-direction:column;gap:clamp(.5rem,calc(.125rem + 1vw),1rem)}.card:where(.astro-rcyev3ef):nth-child(4n+1){--sl-card-border: var(--sl-color-orange);--sl-card-bg: var(--sl-color-orange-low)}.card:where(.astro-rcyev3ef):nth-child(4n+3){--sl-card-border: var(--sl-color-green);--sl-card-bg: var(--sl-color-green-low)}.card:where(.astro-rcyev3ef):nth-child(4n+4){--sl-card-border: var(--sl-color-red);--sl-card-bg: var(--sl-color-red-low)}.card:where(.astro-rcyev3ef):nth-child(4n+5){--sl-card-border: var(--sl-color-blue);--sl-card-bg: var(--sl-color-blue-low)}.title:where(.astro-rcyev3ef){font-weight:600;font-size:var(--sl-text-h4);color:var(--sl-color-white);line-height:var(--sl-line-height-headings);gap:1rem;align-items:center}.title:where(.astro-rcyev3ef)>a:where(.astro-rcyev3ef){color:var(--sl-color-white)!important;text-decoration-color:var(--sl-color-accent)!important}.card:where(.astro-rcyev3ef) .icon:where(.astro-rcyev3ef){border:1px solid var(--sl-card-border);background-color:var(--sl-card-bg);padding:.2em;border-radius:.25rem}.card:where(.astro-rcyev3ef) .body:where(.astro-rcyev3ef){margin:0;font-size:clamp(var(--sl-text-sm),calc(.5rem + 1vw),var(--sl-text-body))} </style> <style>.link-list:where(.astro-5tgmqq4m) ul{list-style-type:none;padding:0}.link-list:where(.astro-5tgmqq4m) li{border-bottom:1px solid var(--sl-color-gray-6);padding:.25rem 0;margin:0!important}.link-list:where(.astro-5tgmqq4m) li:last-child{border-bottom:none}.link-list:where(.astro-5tgmqq4m) a{display:flex;gap:.5rem;justify-content:space-between;align-items:center;text-decoration:none}.link-list:where(.astro-5tgmqq4m) a:after{content:"";background-color:currentColor;width:1rem;height:1rem;flex-shrink:0;mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z'%3E%3C/path%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z'%3E%3C/path%3E%3C/svg%3E");mask-size:100%;-webkit-mask-size:100%}[dir=rtl] .link-list:where(.astro-5tgmqq4m) a:after:not(:where([dir=rtl] [dir=ltr] *)){transform:scaleX(-1)} </style> <style>.NetworkMap--land:where(.astro-x5fqlrwg){fill:rgba(var(--gray-7-rgb),.8)}:where(.astro-x5fqlrwg)[theme=dark] .NetworkMap--land:where(.astro-x5fqlrwg){fill:rgba(var(--gray-2-rgb),.7)}.NetworkMap--datacenters:where(.astro-x5fqlrwg){fill:var(--sl-color-text-accent);stroke:var(--sl-color-text-accent);stroke-width:2px;paint-order:stroke;opacity:.85}:where(.astro-x5fqlrwg)[theme=dark] .NetworkMap--datacenters:where(.astro-x5fqlrwg){stroke:var(--background-color);stroke-width:3px} </style> <style>button:where(.astro-alpa55q7){transition:opacity .1s ease;opacity:.75;&:hover{cursor:copy;opacity:1}} </style> <style>input:where(.astro-75f4fhkp)[type=radio]{display:none}:root{--active-background: rgb(46 105 255);--hover-background: rgb(46 105 255 / .5);--active-text-color: white}:root[data-theme=dark]{--active-background: rgb(246 130 31);--hover-background: rgb(246 130 31 / .5);--active-text-color: black}#section1:where(.astro-75f4fhkp):checked~.tryit-code:where(.astro-75f4fhkp) #section1Content:where(.astro-75f4fhkp),#section2:where(.astro-75f4fhkp):checked~.tryit-code:where(.astro-75f4fhkp) #section2Content:where(.astro-75f4fhkp),#section3:where(.astro-75f4fhkp):checked~.tryit-code:where(.astro-75f4fhkp) #section3Content:where(.astro-75f4fhkp),#section4:where(.astro-75f4fhkp):checked~.tryit-code:where(.astro-75f4fhkp) #section4Content:where(.astro-75f4fhkp),#section5:where(.astro-75f4fhkp):checked~.tryit-code:where(.astro-75f4fhkp) #section5Content:where(.astro-75f4fhkp){display:block}#section1:where(.astro-75f4fhkp):checked~.tryit-sidebar:where(.astro-75f4fhkp) #section1Label:where(.astro-75f4fhkp),#section2:where(.astro-75f4fhkp):checked~.tryit-sidebar:where(.astro-75f4fhkp) #section2Label:where(.astro-75f4fhkp),#section3:where(.astro-75f4fhkp):checked~.tryit-sidebar:where(.astro-75f4fhkp) #section3Label:where(.astro-75f4fhkp),#section4:where(.astro-75f4fhkp):checked~.tryit-sidebar:where(.astro-75f4fhkp) #section4Label:where(.astro-75f4fhkp),#section5:where(.astro-75f4fhkp):checked~.tryit-sidebar:where(.astro-75f4fhkp) #section5Label:where(.astro-75f4fhkp){background-color:var(--active-background);color:var(--active-text-color)}.tryit-sidebar:where(.astro-75f4fhkp) label:where(.astro-75f4fhkp):hover{background-color:var(--hover-background)} </style> <link rel="stylesheet" href="/_astro/FooterHeroBlock_astro_astro_type_style_index_0_lang.1SfLlrSl.css"> <link rel="stylesheet" href="/_astro/WorkersIsolateDiagram_astro_astro_type_style_index_0_lang.Bc7tm2R7.css"> <meta http-equiv="X-Translated-By" content="Google"> <meta http-equiv="X-Translated-To" content="en"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.ZjNdGFGZ2ks.O/am=gAE/d=1/rs=AN8SPfpWC5s9GstbT4uidzbtJJuPzJgBiA/m=corsproxy" data-sourceurl="https://developers.cloudflare.com/queues/reference/how-queues-works/"></script> <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.ZjNdGFGZ2ks.O/am=gAE/d=1/exm=corsproxy/ed=1/rs=AN8SPfpWC5s9GstbT4uidzbtJJuPzJgBiA/m=phishing_protection" data-phishing-protection-enabled="false" data-forms-warning-enabled="true" data-source-url="https://developers.cloudflare.com/queues/reference/how-queues-works/"></script> <meta name="robots" content="none"> </head> <body class="astro-bguv2lll"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.ZjNdGFGZ2ks.O/am=gAE/d=1/exm=corsproxy,phishing_protection/ed=1/rs=AN8SPfpWC5s9GstbT4uidzbtJJuPzJgBiA/m=navigationui" data-environment="prod" data-proxy-url="https://developers-cloudflare-com.translate.goog" data-proxy-full-url="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" data-source-url="https://developers.cloudflare.com/queues/reference/how-queues-works/" data-source-language="pl" data-target-language="en" data-display-language="en-GB" data-detected-source-language="" data-is-source-untranslated="false" data-source-untranslated-url="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://developers.cloudflare.com/queues/reference/how-queues-works/&anno=2" data-client="tr"></script><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#_top" class="astro-7q3lir66">Skip to content</a> <div class="page sl-flex astro-vrdttmbt"> <header class="header astro-vrdttmbt"> <div class="header sl-flex astro-kmkmnagf"> <div class="title-wrapper sl-flex astro-kmkmnagf"><a href="https://developers-cloudflare-com.translate.goog/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" class="site-title sl-flex astro-m46x6ez3"> <img class="astro-m46x6ez3" alt src="/_astro/logo.p_ySeMR1.svg" width="40" height="19"> <span class="astro-m46x6ez3" translate="no"> Cloudflare Docs </span> </a> </div> <div class="sl-flex print:hidden astro-kmkmnagf"><sl-doc-search data-translations="{"placeholder":"Search","translations":{"button":{"buttonText":"Search","buttonAriaLabel":"Search"},"modal":{"searchBox":{},"startScreen":{},"errorScreen":{},"footer":{},"noResultsScreen":{}}}}"> <button type="button" class="DocSearch DocSearch-Button" aria-label="Search"> <span class="DocSearch-Button-Container"> <svg width="20" height="20" class="DocSearch-Search-Icon" viewbox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" /> </svg><span class="DocSearch-Button-Placeholder">Search</span> </span> <span class="DocSearch-Button-Keys"></span> </button> </sl-doc-search> <script type="module" src="/_astro/DocSearch.astro_astro_type_script_index_0_lang.hWdOIbgH.js"></script> </div> <div class="sl-hidden md:sl-flex print:hidden right-group astro-kmkmnagf"> <div class="sl-flex social-icons astro-kmkmnagf"> <div class="items-center hidden lg:flex mx-auto astro-r3tjzkat"><a href="https://developers-cloudflare-com.translate.goog/products/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Products</span> </a><a href="https://developers-cloudflare-com.translate.goog/learning-paths/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Learning</span> </a><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://www.cloudflarestatus.com/" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Status</span> </a><a href="https://developers-cloudflare-com.translate.goog/support/contacting-cloudflare-support/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Support</span> </a><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://dash.cloudflare.com" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Log in</span> </a> </div><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://github.com/cloudflare/cloudflare-docs" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">GitHub</span> <svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z" /> </svg></a><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://x.com/cloudflare" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">X</span> <svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M 18.242188 2.25 L 21.554688 2.25 L 14.324219 10.507812 L 22.828125 21.75 L 16.171875 21.75 L 10.953125 14.933594 L 4.992188 21.75 L 1.679688 21.75 L 9.40625 12.914062 L 1.257812 2.25 L 8.082031 2.25 L 12.792969 8.480469 Z M 17.082031 19.773438 L 18.914062 19.773438 L 7.082031 4.125 L 5.113281 4.125 Z M 17.082031 19.773438 " /> </svg></a><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://www.youtube.com/cloudflare" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">YouTube</span> <svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M23.5 6.2A3 3 0 0 0 21.4 4c-1.9-.5-9.4-.5-9.4-.5s-7.5 0-9.4.5A3 3 0 0 0 .5 6.3C0 8 0 12 0 12s0 4 .5 5.8A3 3 0 0 0 2.6 20c1.9.6 9.4.6 9.4.6s7.5 0 9.4-.6a3 3 0 0 0 2.1-2c.5-2 .5-5.9.5-5.9s0-4-.5-5.8zm-14 9.4V8.4l6.3 3.6-6.3 3.6z" /> </svg></a> </div><starlight-theme-select> <label style="--sl-select-width: 6.25em" class="astro-4yphtoen"> <span class="sr-only astro-4yphtoen">Select theme</span> <svg aria-hidden="true" class="icon label-icon astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z" /> </svg><select value="auto" autocomplete="off" class="astro-4yphtoen"> <option value="dark" class="astro-4yphtoen">Dark</option><option value="light" class="astro-4yphtoen">Light</option><option value="auto" selected class="astro-4yphtoen">Auto</option> </select> <svg aria-hidden="true" class="icon caret astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z" /> </svg></label> </starlight-theme-select> <script> StarlightThemeProvider.updatePickers(); </script> <script type="module">const r="starlight-theme",o=e=>e==="auto"||e==="dark"||e==="light"?e:"auto",c=()=>o(typeof localStorage<"u"&&localStorage.getItem(r));function n(e){typeof localStorage<"u"&&localStorage.setItem(r,e==="light"||e==="dark"?e:"")}const l=()=>matchMedia("(prefers-color-scheme: light)").matches?"light":"dark";function t(e){StarlightThemeProvider.updatePickers(e),document.documentElement.dataset.theme=e==="auto"?l():e,n(e)}matchMedia("(prefers-color-scheme: light)").addEventListener("change",()=>{c()==="auto"&&t("auto")});class s extends HTMLElement{constructor(){super(),t(c()),this.querySelector("select")?.addEventListener("change",a=>{a.currentTarget instanceof HTMLSelectElement&&t(o(a.currentTarget.value))})}}customElements.define("starlight-theme-select",s);</script> <script type="module">class s extends HTMLElement{constructor(){super();const e=this.querySelector("select");e&&(e.addEventListener("change",t=>{t.currentTarget instanceof HTMLSelectElement&&(window.location.pathname=t.currentTarget.value)}),window.addEventListener("pageshow",t=>{if(!t.persisted)return;const n=e.querySelector("option[selected]")?.index;n!==e.selectedIndex&&(e.selectedIndex=n??0)}))}}customElements.define("starlight-lang-select",s);</script> </div> </div> </header> <nav class="sidebar print:hidden astro-vrdttmbt" aria-label="Main"><starlight-menu-button class="print:hidden astro-jif73yzw"> <button aria-expanded="false" aria-label="Menu" aria-controls="starlight__sidebar" class="sl-flex md:sl-hidden astro-jif73yzw"> <svg aria-hidden="true" class="astro-jif73yzw astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M3 8h18a1 1 0 1 0 0-2H3a1 1 0 0 0 0 2Zm18 8H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2Zm0-5H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2Z" /> </svg></button> </starlight-menu-button> <script type="module">class s extends HTMLElement{constructor(){super(),this.btn=this.querySelector("button"),this.btn.addEventListener("click",()=>this.toggleExpanded());const t=this.closest("nav");t&&t.addEventListener("keyup",e=>this.closeOnEscape(e))}setExpanded(t){this.setAttribute("aria-expanded",String(t)),document.body.toggleAttribute("data-mobile-menu-expanded",t)}toggleExpanded(){this.setExpanded(this.getAttribute("aria-expanded")!=="true")}closeOnEscape(t){t.code==="Escape"&&(this.setExpanded(!1),this.btn.focus())}}customElements.define("starlight-menu-button",s);</script> <div id="starlight__sidebar" class="sidebar-pane astro-vrdttmbt"> <div class="sidebar-content sl-flex astro-vrdttmbt"><a href="https://developers-cloudflare-com.translate.goog/queues/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" class="flex items-center gap-2 px-1 no-underline"> <svg width="32px" height="32px" class="text-cl1-brand-orange" data-icon="queues"><symbol id="ai:local:queues" viewbox="0 0 40 40"> <path fill="currentColor" d="M11.154 19.894 5.33 14.21l-1.612 1.65 2.656 2.594H1.942a1.442 1.442 0 1 0 0 2.884h4.433L3.72 23.927l1.61 1.653 5.823-5.685Zm28.352 0-5.823-5.685-1.612 1.65 2.656 2.594h-4.433a1.442 1.442 0 1 0 0 2.884h4.433l-2.655 2.591 1.611 1.651z" /> <rect width="23.07" height="2.884" x="7.911" y="7" fill="currentColor" rx="1.442" /> <rect width="23.07" height="2.884" x="7.911" y="30.07" fill="currentColor" rx="1.442" /> <path fill="currentColor" d="M13.679 14.21c.796 0 1.442.645 1.442 1.441v8.651a1.442 1.442 0 1 1-2.884 0v-8.65c0-.797.646-1.443 1.442-1.443Zm5.767 0c.797 0 1.442.645 1.442 1.441v8.651a1.442 1.442 0 1 1-2.884 0v-8.65c0-.797.646-1.443 1.442-1.443Zm5.768 0c.796 0 1.442.645 1.442 1.441v8.651a1.442 1.442 0 1 1-2.884 0v-8.65c0-.797.645-1.443 1.442-1.443Z" /> </symbol><use href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#ai:local:queues"></use> </svg><span class="text-xl text-black"> <strong> Queues </strong> </span> </a> <!-- @ts-expect-error sidebar props don't match as we add additional things --> <sl-sidebar-state-persist data-hash="0dabvlx" class="astro-kku4brbg"> <script aria-hidden="true"> (() => { try { if (!matchMedia('(min-width: 50em)').matches) return; /** @type {HTMLElement | null} */ const target = document.querySelector('sl-sidebar-state-persist'); const state = JSON.parse(sessionStorage.getItem('sl-sidebar-state') || '0'); if (!target || !state || target.dataset.hash !== state.hash) return; window._starlightScrollRestore = state.scroll; customElements.define( 'sl-sidebar-restore', class SidebarRestore extends HTMLElement { connectedCallback() { try { const idx = parseInt(this.dataset.index || ''); const details = this.closest('details'); if (details && typeof state.open[idx] === 'boolean') details.open = state.open[idx]; } catch {} } } ); } catch {} })(); </script> <ul class="top-level astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="large astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/get-started/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="large astro-3ii7xxms"> <span class="astro-3ii7xxms">Get started</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="0"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Configuration</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/configuration/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms" data-group-label="Configuration"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/configuration/configure-queues/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Configure Queues</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/configuration/batching-retries/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Batching, Retries and Delays</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/configuration/dead-letter-queues/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Dead Letter Queues</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/configuration/pull-consumers/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Pull consumers</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/configuration/consumer-concurrency/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Consumer concurrency</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/configuration/javascript-apis/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">JavaScript APIs</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/configuration/local-development/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Local Development</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/r2/buckets/event-notifications/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">R2 Event Notifications ↗</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="1"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Observability</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/observability/metrics/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Metrics</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="2"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Examples</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/examples/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms" data-group-label="Examples"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/reference-architecture/diagrams/serverless/serverless-etl/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Serverless ETL pipelines ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/examples/use-queues-with-durable-objects/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Use Queues from Durable Objects</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/examples/publish-to-a-queue-over-http/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Publish to a Queue via HTTP</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/examples/send-errors-to-r2/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Use Queues to store data in R2</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/examples/send-messages-from-dash/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Send messages from the dashboard</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/examples/list-messages-from-dash/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">List and acknowledge messages from the dashboard</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/tutorials/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="large astro-3ii7xxms" data-hide-children="true"> <span class="astro-3ii7xxms">Tutorials</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/demos/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="large astro-3ii7xxms"> <span class="astro-3ii7xxms">Demos and architectures</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="3"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Platform</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/platform/pricing/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Pricing</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/platform/limits/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Limits</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/platform/storage-options/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Choose a data or storage product ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/platform/changelog/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Changelog</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/platform/audit-logs/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Audit Logs</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"><sl-sidebar-restore data-index="4"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Reference</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="page" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">How Queues Works</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/delivery-guarantees/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Delivery guarantees</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/commands/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#queues" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Wrangler commands ↗</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/glossary/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="large astro-3ii7xxms"> <span class="astro-3ii7xxms">Glossary</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/api/resources/queues/methods/create/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" aria-current="false" class="large astro-3ii7xxms"> <span class="astro-3ii7xxms">Queues REST API ↗</span> <span class="sl-badge note small astro-3ii7xxms astro-avdet4wd">API</span> </a></li> </ul> <script aria-hidden="true"> (() => { const scroller = document.getElementById('starlight__sidebar'); if (!window._starlightScrollRestore || !scroller) return; scroller.scrollTop = window._starlightScrollRestore; delete window._starlightScrollRestore; })(); </script> </sl-sidebar-state-persist> <div class="md:sl-hidden"> <div class="mobile-preferences sl-flex astro-wu23bvmt"> <div class="sl-flex social-icons astro-wu23bvmt"> <div class="items-center hidden lg:flex mx-auto astro-r3tjzkat"><a href="https://developers-cloudflare-com.translate.goog/products/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Products</span> </a><a href="https://developers-cloudflare-com.translate.goog/learning-paths/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Learning</span> </a><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://www.cloudflarestatus.com/" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Status</span> </a><a href="https://developers-cloudflare-com.translate.goog/support/contacting-cloudflare-support/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Support</span> </a><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://dash.cloudflare.com" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Log in</span> </a> </div><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://github.com/cloudflare/cloudflare-docs" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">GitHub</span> <svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z" /> </svg></a><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://x.com/cloudflare" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">X</span> <svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M 18.242188 2.25 L 21.554688 2.25 L 14.324219 10.507812 L 22.828125 21.75 L 16.171875 21.75 L 10.953125 14.933594 L 4.992188 21.75 L 1.679688 21.75 L 9.40625 12.914062 L 1.257812 2.25 L 8.082031 2.25 L 12.792969 8.480469 Z M 17.082031 19.773438 L 18.914062 19.773438 L 7.082031 4.125 L 5.113281 4.125 Z M 17.082031 19.773438 " /> </svg></a><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://www.youtube.com/cloudflare" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">YouTube</span> <svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M23.5 6.2A3 3 0 0 0 21.4 4c-1.9-.5-9.4-.5-9.4-.5s-7.5 0-9.4.5A3 3 0 0 0 .5 6.3C0 8 0 12 0 12s0 4 .5 5.8A3 3 0 0 0 2.6 20c1.9.6 9.4.6 9.4.6s7.5 0 9.4-.6a3 3 0 0 0 2.1-2c.5-2 .5-5.9.5-5.9s0-4-.5-5.8zm-14 9.4V8.4l6.3 3.6-6.3 3.6z" /> </svg></a> </div><starlight-theme-select> <label style="--sl-select-width: 6.25em" class="astro-4yphtoen"> <span class="sr-only astro-4yphtoen">Select theme</span> <svg aria-hidden="true" class="icon label-icon astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z" /> </svg><select value="auto" autocomplete="off" class="astro-4yphtoen"> <option value="dark" class="astro-4yphtoen">Dark</option><option value="light" class="astro-4yphtoen">Light</option><option value="auto" selected class="astro-4yphtoen">Auto</option> </select> <svg aria-hidden="true" class="icon caret astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z" /> </svg></label> </starlight-theme-select> <script> StarlightThemeProvider.updatePickers(); </script> </div> </div> </div> </div> </nav> <div class="main-frame astro-vrdttmbt"> <script type="module">const a=document.getElementById("starlight__sidebar"),n=a?.querySelector("sl-sidebar-state-persist"),o="sl-sidebar-state",i=()=>{let t=[];const e=n?.dataset.hash||"";try{const s=sessionStorage.getItem(o),r=JSON.parse(s||"{}");Array.isArray(r.open)&&r.hash===e&&(t=r.open)}catch{}return{hash:e,open:t,scroll:a?.scrollTop||0}},c=t=>{try{sessionStorage.setItem(o,JSON.stringify(t))}catch{}},d=()=>c(i()),l=(t,e)=>{const s=i();s.open[e]=t,c(s)};n?.addEventListener("click",t=>{if(!(t.target instanceof Element))return;const e=t.target.closest("summary")?.closest("details");if(!e)return;const s=e.querySelector("sl-sidebar-restore"),r=parseInt(s?.dataset.index||"");isNaN(r)||l(!e.open,r)});addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&d()});addEventListener("pageHide",d);</script> <div class="lg:sl-flex astro-67yu43on"> <aside class="right-sidebar-container print:hidden astro-67yu43on"> <div class="right-sidebar astro-67yu43on"> <style>astro-island,astro-slot,astro-static-slot{display:contents}</style> <script>(()=>{var l=(n,t)=>{let i=async()=>{await(await n())()},e=typeof t.value=="object"?t.value:void 0,s={timeout:e==null?void 0:e.timeout};"requestIdleCallback"in window?window.requestIdleCallback(i,s):setTimeout(i,s.timeout||200)};(self.Astro||(self.Astro={})).idle=l;window.dispatchEvent(new Event("astro:idle"));})();;(()=>{var A=Object.defineProperty;var g=(i,o,a)=>o in i?A(i,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[o]=a;var d=(i,o,a)=>g(i,typeof o!="symbol"?o+"":o,a);{let i={0:t=>m(t),1:t=>a(t),2:t=>new RegExp(t),3:t=>new Date(t),4:t=>new Map(a(t)),5:t=>new Set(a(t)),6:t=>BigInt(t),7:t=>new URL(t),8:t=>new Uint8Array(t),9:t=>new Uint16Array(t),10:t=>new Uint32Array(t),11:t=>1/0*t},o=t=>{let[l,e]=t;return l in i?i[l](e):void 0},a=t=>t.map(o),m=t=>typeof t!="object"||t===null?t:Object.fromEntries(Object.entries(t).map(([l,e])=>[l,o(e)]));class y extends HTMLElement{constructor(){super(...arguments);d(this,"Component");d(this,"hydrator");d(this,"hydrate",async()=>{var b;if(!this.hydrator||!this.isConnected)return;let e=(b=this.parentElement)==null?void 0:b.closest("astro-island[ssr]");if(e){e.addEventListener("astro:hydrate",this.hydrate,{once:!0});return}let c=this.querySelectorAll("astro-slot"),n={},h=this.querySelectorAll("template[data-astro-template]");for(let r of h){let s=r.closest(this.tagName);s!=null&&s.isSameNode(this)&&(n[r.getAttribute("data-astro-template")||"default"]=r.innerHTML,r.remove())}for(let r of c){let s=r.closest(this.tagName);s!=null&&s.isSameNode(this)&&(n[r.getAttribute("name")||"default"]=r.innerHTML)}let p;try{p=this.hasAttribute("props")?m(JSON.parse(this.getAttribute("props"))):{}}catch(r){let s=this.getAttribute("component-url")||"<unknown>",v=this.getAttribute("component-export");throw v&&(s+=` (export ${v})`),console.error(`[hydrate] Error parsing props for component ${s}`,this.getAttribute("props"),r),r}let u;await this.hydrator(this)(this.Component,p,n,{client:this.getAttribute("client")}),this.removeAttribute("ssr"),this.dispatchEvent(new CustomEvent("astro:hydrate"))});d(this,"unmount",()=>{this.isConnected||this.dispatchEvent(new CustomEvent("astro:unmount"))})}disconnectedCallback(){document.removeEventListener("astro:after-swap",this.unmount),document.addEventListener("astro:after-swap",this.unmount,{once:!0})}connectedCallback(){if(!this.hasAttribute("await-children")||document.readyState==="interactive"||document.readyState==="complete")this.childrenConnectedCallback();else{let e=()=>{document.removeEventListener("DOMContentLoaded",e),c.disconnect(),this.childrenConnectedCallback()},c=new MutationObserver(()=>{var n;((n=this.lastChild)==null?void 0:n.nodeType)===Node.COMMENT_NODE&&this.lastChild.nodeValue==="astro:end"&&(this.lastChild.remove(),e())});c.observe(this,{childList:!0}),document.addEventListener("DOMContentLoaded",e)}}async childrenConnectedCallback(){let e=this.getAttribute("before-hydration-url");e&&await import(e),this.start()}async start(){let e=JSON.parse(this.getAttribute("opts")),c=this.getAttribute("client");if(Astro[c]===void 0){window.addEventListener(`astro:${c}`,()=>this.start(),{once:!0});return}try{await Astro[c](async()=>{let n=this.getAttribute("renderer-url"),[h,{default:p}]=await Promise.all([import(this.getAttribute("component-url")),n?import(n):()=>()=>{}]),u=this.getAttribute("component-export")||"default";if(!u.includes("."))this.Component=h[u];else{this.Component=h;for(let f of u.split("."))this.Component=this.Component[f]}return this.hydrator=p,this.hydrate},e,this)}catch(n){console.error(`[astro-island] Error hydrating ${this.getAttribute("component-url")}`,n)}}attributeChangedCallback(){this.hydrate()}}d(y,"observedAttributes",["props"]),customElements.get("astro-island")||customElements.define("astro-island",y)}})();</script> <div class="lg:sl-hidden astro-pb3aqygn"> <mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-doynk5tl"> <nav aria-labelledby="starlight__on-this-page--mobile" class="astro-doynk5tl"> <details id="starlight__mobile-toc" class="astro-doynk5tl"> <summary id="starlight__on-this-page--mobile" class="sl-flex astro-doynk5tl"> <div class="toggle sl-flex astro-doynk5tl"> On this page <svg aria-hidden="true" class="caret astro-doynk5tl astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg> </div><span class="display-current astro-doynk5tl"></span></summary> <div class="dropdown astro-doynk5tl"> <ul class="isMobile astro-g2bywc46" style="--depth: 0;"> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#_top" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Overview</span> </a></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#what-is-a-queue" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">What is a queue</span> </a></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#producers" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Producers</span> </a> <ul class="isMobile astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#content-types" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Content types</span> </a></li> </ul></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#consumers" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Consumers</span> </a> <ul class="isMobile astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#create-a-consumer-worker" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Create a consumer Worker</span> </a></li> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#remove-a-consumer" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Remove a consumer</span> </a></li> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#pull-consumers" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Pull consumers</span> </a></li> </ul></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#messages" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Messages</span> </a></li> </ul> </div> </details> </nav> </mobile-starlight-toc> <script type="module" src="/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.CwvHEPnB.js"></script> </div> <div class="right-sidebar-panel sl-hidden lg:sl-block astro-pb3aqygn"> <div class="sl-container astro-pb3aqygn"> <starlight-toc data-min-h="2" data-max-h="3"> <nav aria-labelledby="starlight__on-this-page"> <h2 id="starlight__on-this-page">On this page</h2> <ul class="astro-g2bywc46" style="--depth: 0;"> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#_top" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Overview</span> </a></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#what-is-a-queue" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">What is a queue</span> </a></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#producers" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Producers</span> </a> <ul class="astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#content-types" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Content types</span> </a></li> </ul></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#consumers" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Consumers</span> </a> <ul class="astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#create-a-consumer-worker" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Create a consumer Worker</span> </a></li> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#remove-a-consumer" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Remove a consumer</span> </a></li> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#pull-consumers" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Pull consumers</span> </a></li> </ul></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#messages" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Messages</span> </a></li> </ul> </nav> </starlight-toc> <script type="module" src="/_astro/TableOfContents.astro_astro_type_script_index_0_lang.CxWEh7Yp.js"></script><br> <div class="flex gap-2"><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/queues/reference/how-queues-works.mdx" class="h-8 cursor-pointer content-center rounded bg-cl1-brand-orange px-4 text-sm font-medium text-cl1-black"> <svg aria-hidden="true" class=" astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z" /> </svg> Edit </a> <a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://github.com/cloudflare/cloudflare-docs/issues/new/choose" class="h-8 cursor-pointer content-center rounded bg-cl1-brand-orange px-4 text-sm font-medium text-cl1-black"> <svg aria-hidden="true" class=" astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z" /> </svg> Issue </a> </div><br><astro-island uid="ZcQfTO" prefix="r1" component-url="/_astro/FeedbackPrompt.sIVdSYEF.js" component-export="default" renderer-url="/_astro/client.BUsrUfVi.js" props="{}" ssr client="idle" opts="{"name":"FeedbackPrompt","value":true}" await-children> <div> <h2>Was this helpful?</h2><button class="cursor-pointer bg-transparent"> <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewbox="0 0 24 24" class="text-2xl text-sl hover:text-accent" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"> <path fill="none" d="M0 0h24v24H0V0zm0 0h24v24H0V0z" /><path d="M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.58 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2zM9 9l4.34-4.34L12 10h9v2l-3 7H9V9zM1 9h4v12H1z" /> </svg></button><button class="cursor-pointer bg-transparent"> <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewbox="0 0 24 24" class="text-2xl text-sl hover:text-accent" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"> <path fill="none" d="M0 0h24v24H0V0zm0 0h24v24H0V0z" /><path d="M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z" /> </svg></button> </div><!--astro:end--> </astro-island> </div> </div> </div> </aside> <div class="main-pane astro-67yu43on"> <main data-pagefind-body class="astro-bguv2lll" lang="en" dir="ltr"> <div class="content-panel astro-7nkwcw3z"> <div class="sl-container astro-7nkwcw3z"><astro-breadcrumbs data-main-bem-class="c-breadcrumbs" data-id="breadcrumbs" data-path-length="3" data-truncated="true"> <nav aria-label="breadcrumbs" class="c-breadcrumbs" id="breadcrumbs"> <ol class="c-breadcrumbs__crumbs has-separators"> <li class="c-breadcrumbs__crumb"><a href="https://developers-cloudflare-com.translate.goog/products/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" class="c-breadcrumbs__link is-index" aria-current="false"> Products </a> <span class="c-breadcrumbs__separator" aria-hidden="true"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="astro-couag5ji"> <polyline points="9 18 15 12 9 6" class="astro-couag5ji"></polyline> </svg></span></li> <li class="c-breadcrumbs__crumb has-ellipsis"><button type="button" aria-label="Show hidden navigation" class="c-breadcrumbs__truncated-button"> … </button> <span class="c-breadcrumbs__separator" aria-hidden="true"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="astro-couag5ji"> <polyline points="9 18 15 12 9 6" class="astro-couag5ji"></polyline> </svg></span></li> <li class="c-breadcrumbs__crumb"><a href="https://developers-cloudflare-com.translate.goog/queues/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" class="c-breadcrumbs__link" aria-current="false"> Queues </a> <span class="c-breadcrumbs__separator" aria-hidden="true"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="astro-couag5ji"> <polyline points="9 18 15 12 9 6" class="astro-couag5ji"></polyline> </svg></span></li> <li class="c-breadcrumbs__crumb"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" class="c-breadcrumbs__link" aria-current="false"> Reference </a> <span class="c-breadcrumbs__separator" aria-hidden="true"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="astro-couag5ji"> <polyline points="9 18 15 12 9 6" class="astro-couag5ji"></polyline> </svg></span></li> <li class="c-breadcrumbs__crumb"><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" class="c-breadcrumbs__link is-current" aria-current="location"> How Queues Works </a></li> </ol> </nav> </astro-breadcrumbs> <script type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/products/","name":"Products"}},{"@type":"ListItem","position":2,"item":{"@id":"/queues/","name":"Queues"}},{"@type":"ListItem","position":3,"item":{"@id":"/queues/reference/","name":"Reference"}},{"@type":"ListItem","position":4,"item":{"@id":"/queues/reference/how-queues-works/","name":"How Queues Works"}}]}</script> <script type="module">class t extends HTMLElement{constructor(){super(),this.isManualToggle=!1,this.breadcrumbs=null,this.mainBemClass=null,this.totalWidth=0,this.resizeObserver=null,this.handleTruncatedButtonClick=()=>{this.breadcrumbs?.classList.remove("is-truncated"),this.isManualToggle=!0},this.mainBemClass=this.dataset.mainBemClass||null;const e=this.dataset.id;!("truncated"in this.dataset)||!e||(this.breadcrumbs=document.getElementById(e),this.initializeCrumbs(),this.setupResizeObserver())}initializeCrumbs(){this.breadcrumbs?.querySelectorAll(`.${this.mainBemClass}__crumb`)?.forEach(s=>{this.totalWidth+=s.offsetWidth})}setupResizeObserver(){this.resizeObserver=new ResizeObserver(e=>{e.forEach(s=>{this.checkOverflow(s.target.clientWidth)})}),this.breadcrumbs&&this.resizeObserver.observe(this.breadcrumbs)}connectedCallback(){this.showHiddenCrumbs()}disconnectedCallback(){this.resizeObserver&&this.breadcrumbs&&(this.resizeObserver.unobserve(this.breadcrumbs),this.resizeObserver.disconnect())}toggleTruncated(e){this.breadcrumbs?.classList.toggle("is-truncated",e)}showHiddenCrumbs(){const e=this.breadcrumbs?.querySelector(`.${this.mainBemClass}__truncated-button`);e?.removeEventListener("click",this.handleTruncatedButtonClick),e?.addEventListener("click",this.handleTruncatedButtonClick.bind(this))}checkOverflow(e){const s=this.totalWidth>e&&!this.isManualToggle;this.toggleTruncated(s),s||(this.isManualToggle=!1)}}customElements.get("astro-breadcrumbs")||customElements.define("astro-breadcrumbs",t);</script> <h1 id="_top" class="astro-j6tvhyss">How Queues Works</h1> </div> </div> <div class="content-panel astro-7nkwcw3z"> <div class="sl-container astro-7nkwcw3z"><starlight-image-zoom> <template class="astro-vjux6bgf"><dialog class="starlight-image-zoom-dialog astro-vjux6bgf"> <button aria-label="Unzoom image" class="starlight-image-zoom-control astro-vjux6bgf"> <svg aria-hidden="true" fill="currentColor" viewbox="0 0 24 24" class="astro-vjux6bgf"><use href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#starlight-image-zoom-icon-unzoom" class="astro-vjux6bgf"></use> </svg></button> <figure class="astro-vjux6bgf"></figure> </dialog> </template> <svg xmlns="http://www.w3.org/2000/svg" style="display:none" class="astro-vjux6bgf"><symbol id="starlight-image-zoom-icon-zoom" viewbox="0 0 24 24" class="astro-vjux6bgf"> <path d="M9.79 12.79 4 18.59V17a1 1 0 0 0-2 0v4a1 1 0 0 0 .08.38 1 1 0 0 0 .54.54A1 1 0 0 0 3 22h4a1 1 0 0 0 0-2H5.41l5.8-5.79a1 1 0 0 0-1.42-1.42ZM21.92 2.62a1 1 0 0 0-.54-.54A1 1 0 0 0 21 2h-4a1 1 0 0 0 0 2h1.59l-5.8 5.79a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0L20 5.41V7a1 1 0 0 0 2 0V3a1 1 0 0 0-.08-.38Z" class="astro-vjux6bgf" /> </symbol> <symbol id="starlight-image-zoom-icon-unzoom" viewbox="0 0 24 24" class="astro-vjux6bgf"> <path d="M21.71 2.29a1 1 0 0 0-1.42 0l-5.79 5.8V6.5a1 1 0 0 0-2 0v4a1 1 0 0 0 .08.38 1 1 0 0 0 .54.54 1 1 0 0 0 .38.08h4a1 1 0 0 0 0-2h-1.59l5.8-5.79a1 1 0 0 0 0-1.42ZM10.88 12.58a1 1 0 0 0-.38-.08h-4a1 1 0 0 0 0 2h1.59l-5.8 5.79a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l5.79-5.8v1.59a1 1 0 0 0 2 0v-4a1 1 0 0 0-.08-.38 1 1 0 0 0-.54-.54Z" class="astro-vjux6bgf" /> </symbol> </svg> </starlight-image-zoom> <script type="module" src="/_astro/ImageZoom.astro_astro_type_script_index_0_lang.BjAW4avr.js"></script> <div class="sl-markdown-content astro-cedpceuv"> <p>Cloudflare Queues is a flexible messaging queue that allows you to queue messages for asynchronous processing. Message queues are great at decoupling components of applications, like the checkout and order fulfillment services for an e-commerce site. Decoupled services are easier to reason about, deploy, and implement, allowing you to ship features that delight your customers without worrying about synchronizing complex deployments. Queues also allow you to batch and buffer calls to downstream services and APIs.</p> <p>There are four major concepts to understand with Queues:</p> <ol> <li><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#what-is-a-queue">Queues</a></li> <li><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#producers">Producers</a></li> <li><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#consumers">Consumers</a></li> <li><a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#messages">Messages</a></li> </ol> <div tabindex="-1" class="heading-wrapper level-h2"> <h2 id="what-is-a-queue">What is a queue</h2><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#what-is-a-queue"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <p>A queue is a buffer or list that automatically scales as messages are written to it, and allows a consumer Worker to pull messages from that same queue.</p> <p>Queues are designed to be reliable, and messages written to a queue should never be lost once the write succeeds. Similarly, messages are not deleted from a queue until the <a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#consumers">consumer</a> has successfully consumed the message.</p> <p>Queues does not guarantee that messages will be delivered to a consumer in the same order in which they are published.</p> <p>Developers can create multiple queues. Creating multiple queues can be useful to:</p> <ul> <li>Separate different use-cases and processing requirements: for example, a logging queue vs. a password reset queue.</li> <li>Horizontally scale your overall throughput (messages per second) by using multiple queues to scale out.</li> <li>Configure different batching strategies for each consumer connected to a queue.</li> </ul> <p>For most applications, a single producer Worker per queue, with a single consumer Worker consuming messages from that queue allows you to logically separate the processing for each of your queues.</p> <div tabindex="-1" class="heading-wrapper level-h2"> <h2 id="producers">Producers</h2><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#producers"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <p>A producer is the term for a client that is publishing or producing messages on to a queue. A producer is configured by <a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/bindings/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB">binding</a> a queue to a Worker and writing messages to the queue by calling that binding.</p> <p>For example, if we bound a queue named <code dir="auto">my-first-queue</code> to a binding of <code dir="auto">MY_FIRST_QUEUE</code>, messages can be written to the queue by calling <code dir="auto">send()</code> on the binding:</p> <div class="expressive-code"> <link rel="stylesheet" href="/_astro/ec.rt9t7.css"> <script type="module" src="/_astro/ec.8zarh.js"></script> <figure class="frame not-content"> <figcaption class="header"></figcaption> <pre data-language="ts"><code> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">type</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">Environment</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">readonly</span><span style="--0:#EEFFFF;--1:#62676A"> MY_FIRST_QUEUE</span><span style="--0:#EE9080;--1:#8F1500">:</span><span style="--0:#EEFFFF;--1:#007474"> </span><span style="--0:#57C78F;--1:#00783C">Queue</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">};</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">export</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">default</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">async</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">fetch</span><span style="--0:#89DDFF;--1:#007474">(</span><span style="--0:#B59EE1;--1:#7C008F">req</span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#B59EE1;--1:#7C008F">env</span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#B59EE1;--1:#7C008F">context</span><span style="--0:#89DDFF;--1:#007474">)</span><span style="--0:#EE9080;--1:#8F1500">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">Promise</span><span style="--0:#89DDFF;--1:#007474"><</span><span style="--0:#57C78F;--1:#00783C">Response</span><span style="--0:#89DDFF;--1:#007474">></span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">let</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#D5D7D8;--1:#8F1500">message</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"><span style="--0:#EE9080;--1:#32008F"> </span></span><span style="--0:#EE9080;--1:#32008F">url</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">req</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#EEFFFF;--1:#00268F">url</span><span style="--0:#89DDFF;--1:#007474">,</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"><span style="--0:#EE9080;--1:#32008F"> </span></span><span style="--0:#EE9080;--1:#32008F">method</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">req</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#EEFFFF;--1:#00268F">method</span><span style="--0:#89DDFF;--1:#007474">,</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"><span style="--0:#EE9080;--1:#32008F"> </span></span><span style="--0:#EE9080;--1:#32008F">headers</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">Object</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">fromEntries</span><span style="--0:#EE9080;--1:#32008F">(</span><span style="--0:#EEFFFF;--1:#00268F">req</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#EEFFFF;--1:#00268F">headers</span><span style="--0:#EE9080;--1:#32008F">)</span><span style="--0:#89DDFF;--1:#007474">,</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">};</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">await</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">env</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#EEFFFF;--1:#00268F">MY_FIRST_QUEUE</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">send</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#D5D7D8;--1:#8F1500">message</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// This will throw an exception if the send fails for any reason</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">},</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">satisfies</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">ExportedHandler</span><span style="--0:#89DDFF;--1:#007474"><</span><span style="--0:#57C78F;--1:#00783C">Environment</span><span style="--0:#89DDFF;--1:#007474">>;</span> </div> </div></code></pre> <div class="copy"> <button title="Copy to clipboard" data-copied="Copied!" data-code="type Environment = { readonly MY_FIRST_QUEUE: Queue;};export default { async fetch(req, env, context): Promise<Response> { let message = { url: req.url, method: req.method, headers: Object.fromEntries(req.headers), }; await env.MY_FIRST_QUEUE.send(message); // This will throw an exception if the send fails for any reason },} satisfies ExportedHandler<Environment>;"> <div></div></button> </div> </figure> </div> <aside aria-label="Note" class="starlight-aside starlight-aside--note"> <p class="starlight-aside__title" aria-hidden="true"> <svg viewbox="0 0 24 24" width="16" height="16" fill="currentColor" class="starlight-aside__icon"> <path d="M12 11C11.7348 11 11.4804 11.1054 11.2929 11.2929C11.1054 11.4804 11 11.7348 11 12V16C11 16.2652 11.1054 16.5196 11.2929 16.7071C11.4804 16.8946 11.7348 17 12 17C12.2652 17 12.5196 16.8946 12.7071 16.7071C12.8946 16.5196 13 16.2652 13 16V12C13 11.7348 12.8946 11.4804 12.7071 11.2929C12.5196 11.1054 12.2652 11 12 11ZM12.38 7.08C12.1365 6.97998 11.8635 6.97998 11.62 7.08C11.4973 7.12759 11.3851 7.19896 11.29 7.29C11.2017 7.3872 11.1306 7.49882 11.08 7.62C11.024 7.73868 10.9966 7.86882 11 8C10.9992 8.13161 11.0245 8.26207 11.0742 8.38391C11.124 8.50574 11.1973 8.61656 11.29 8.71C11.3872 8.79833 11.4988 8.86936 11.62 8.92C11.7715 8.98224 11.936 9.00632 12.099 8.99011C12.2619 8.97391 12.4184 8.91792 12.5547 8.82707C12.691 8.73622 12.8029 8.61328 12.8805 8.46907C12.9582 8.32486 12.9992 8.16378 13 8C12.9963 7.73523 12.8927 7.48163 12.71 7.29C12.6149 7.19896 12.5028 7.12759 12.38 7.08ZM12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM12 20C10.4178 20 8.87104 19.5308 7.55544 18.6518C6.23985 17.7727 5.21447 16.5233 4.60897 15.0615C4.00347 13.5997 3.84504 11.9911 4.15372 10.4393C4.4624 8.88743 5.22433 7.46197 6.34315 6.34315C7.46197 5.22433 8.88743 4.4624 10.4393 4.15372C11.9911 3.84504 13.5997 4.00346 15.0615 4.60896C16.5233 5.21447 17.7727 6.23984 18.6518 7.55544C19.5308 8.87103 20 10.4177 20 12C20 14.1217 19.1572 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20Z" /> </svg>Note</p> <div class="starlight-aside__content"> <p>You can also use <a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/context/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#waituntil"><code dir="auto">context.waitUntil()</code></a> to send the message without blocking the response.</p> <p>Note that because <code dir="auto">waitUntil()</code> is non-blocking, any errors raised from the <code dir="auto">send()</code> or <code dir="auto">sendBatch()</code> methods on a queue will be implicitly ignored.</p> </div> </aside> <p>A queue can have multiple producer Workers. For example, you may have multiple producer Workers writing events or logs to a shared queue based on incoming HTTP requests from users. There is no limit to the total number of producer Workers that can write to a single queue.</p> <p>Additionally, multiple queues can be bound to a single Worker. That single Worker can decide which queue to write to (or write to multiple) based on any logic you define in your code.</p> <div tabindex="-1" class="heading-wrapper level-h3"> <h3 id="content-types">Content types</h3><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#content-types"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <p>Messages published to a queue can be published in different formats, depending on what interoperability is needed with your consumer. The default content type is <code dir="auto">json</code>, which means that any object that can be passed to <code dir="auto">JSON.stringify()</code> will be accepted.</p> <p>To explicitly set the content type or specify an alternative content type, pass the <code dir="auto">contentType</code> option to the <code dir="auto">send()</code> method of your queue:</p> <div class="expressive-code"> <figure class="frame not-content"> <figcaption class="header"></figcaption> <pre data-language="ts"><code> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">type</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">Environment</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">readonly</span><span style="--0:#EEFFFF;--1:#62676A"> MY_FIRST_QUEUE</span><span style="--0:#EE9080;--1:#8F1500">:</span><span style="--0:#EEFFFF;--1:#007474"> </span><span style="--0:#57C78F;--1:#00783C">Queue</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">};</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">export</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">default</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">async</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">fetch</span><span style="--0:#89DDFF;--1:#007474">(</span><span style="--0:#B59EE1;--1:#7C008F">req</span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#B59EE1;--1:#7C008F">env</span><span style="--0:#89DDFF;--1:#007474">)</span><span style="--0:#EE9080;--1:#8F1500">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">Promise</span><span style="--0:#89DDFF;--1:#007474"><</span><span style="--0:#57C78F;--1:#00783C">Response</span><span style="--0:#89DDFF;--1:#007474">></span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">let</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#D5D7D8;--1:#8F1500">message</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"><span style="--0:#EE9080;--1:#32008F"> </span></span><span style="--0:#EE9080;--1:#32008F">url</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">req</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#EEFFFF;--1:#00268F">url</span><span style="--0:#89DDFF;--1:#007474">,</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"><span style="--0:#EE9080;--1:#32008F"> </span></span><span style="--0:#EE9080;--1:#32008F">method</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">req</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#EEFFFF;--1:#00268F">method</span><span style="--0:#89DDFF;--1:#007474">,</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"><span style="--0:#EE9080;--1:#32008F"> </span></span><span style="--0:#EE9080;--1:#32008F">headers</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">Object</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">fromEntries</span><span style="--0:#EE9080;--1:#32008F">(</span><span style="--0:#EEFFFF;--1:#00268F">req</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#EEFFFF;--1:#00268F">headers</span><span style="--0:#EE9080;--1:#32008F">)</span><span style="--0:#89DDFF;--1:#007474">,</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">};</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">try</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">await</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">env</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#EEFFFF;--1:#00268F">MY_FIRST_QUEUE</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">send</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#D5D7D8;--1:#8F1500">message</span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--0:#EEFFFF;--1:#62676A"> contentType</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#FDDA68;--1:#A84E00">"json"</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// "json" is the default</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">catch</span><span style="--0:#EEFFFF;--1:#62676A"> (</span><span style="--0:#D5D7D8;--1:#8F1500">e</span><span style="--0:#EEFFFF;--1:#62676A">) </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// Catch cases where send fails, including due to a mismatched content type</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"><span style="--0:#EEFFFF"> </span></span><span style="--0:#EEFFFF;--1:#00268F">console</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">log</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#D5D7D8;--1:#8F1500">e</span><span style="--0:#EEFFFF;--1:#62676A">)</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">return</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">Response</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">json</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--0:#FDDA68;--1:#A84E00">"msg"</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#D5D7D8;--1:#8F1500">e</span><span style="--0:#89DDFF;--1:#007474">},</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--0:#EEFFFF;--1:#62676A"> status</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#B59EE1;--1:#7C008F">500</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A">)</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">},</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">satisfies</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">ExportedHandler</span><span style="--0:#89DDFF;--1:#007474"><</span><span style="--0:#57C78F;--1:#00783C">Environment</span><span style="--0:#89DDFF;--1:#007474">>;</span> </div> </div></code></pre> <div class="copy"> <button title="Copy to clipboard" data-copied="Copied!" data-code="type Environment = { readonly MY_FIRST_QUEUE: Queue;};export default { async fetch(req, env): Promise<Response> { let message = { url: req.url, method: req.method, headers: Object.fromEntries(req.headers), }; try { await env.MY_FIRST_QUEUE.send(message, { contentType: "json" }); // "json" is the default } catch (e) { // Catch cases where send fails, including due to a mismatched content type console.log(e) return Response.json({"msg": e}, { status: 500 }) } },} satisfies ExportedHandler<Environment>;"> <div></div></button> </div> </figure> </div> <p>To only accept simple strings when writing to a queue, set <code dir="auto">{ contentType: "text" }</code> instead:</p> <div class="expressive-code"> <figure class="frame not-content"> <figcaption class="header"></figcaption> <pre data-language="ts"><code> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">try</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// This will throw an exception (error) if you write to pass a non-string to the queue, such as a</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// native JavaScript object or ArrayBuffer.</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">await</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">env</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#EEFFFF;--1:#00268F">MY_FIRST_QUEUE</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">send</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#FDDA68;--1:#A84E00">"hello there"</span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--0:#EEFFFF;--1:#62676A"> contentType</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#FDDA68;--1:#A84E00">"text"</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// explicitly set 'text'</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">catch</span><span style="--0:#EEFFFF;--1:#62676A"> (</span><span style="--0:#D5D7D8;--1:#8F1500">e</span><span style="--0:#EEFFFF;--1:#62676A">) </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"><span style="--0:#EEFFFF"> </span></span><span style="--0:#EEFFFF;--1:#00268F">console</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">log</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#D5D7D8;--1:#8F1500">e</span><span style="--0:#EEFFFF;--1:#62676A">)</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">return</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">Response</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">json</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--0:#FDDA68;--1:#A84E00">"msg"</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#D5D7D8;--1:#8F1500">e</span><span style="--0:#89DDFF;--1:#007474">},</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--0:#EEFFFF;--1:#62676A"> status</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#B59EE1;--1:#7C008F">500</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A">)</span> </div> </div></code></pre> <div class="copy"> <button title="Copy to clipboard" data-copied="Copied!" data-code=" try { // This will throw an exception (error) if you write to pass a non-string to the queue, such as a // native JavaScript object or ArrayBuffer. await env.MY_FIRST_QUEUE.send("hello there", { contentType: "text" }); // explicitly set 'text' } catch (e) { console.log(e) return Response.json({"msg": e}, { status: 500 })"> <div></div></button> </div> </figure> </div> <p>The <a href="https://developers-cloudflare-com.translate.goog/queues/configuration/javascript-apis/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#queuescontenttype"><code dir="auto">QueuesContentType</code></a> API documentation describes how each format is serialized to a queue.</p> <div tabindex="-1" class="heading-wrapper level-h2"> <h2 id="consumers">Consumers</h2><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#consumers"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <p>Queues supports two types of consumer:</p> <ol> <li>A <a href="https://developers-cloudflare-com.translate.goog/queues/configuration/configure-queues/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB">consumer Worker</a>, which is push-based: the Worker is invoked when the queue has messages to deliver.</li> <li>A <a href="https://developers-cloudflare-com.translate.goog/queues/configuration/pull-consumers/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB">HTTP pull consumer</a>, which is pull-based: the consumer calls the queue endpoint over HTTP to receive and then acknowledge messages.</li> </ol> <p>A queue can only have one type of consumer configured.</p> <div tabindex="-1" class="heading-wrapper level-h3"> <h3 id="create-a-consumer-worker">Create a consumer Worker</h3><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#create-a-consumer-worker"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <p>A consumer is the term for a client that is subscribing to or <em>consuming</em> messages from a queue. In its most basic form, a consumer is defined by creating a <code dir="auto">queue</code> handler in a Worker:</p> <div class="expressive-code"> <figure class="frame not-content"> <figcaption class="header"></figcaption> <pre data-language="ts"><code> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">export</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">default</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">async</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">queue</span><span style="--0:#89DDFF;--1:#007474">(</span><span style="--0:#B59EE1;--1:#7C008F">batch</span><span style="--0:#EE9080;--1:#8F1500">:</span><span style="--0:#EEFFFF;--1:#007474"> </span><span style="--0:#57C78F;--1:#00783C">MessageBatch</span><span style="--0:#89DDFF;--1:#007474"><</span><span style="--0:#57C78F;--1:#00783C">Error</span><span style="--0:#89DDFF;--1:#007474">>,</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#B59EE1;--1:#7C008F">env</span><span style="--0:#EE9080;--1:#8F1500">:</span><span style="--0:#EEFFFF;--1:#007474"> </span><span style="--0:#57C78F;--1:#00783C">Environment</span><span style="--0:#89DDFF;--1:#007474">)</span><span style="--0:#EE9080;--1:#8F1500">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">Promise</span><span style="--0:#89DDFF;--1:#007474"><</span><span style="--0:#57C78F;--1:#00783C">void</span><span style="--0:#89DDFF;--1:#007474">></span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// Do something with messages in the batch</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// i.e. write to R2 storage, D1 database, or POST to an external API</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// You can also iterate over each message in the batch by looping over batch.messages</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">},</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">};</span> </div> </div></code></pre> <div class="copy"> <button title="Copy to clipboard" data-copied="Copied!" data-code="export default { async queue(batch: MessageBatch<Error>, env: Environment): Promise<void> { // Do something with messages in the batch // i.e. write to R2 storage, D1 database, or POST to an external API // You can also iterate over each message in the batch by looping over batch.messages },};"> <div></div></button> </div> </figure> </div> <p>You then connect that consumer to a queue with <code dir="auto">wrangler queues consumer <queue-name> <worker-script-name></code> or by defining a <code dir="auto">[[queues.consumers]]</code> configuration in your <a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/configuration/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB">Wrangler configuration file</a> manually:</p> <script> (() => { class StarlightTabsRestore extends HTMLElement { connectedCallback() { const starlightTabs = this.closest('starlight-tabs'); if (!(starlightTabs instanceof HTMLElement) || typeof localStorage === 'undefined') return; const syncKey = starlightTabs.dataset.syncKey; if (!syncKey) return; const label = localStorage.getItem(`starlight-synced-tabs__${syncKey}`); if (!label) return; const tabs = [...starlightTabs?.querySelectorAll('[role="tab"]')]; const tabIndexToRestore = tabs.findIndex( (tab) => tab instanceof HTMLAnchorElement && tab.textContent?.trim() === label ); const panels = starlightTabs?.querySelectorAll(':scope > [role="tabpanel"]'); const newTab = tabs[tabIndexToRestore]; const newPanel = panels[tabIndexToRestore]; if (tabIndexToRestore < 1 || !newTab || !newPanel) return; tabs[0]?.setAttribute('aria-selected', 'false'); tabs[0]?.setAttribute('tabindex', '-1'); panels?.[0]?.setAttribute('hidden', 'true'); newTab.removeAttribute('tabindex'); newTab.setAttribute('aria-selected', 'true'); newPanel.removeAttribute('hidden'); } } customElements.define('starlight-tabs-restore', StarlightTabsRestore); })() </script><starlight-tabs data-sync-key="wranglerConfig" class="astro-esqgolmp"> <div class="tablist-wrapper not-content astro-esqgolmp"> <ul role="tablist" class="astro-esqgolmp"> <li role="presentation" class="tab astro-esqgolmp"><a role="tab" href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#tab-panel-1073" id="tab-1073" aria-selected="true" tabindex="0" class="astro-esqgolmp"> <svg aria-hidden="true" class="astro-esqgolmp astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M0.734 13.269L0.562 10.732Q1.938 10.732 2.497 10.087L2.497 10.087Q2.884 9.614 2.884 8.711L2.884 8.711Q2.884 8.324 2.798 7.571Q2.712 6.819 2.712 6.410Q2.712 6.002 2.669 5.185L2.669 5.185Q2.583 4.454 2.583 4.153L2.583 4.153Q2.583 2.089 3.787 1.099Q4.991 0.111 7.184 0.111L7.184 0.111L8.259 0.111L8.259 2.648L7.700 2.648Q6.754 2.648 6.345 3.185Q5.937 3.723 5.937 4.798L5.937 4.798Q5.937 5.056 6.023 5.572L6.023 5.572Q6.109 6.217 6.109 6.561L6.109 6.561Q6.109 6.819 6.152 7.378L6.152 7.378Q6.238 8.152 6.238 8.582L6.238 8.582Q6.238 10.216 5.550 11.033L5.550 11.033Q4.948 11.764 3.658 12.065L3.658 12.065Q4.948 12.409 5.550 13.097L5.550 13.097Q6.238 13.957 6.238 15.548L6.238 15.548Q6.238 16.021 6.152 16.795L6.152 16.795Q6.066 17.354 6.088 17.612Q6.109 17.870 6.023 18.515L6.023 18.515Q5.937 18.988 5.937 19.203L5.937 19.203Q5.937 20.278 6.345 20.815Q6.754 21.353 7.700 21.353L7.700 21.353L8.259 21.353L8.259 23.890L7.184 23.890Q2.712 23.890 2.712 19.848L2.712 19.848Q2.712 18.386 2.862 17.590Q3.013 16.795 3.013 15.290L3.013 15.290Q3.013 13.269 0.734 13.269L0.734 13.269ZM23.438 10.732L23.438 13.011Q21.159 13.011 21.159 15.032L21.159 15.032Q21.159 15.419 21.224 16.171Q21.288 16.924 21.288 17.311L21.288 17.311Q21.417 18.128 21.417 19.590L21.417 19.590Q21.417 23.632 16.859 23.632L16.859 23.632L15.784 23.632L15.784 21.353L16.300 21.353Q17.246 21.353 17.654 20.815Q18.063 20.278 18.063 19.203Q18.063 18.128 17.934 17.569L17.934 17.569Q17.934 17.225 17.848 16.558Q17.762 15.892 17.762 15.548L17.762 15.548Q17.762 13.957 18.450 13.097L18.450 13.097Q19.052 12.409 20.342 12.065L20.342 12.065Q19.052 11.764 18.450 11.033L18.450 11.033Q17.762 10.216 17.762 8.582L17.762 8.582Q17.762 8.152 17.848 7.378L17.848 7.378Q17.934 6.819 17.934 6.561L17.934 6.561Q18.063 5.873 18.063 4.841Q18.063 3.809 17.633 3.293Q17.203 2.777 16.300 2.648L16.300 2.648L15.784 2.648L15.784 0.111L16.859 0.111Q19.009 0.111 20.213 1.099Q21.417 2.089 21.417 4.153L21.417 4.153Q21.417 4.540 21.352 5.292Q21.288 6.045 21.288 6.432L21.288 6.432Q21.159 7.249 21.116 8.711L21.116 8.711Q21.159 9.614 21.503 10.087L21.503 10.087Q22.062 10.732 23.438 10.732L23.438 10.732Z" /> </svg> wrangler.jsonc </a></li> <li role="presentation" class="tab astro-esqgolmp"><a role="tab" href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#tab-panel-1074" id="tab-1074" aria-selected="false" tabindex="-1" class="astro-esqgolmp"> <svg aria-hidden="true" class="astro-esqgolmp astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="m21.32 9.55-1.89-.63.89-1.78A1 1 0 0 0 20.13 6L18 3.87a1 1 0 0 0-1.15-.19l-1.78.89-.63-1.89A1 1 0 0 0 13.5 2h-3a1 1 0 0 0-.95.68l-.63 1.89-1.78-.89A1 1 0 0 0 6 3.87L3.87 6a1 1 0 0 0-.19 1.15l.89 1.78-1.89.63a1 1 0 0 0-.68.94v3a1 1 0 0 0 .68.95l1.89.63-.89 1.78A1 1 0 0 0 3.87 18L6 20.13a1 1 0 0 0 1.15.19l1.78-.89.63 1.89a1 1 0 0 0 .95.68h3a1 1 0 0 0 .95-.68l.63-1.89 1.78.89a1 1 0 0 0 1.13-.19L20.13 18a1 1 0 0 0 .19-1.15l-.89-1.78 1.89-.63a1 1 0 0 0 .68-.94v-3a1 1 0 0 0-.68-.95ZM20 12.78l-1.2.4A2 2 0 0 0 17.64 16l.57 1.14-1.1 1.1-1.11-.6a2 2 0 0 0-2.79 1.16l-.4 1.2h-1.59l-.4-1.2A2 2 0 0 0 8 17.64l-1.14.57-1.1-1.1.6-1.11a2 2 0 0 0-1.16-2.82l-1.2-.4v-1.56l1.2-.4A2 2 0 0 0 6.36 8l-.57-1.11 1.1-1.1L8 6.36a2 2 0 0 0 2.82-1.16l.4-1.2h1.56l.4 1.2A2 2 0 0 0 16 6.36l1.14-.57 1.1 1.1-.6 1.11a2 2 0 0 0 1.16 2.79l1.2.4v1.59ZM12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm0 6a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z" /> </svg> wrangler.toml </a></li> </ul> </div> <div id="tab-panel-1073" aria-labelledby="tab-1073" role="tabpanel"> <div class="expressive-code"> <link rel="stylesheet" href="/_astro/ec.rt9t7.css"> <script type="module" src="/_astro/ec.8zarh.js"></script> <figure class="frame not-content"> <figcaption class="header"></figcaption> <pre data-language="jsonc"><code> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">"</span><span style="--0:#C895EA;--1:#7C5B92">queues</span><span style="--0:#89DDFF;--1:#007474">"</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">"</span><span style="--0:#FFCB6B;--1:#7E6435">consumers</span><span style="--0:#89DDFF;--1:#007474">"</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">[</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">"</span><span style="--0:#F78C6C;--1:#985643">queue</span><span style="--0:#89DDFF;--1:#007474">"</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#FDDA68;--1:#A84E00">"<your-queue-name>"</span><span style="--0:#89DDFF;--1:#007474">,</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">"</span><span style="--0:#F78C6C;--1:#985643">max_batch_size</span><span style="--0:#89DDFF;--1:#007474">"</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#8EA7ED;--1:#00268F">100</span><span style="--0:#89DDFF;--1:#007474">,</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">"</span><span style="--0:#F78C6C;--1:#985643">max_batch_timeout</span><span style="--0:#89DDFF;--1:#007474">"</span><span style="--0:#89DDFF;--1:#007474">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#8EA7ED;--1:#00268F">30</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">]</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">}</span> </div> </div></code></pre> <div class="copy"> <button title="Copy to clipboard" data-copied="Copied!" data-code="{ "queues": { "consumers": [ { "queue": "<your-queue-name>", "max_batch_size": 100, "max_batch_timeout": 30 } ] }}"> <div></div></button> </div> </figure> </div> </div> <div id="tab-panel-1074" aria-labelledby="tab-1074" role="tabpanel" hidden> <div class="expressive-code"> <figure class="frame not-content"> <figcaption class="header"></figcaption> <pre data-language="toml"><code> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">[[</span><span style="--0:#57C78F;--1:#00783C">queues</span><span style="--0:#EEFFFF;--1:#62676A">.</span><span style="--0:#57C78F;--1:#00783C">consumers</span><span style="--0:#89DDFF;--1:#007474">]]</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"><span style="--0:#EEFFFF"> </span></span><span style="--0:#EEFFFF;--1:#00268F">queue</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">=</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#FDDA68;--1:#A84E00">"<your-queue-name>"</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"><span style="--0:#EEFFFF"> </span></span><span style="--0:#EEFFFF;--1:#00268F">max_batch_size</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">=</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#8EA7ED;--1:#00268F">100</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic"># optional</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"><span style="--0:#EEFFFF"> </span></span><span style="--0:#EEFFFF;--1:#00268F">max_batch_timeout</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">=</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#8EA7ED;--1:#00268F">30</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic"># optional</span> </div> </div></code></pre> <div class="copy"> <button title="Copy to clipboard" data-copied="Copied!" data-code="[[queues.consumers]] queue = "<your-queue-name>" max_batch_size = 100 # optional max_batch_timeout = 30 # optional"> <div></div></button> </div> </figure> </div> </div> <starlight-tabs-restore class="astro-esqgolmp"></starlight-tabs-restore> </starlight-tabs> <script type="module">class r extends HTMLElement{static#e=new Map;#t;#n="starlight-synced-tabs__";constructor(){super();const t=this.querySelector('[role="tablist"]');if(this.tabs=[...t.querySelectorAll('[role="tab"]')],this.panels=[...this.querySelectorAll(':scope > [role="tabpanel"]')],this.#t=this.dataset.syncKey,this.#t){const i=r.#e.get(this.#t)??[];i.push(this),r.#e.set(this.#t,i)}this.tabs.forEach((i,c)=>{i.addEventListener("click",e=>{e.preventDefault();const n=t.querySelector('[aria-selected="true"]');e.currentTarget!==n&&this.switchTab(e.currentTarget,c)}),i.addEventListener("keydown",e=>{const n=this.tabs.indexOf(e.currentTarget),s=e.key==="ArrowLeft"?n-1:e.key==="ArrowRight"?n+1:e.key==="Home"?0:e.key==="End"?this.tabs.length-1:null;s!==null&&this.tabs[s]&&(e.preventDefault(),this.switchTab(this.tabs[s],s))})})}switchTab(t,i,c=!0){if(!t)return;const e=c?this.getBoundingClientRect().top:0;this.tabs.forEach(s=>{s.setAttribute("aria-selected","false"),s.setAttribute("tabindex","-1")}),this.panels.forEach(s=>{s.hidden=!0});const n=this.panels[i];n&&(n.hidden=!1),t.removeAttribute("tabindex"),t.setAttribute("aria-selected","true"),c&&(t.focus(),r.#r(this,t),window.scrollTo({top:window.scrollY+(this.getBoundingClientRect().top-e),behavior:"instant"}))}#i(t){!this.#t||typeof localStorage>"u"||localStorage.setItem(this.#n+this.#t,t)}static#r(t,i){const c=t.#t,e=r.#s(i);if(!c||!e)return;const n=r.#e.get(c);if(n){for(const s of n){if(s===t)continue;const a=s.tabs.findIndex(o=>r.#s(o)===e);a!==-1&&s.switchTab(s.tabs[a],a,!1)}t.#i(e)}}static#s(t){return t.textContent?.trim()}}customElements.define("starlight-tabs",r);</script> <p>Importantly, each queue can only have one active consumer. This allows Cloudflare Queues to achieve at least once delivery and minimize the risk of duplicate messages beyond that.</p> <aside aria-label="Best practice" class="starlight-aside starlight-aside--note"> <p class="starlight-aside__title" aria-hidden="true"> <svg viewbox="0 0 24 24" width="16" height="16" fill="currentColor" class="starlight-aside__icon"> <path d="M12 11C11.7348 11 11.4804 11.1054 11.2929 11.2929C11.1054 11.4804 11 11.7348 11 12V16C11 16.2652 11.1054 16.5196 11.2929 16.7071C11.4804 16.8946 11.7348 17 12 17C12.2652 17 12.5196 16.8946 12.7071 16.7071C12.8946 16.5196 13 16.2652 13 16V12C13 11.7348 12.8946 11.4804 12.7071 11.2929C12.5196 11.1054 12.2652 11 12 11ZM12.38 7.08C12.1365 6.97998 11.8635 6.97998 11.62 7.08C11.4973 7.12759 11.3851 7.19896 11.29 7.29C11.2017 7.3872 11.1306 7.49882 11.08 7.62C11.024 7.73868 10.9966 7.86882 11 8C10.9992 8.13161 11.0245 8.26207 11.0742 8.38391C11.124 8.50574 11.1973 8.61656 11.29 8.71C11.3872 8.79833 11.4988 8.86936 11.62 8.92C11.7715 8.98224 11.936 9.00632 12.099 8.99011C12.2619 8.97391 12.4184 8.91792 12.5547 8.82707C12.691 8.73622 12.8029 8.61328 12.8805 8.46907C12.9582 8.32486 12.9992 8.16378 13 8C12.9963 7.73523 12.8927 7.48163 12.71 7.29C12.6149 7.19896 12.5028 7.12759 12.38 7.08ZM12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM12 20C10.4178 20 8.87104 19.5308 7.55544 18.6518C6.23985 17.7727 5.21447 16.5233 4.60897 15.0615C4.00347 13.5997 3.84504 11.9911 4.15372 10.4393C4.4624 8.88743 5.22433 7.46197 6.34315 6.34315C7.46197 5.22433 8.88743 4.4624 10.4393 4.15372C11.9911 3.84504 13.5997 4.00346 15.0615 4.60896C16.5233 5.21447 17.7727 6.23984 18.6518 7.55544C19.5308 8.87103 20 10.4177 20 12C20 14.1217 19.1572 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20Z" /> </svg>Best practice</p> <div class="starlight-aside__content"> <p>Configure a single consumer per queue. This both logically separates your queues, and ensures that errors (failures) in processing messages from one queue do not impact your other queues.</p> </div> </aside> <p>Notably, you can use the same consumer with multiple queues. The queue handler that defines your consumer Worker will be invoked by the queues it is connected to.</p> <ul> <li>The <code dir="auto">MessageBatch</code> that is passed to your <code dir="auto">queue</code> handler includes a <code dir="auto">queue</code> property with the name of the queue the batch was read from.</li> <li>This can reduce the amount of code you need to write, and allow you to process messages based on the name of your queues.</li> </ul> <p>For example, a consumer configured to consume messages from multiple queues would resemble the following:</p> <div class="expressive-code"> <figure class="frame not-content"> <figcaption class="header"></figcaption> <pre data-language="ts"><code> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">export</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">default</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">async</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">queue</span><span style="--0:#89DDFF;--1:#007474">(</span><span style="--0:#B59EE1;--1:#7C008F">batch</span><span style="--0:#EE9080;--1:#8F1500">:</span><span style="--0:#EEFFFF;--1:#007474"> </span><span style="--0:#57C78F;--1:#00783C">MessageBatch</span><span style="--0:#89DDFF;--1:#007474"><</span><span style="--0:#57C78F;--1:#00783C">Error</span><span style="--0:#89DDFF;--1:#007474">>,</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#B59EE1;--1:#7C008F">env</span><span style="--0:#EE9080;--1:#8F1500">:</span><span style="--0:#EEFFFF;--1:#007474"> </span><span style="--0:#57C78F;--1:#00783C">Environment</span><span style="--0:#89DDFF;--1:#007474">)</span><span style="--0:#EE9080;--1:#8F1500">:</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">Promise</span><span style="--0:#89DDFF;--1:#007474"><</span><span style="--0:#57C78F;--1:#00783C">void</span><span style="--0:#89DDFF;--1:#007474">></span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// MessageBatch has a `queue` property we can switch on</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">switch</span><span style="--0:#EEFFFF;--1:#62676A"> (</span><span style="--0:#EEFFFF;--1:#00268F">batch</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#EEFFFF;--1:#00268F">queue</span><span style="--0:#EEFFFF;--1:#62676A">) </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">case</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#FDDA68;--1:#A84E00">'log-queue'</span><span style="--0:#89DDFF;--1:#007474">:</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// Write the batch to R2</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">break</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">case</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#FDDA68;--1:#A84E00">'debug-queue'</span><span style="--0:#89DDFF;--1:#007474">:</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// Write the message to the console or to another queue</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">break</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">case</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#FDDA68;--1:#A84E00">'email-reset'</span><span style="--0:#89DDFF;--1:#007474">:</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// Trigger a password reset email via an external API</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">break</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">default</span><span style="--0:#89DDFF;--1:#007474">:</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// Handle messages we haven't mentioned explicitly (write a log, push to a DLQ)</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">},</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">};</span> </div> </div></code></pre> <div class="copy"> <button title="Copy to clipboard" data-copied="Copied!" data-code="export default { async queue(batch: MessageBatch<Error>, env: Environment): Promise<void> { // MessageBatch has a `queue` property we can switch on switch (batch.queue) { case 'log-queue': // Write the batch to R2 break; case 'debug-queue': // Write the message to the console or to another queue break; case 'email-reset': // Trigger a password reset email via an external API break; default: // Handle messages we haven't mentioned explicitly (write a log, push to a DLQ) } },};"> <div></div></button> </div> </figure> </div> <div tabindex="-1" class="heading-wrapper level-h3"> <h3 id="remove-a-consumer">Remove a consumer</h3><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#remove-a-consumer"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <p>To remove a queue from your project, run <code dir="auto">wrangler queues consumer remove <queue-name> <script-name></code> and then remove the desired queue below the <code dir="auto">[[queues.consumers]]</code> in Wrangler file.</p> <div tabindex="-1" class="heading-wrapper level-h3"> <h3 id="pull-consumers">Pull consumers</h3><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#pull-consumers"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <p>A queue can have a HTTP-based consumer that pulls from the queue, instead of messages being pushed to a Worker.</p> <p>This consumer can be any HTTP-speaking service that can communicate over the Internet. Review the <a href="https://developers-cloudflare-com.translate.goog/queues/configuration/pull-consumers/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB">pull consumer guide</a> to learn how to configure a pull-based consumer for a queue.</p> <div tabindex="-1" class="heading-wrapper level-h2"> <h2 id="messages">Messages</h2><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#messages"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <p>A message is the object you are producing to and consuming from a queue.</p> <p>Any JSON serializable object can be published to a queue. For most developers, this means either simple strings or JSON objects. You can explicitly <a href="https://developers-cloudflare-com.translate.goog/queues/reference/how-queues-works/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB#content-types">set the content type</a> when sending a message.</p> <p>Messages themselves can be <a href="https://developers-cloudflare-com.translate.goog/queues/configuration/batching-retries/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB">batched when delivered to a consumer</a>. By default, messages within a batch are treated as all or nothing when determining retries. If the last message in a batch fails to be processed, the entire batch will be retried. You can also choose to <a href="https://developers-cloudflare-com.translate.goog/queues/configuration/batching-retries/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB">explicitly acknowledge</a> messages as they are successfully processed, and/or mark individual messages to be retried.</p> </div> <div class="astro-fxeopwe4"> <div class="feedback-prompt astro-fxeopwe4"> <astro-island uid="ZcQfTO" prefix="r0" component-url="/_astro/FeedbackPrompt.sIVdSYEF.js" component-export="default" renderer-url="/_astro/client.BUsrUfVi.js" props="{}" ssr client="idle" opts="{"name":"FeedbackPrompt","value":true}" await-children> <div> <h2>Was this helpful?</h2><button class="cursor-pointer bg-transparent"> <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewbox="0 0 24 24" class="text-2xl text-sl hover:text-accent" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"> <path fill="none" d="M0 0h24v24H0V0zm0 0h24v24H0V0z" /><path d="M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.58 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2zM9 9l4.34-4.34L12 10h9v2l-3 7H9V9zM1 9h4v12H1z" /> </svg></button><button class="cursor-pointer bg-transparent"> <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewbox="0 0 24 24" class="text-2xl text-sl hover:text-accent" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"> <path fill="none" d="M0 0h24v24H0V0zm0 0h24v24H0V0z" /><path d="M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z" /> </svg></button> </div><!--astro:end--> </astro-island> </div> <footer class="sl-flex astro-3yyafb3n"> <div class="meta sl-flex astro-3yyafb3n"><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/queues/reference/how-queues-works.mdx" class="sl-flex print:hidden astro-eez2twj6"> <svg aria-hidden="true" class="astro-eez2twj6 astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"> <path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z" /> </svg> Edit page</a> <p>Last updated: <time datetime="2025-02-12T13:41:31.000Z">Feb 12, 2025</time></p> </div> <div class="pagination-links print:hidden astro-u2l5gyhi" dir="ltr"><a href="https://developers-cloudflare-com.translate.goog/queues/platform/audit-logs/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" rel="prev" class="astro-u2l5gyhi"> <svg aria-hidden="true" class="astro-u2l5gyhi astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"> <path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z" /> </svg><span class="astro-u2l5gyhi"> Previous <br class="astro-u2l5gyhi"><span class="link-title astro-u2l5gyhi">Audit Logs</span> </span> </a> <a href="https://developers-cloudflare-com.translate.goog/queues/reference/delivery-guarantees/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" rel="next" class="astro-u2l5gyhi"> <svg aria-hidden="true" class="astro-u2l5gyhi astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"> <path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z" /> </svg><span class="astro-u2l5gyhi"> Next <br class="astro-u2l5gyhi"><span class="link-title astro-u2l5gyhi">Delivery guarantees</span> </span> </a> </div> </footer> <div id="footer-links" class="mt-6 flex flex-wrap items-center space-x-4 astro-fxeopwe4"> <a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://dash.cloudflare.com" class="text-xs text-black decoration-accent astro-fxeopwe4"><span class="astro-fxeopwe4">Cloudflare Dashboard</span></a><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://discord.cloudflare.com" class="text-xs text-black decoration-accent astro-fxeopwe4"><span class="astro-fxeopwe4">Discord</span></a><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://community.cloudflare.com" class="text-xs text-black decoration-accent astro-fxeopwe4"><span class="astro-fxeopwe4">Community</span></a><a href="https://translate.google.com/website?sl=pl&tl=en&hl=en-GB&u=https://www.cloudflare.com/learning/" class="text-xs text-black decoration-accent astro-fxeopwe4"><span class="astro-fxeopwe4">Learning Center</span></a><a href="https://developers-cloudflare-com.translate.goog/support/contacting-cloudflare-support/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=en-GB" class="text-xs text-black decoration-accent astro-fxeopwe4"><span class="astro-fxeopwe4">Support Portal</span></a> <div class="text-xs text-black [&>button]:underline [&>button]:decoration-accent astro-fxeopwe4"> <script src="https://ot.www.cloudflare.com/public/vendor/onetrust/scripttemplates/otSDKStub.js" type="text/javascript" charset="UTF-8" data-domain-script="b1e05d49-f072-4bae-9116-bdb78af15448"></script> <script type="text/javascript"> // eslint-disable-next-line @typescript-eslint/no-unused-vars function OptanonWrapper() {} </script><!-- OneTrust Cookies Settings button start --><button id="ot-sdk-btn" class="ot-sdk-show-settings astro-hwxmvrii">Cookie Settings</button> <!-- OneTrust Cookies Settings button end --> </div> </div> </div> </div> </div> </main> </div> </div> </div> </div> <script defer src="https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{"rayId":"919af00d0c93f894","version":"2025.1.0","serverTiming":{"name":{"cfExtPri":true,"cfL4":true,"cfSpeedBrain":true,"cfCacheStatus":true}},"token":"0589387b238e41af8aafea4d88cd2c64","b":1}" crossorigin="anonymous"></script> <script>function gtElInit() {var lib = new google.translate.TranslateService();lib.translatePage('pl', 'en', function () {});}</script> <script src="https://translate.google.com/translate_a/element.js?cb=gtElInit&hl=en-GB&client=wt" type="text/javascript"></script> </body> </html>