blob: fe8d3ce6d20930628e718daa3d3a88e5e6f1d051 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Managing Namespaces · Apache Pulsar</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&gt; **Important**"/><meta name="docsearch:version" content="2.10.0"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Managing Namespaces · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.apache.org/"/><meta property="og:description" content="&gt; **Important**"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://pulsar.apache.org/img/pulsar.svg"/><link rel="shortcut icon" href="/img/pulsar.ico"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://pulsar.apache.org/blog/atom.xml" title="Apache Pulsar Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://pulsar.apache.org/blog/feed.xml" title="Apache Pulsar Blog RSS Feed"/><link rel="stylesheet" href="/css/code-blocks-buttons.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/custom.js"></script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/pulsar.svg" alt="Apache Pulsar"/></a><a href="/en/versions"><h3>2.10.0</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/docs/en/getting-started-standalone" target="_self">Docs</a></li><li class=""><a href="/en/download" target="_self">Download</a></li><li class="siteNavGroupActive"><a href="/docs/en/client-libraries" target="_self">Clients</a></li><li class=""><a href="#restapis" target="_self">REST APIs</a></li><li class=""><a href="#cli" target="_self">Cli</a></li><li class=""><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="#community" target="_self">Community</a></li><li class=""><a href="#apache" target="_self">Apache</a></li><li class=""><a href="https://pulsar-next.staged.apache.org/" target="_self">New Website (Beta)</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/docs/ja/admin-api-namespaces">日本語</a></li><li><a href="/docs/fr/admin-api-namespaces">Français</a></li><li><a href="/docs/ko/admin-api-namespaces">한국어</a></li><li><a href="/docs/zh-CN/admin-api-namespaces">中文</a></li><li><a href="/docs/zh-TW/admin-api-namespaces">繁體中文</a></li><li><a href="https://crowdin.com/project/apache-pulsar" target="_blank" rel="noreferrer noopener">Help Translate</a></li></ul></div></li><script>
const languagesMenuItem = document.getElementById("languages-menu");
const languagesDropDown = document.getElementById("languages-dropdown");
languagesMenuItem.addEventListener("click", function(event) {
event.preventDefault();
if (languagesDropDown.className == "hide") {
languagesDropDown.className = "visible";
} else {
languagesDropDown.className = "hide";
}
});
</script></span></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i></i><span>Admin API</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Get Started</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/getting-started-standalone">Run Pulsar locally</a></li><li class="navListItem"><a class="navItem" href="/docs/en/getting-started-docker">Run Pulsar in Docker</a></li><li class="navListItem"><a class="navItem" href="/docs/en/getting-started-helm">Run Pulsar in Kubernetes</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Concepts and Architecture</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/concepts-overview">Overview</a></li><li class="navListItem"><a class="navItem" href="/docs/en/concepts-messaging">Messaging</a></li><li class="navListItem"><a class="navItem" href="/docs/en/concepts-architecture-overview">Architecture</a></li><li class="navListItem"><a class="navItem" href="/docs/en/concepts-clients">Clients</a></li><li class="navListItem"><a class="navItem" href="/docs/en/concepts-replication">Geo Replication</a></li><li class="navListItem"><a class="navItem" href="/docs/en/concepts-multi-tenancy">Multi Tenancy</a></li><li class="navListItem"><a class="navItem" href="/docs/en/concepts-authentication">Authentication and Authorization</a></li><li class="navListItem"><a class="navItem" href="/docs/en/concepts-topic-compaction">Topic Compaction</a></li><li class="navListItem"><a class="navItem" href="/docs/en/concepts-proxy-sni-routing">Proxy support with SNI routing</a></li><li class="navListItem"><a class="navItem" href="/docs/en/concepts-multiple-advertised-listeners">Multiple advertised listeners</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Pulsar Schema</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/schema-get-started">Get started</a></li><li class="navListItem"><a class="navItem" href="/docs/en/schema-understand">Understand schema</a></li><li class="navListItem"><a class="navItem" href="/docs/en/schema-evolution-compatibility">Schema evolution and compatibility</a></li><li class="navListItem"><a class="navItem" href="/docs/en/schema-manage">Manage schema</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Pulsar Functions</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/functions-overview">Overview</a></li><li class="navListItem"><a class="navItem" href="/docs/en/functions-runtime">Setup: Configure Functions runtime</a></li><li class="navListItem"><a class="navItem" href="/docs/en/functions-worker">Setup: Pulsar Functions Worker</a></li><li class="navListItem"><a class="navItem" href="/docs/en/functions-develop">How-to: Develop</a></li><li class="navListItem"><a class="navItem" href="/docs/en/functions-package">How-to: Package</a></li><li class="navListItem"><a class="navItem" href="/docs/en/functions-debug">How-to: Debug</a></li><li class="navListItem"><a class="navItem" href="/docs/en/functions-deploy">How-to: Deploy</a></li><li class="navListItem"><a class="navItem" href="/docs/en/functions-cli">Reference: CLI</a></li><li class="navListItem"><a class="navItem" href="/docs/en/window-functions-context">Window Functions: Context</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Pulsar IO</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/io-overview">Overview</a></li><li class="navListItem"><a class="navItem" href="/docs/en/io-quickstart">Get started</a></li><li class="navListItem"><a class="navItem" href="/docs/en/io-use">Use</a></li><li class="navListItem"><a class="navItem" href="/docs/en/io-debug">Debug</a></li><li class="navListItem"><a class="navItem" href="/docs/en/io-connectors">Built-in connector</a></li><li class="navListItem"><a class="navItem" href="/docs/en/io-cdc">CDC connector</a></li><li class="navListItem"><a class="navItem" href="/docs/en/io-develop">Develop</a></li><li class="navListItem"><a class="navItem" href="/docs/en/io-cli">CLI</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Pulsar SQL</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/sql-overview">Overview</a></li><li class="navListItem"><a class="navItem" href="/docs/en/sql-getting-started">Query data</a></li><li class="navListItem"><a class="navItem" href="/docs/en/sql-deployment-configurations">Configuration and deployment</a></li><li class="navListItem"><a class="navItem" href="/docs/en/sql-rest-api">REST APIs</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Tiered Storage</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/tiered-storage-overview">Overview</a></li><li class="navListItem"><a class="navItem" href="/docs/en/tiered-storage-aws">AWS S3 offloader</a></li><li class="navListItem"><a class="navItem" href="/docs/en/tiered-storage-gcs">GCS offloader</a></li><li class="navListItem"><a class="navItem" href="/docs/en/tiered-storage-filesystem">Filesystem offloader</a></li><li class="navListItem"><a class="navItem" href="/docs/en/tiered-storage-azure">Azure BlobStore offloader</a></li><li class="navListItem"><a class="navItem" href="/docs/en/tiered-storage-aliyun">Aliyun OSS offloader</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Transactions</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/txn-why">Why transactions?</a></li><li class="navListItem"><a class="navItem" href="/docs/en/txn-what">What are transactions?</a></li><li class="navListItem"><a class="navItem" href="/docs/en/txn-how">How transactions work?</a></li><li class="navListItem"><a class="navItem" href="/docs/en/txn-use">How to use transactions?</a></li><li class="navListItem"><a class="navItem" href="/docs/en/txn-monitor">How to monitor transactions?</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Kubernetes (Helm)</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/helm-overview">Overview</a></li><li class="navListItem"><a class="navItem" href="/docs/en/helm-prepare">Prepare</a></li><li class="navListItem"><a class="navItem" href="/docs/en/helm-install">Install</a></li><li class="navListItem"><a class="navItem" href="/docs/en/helm-deploy">Deployment</a></li><li class="navListItem"><a class="navItem" href="/docs/en/helm-upgrade">Upgrade</a></li><li class="navListItem"><a class="navItem" href="/docs/en/helm-tools">Required Tools</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Deployment</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/deploy-aws">Amazon Web Services</a></li><li class="navListItem"><a class="navItem" href="/docs/en/deploy-kubernetes">Kubernetes</a></li><li class="navListItem"><a class="navItem" href="/docs/en/deploy-bare-metal">Bare metal</a></li><li class="navListItem"><a class="navItem" href="/docs/en/deploy-bare-metal-multi-cluster">Bare metal multi-cluster</a></li><li class="navListItem"><a class="navItem" href="/docs/en/deploy-dcos">DC/OS</a></li><li class="navListItem"><a class="navItem" href="/docs/en/deploy-docker">Docker</a></li><li class="navListItem"><a class="navItem" href="/docs/en/deploy-monitoring">Monitor</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Administration</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/administration-zk-bk">ZooKeeper and BookKeeper</a></li><li class="navListItem"><a class="navItem" href="/docs/en/administration-geo">Geo-replication</a></li><li class="navListItem"><a class="navItem" href="/docs/en/administration-pulsar-manager">Pulsar Manager</a></li><li class="navListItem"><a class="navItem" href="/docs/en/administration-stats">Pulsar statistics</a></li><li class="navListItem"><a class="navItem" href="/docs/en/administration-load-balance">Load balance</a></li><li class="navListItem"><a class="navItem" href="/docs/en/administration-proxy">Pulsar proxy</a></li><li class="navListItem"><a class="navItem" href="/docs/en/administration-upgrade">Upgrade</a></li><li class="navListItem"><a class="navItem" href="/docs/en/administration-isolation">Pulsar isolation</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Security</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/security-overview">Overview</a></li><li class="navListItem"><a class="navItem" href="/docs/en/security-policy-and-supported-versions">Security Policy and Supported Versions</a></li><li class="navListItem"><a class="navItem" href="/docs/en/security-tls-transport">Transport Encryption using TLS</a></li><li class="navListItem"><a class="navItem" href="/docs/en/security-tls-authentication">Authentication using TLS</a></li><li class="navListItem"><a class="navItem" href="/docs/en/security-tls-keystore">Using TLS with KeyStore configure</a></li><li class="navListItem"><a class="navItem" href="/docs/en/security-jwt">Authentication using JWT</a></li><li class="navListItem"><a class="navItem" href="/docs/en/security-athenz">Authentication using Athenz</a></li><li class="navListItem"><a class="navItem" href="/docs/en/security-kerberos">Authentication using Kerberos</a></li><li class="navListItem"><a class="navItem" href="/docs/en/security-oauth2">Authentication using OAuth 2.0 access tokens</a></li><li class="navListItem"><a class="navItem" href="/docs/en/security-authorization">Authorization and ACLs</a></li><li class="navListItem"><a class="navItem" href="/docs/en/security-encryption">End-to-End Encryption</a></li><li class="navListItem"><a class="navItem" href="/docs/en/security-extending">Extend Authentication and Authorization</a></li><li class="navListItem"><a class="navItem" href="/docs/en/security-bouncy-castle">Bouncy Castle Providers</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Performance</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/performance-pulsar-perf">Pulsar Perf</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Client Libraries</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/client-libraries">Overview</a></li><li class="navListItem"><a class="navItem" href="/docs/en/client-libraries-java">Java</a></li><li class="navListItem"><a class="navItem" href="/docs/en/client-libraries-go">Go</a></li><li class="navListItem"><a class="navItem" href="/docs/en/client-libraries-python">Python</a></li><li class="navListItem"><a class="navItem" href="/docs/en/client-libraries-cpp">C++</a></li><li class="navListItem"><a class="navItem" href="/docs/en/client-libraries-node">Node.js</a></li><li class="navListItem"><a class="navItem" href="/docs/en/client-libraries-websocket">WebSocket</a></li><li class="navListItem"><a class="navItem" href="/docs/en/client-libraries-dotnet">C#</a></li><li class="navListItem"><a class="navItem" href="/docs/en/client-libraries-rest">REST</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Admin API</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/admin-api-overview">Overview</a></li><li class="navListItem"><a class="navItem" href="/docs/en/admin-api-clusters">Clusters</a></li><li class="navListItem"><a class="navItem" href="/docs/en/admin-api-tenants">Tenants</a></li><li class="navListItem"><a class="navItem" href="/docs/en/admin-api-brokers">Brokers</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/docs/en/admin-api-namespaces">Namespaces</a></li><li class="navListItem"><a class="navItem" href="/docs/en/admin-api-permissions">Permissions</a></li><li class="navListItem"><a class="navItem" href="/docs/en/admin-api-topics">Topics</a></li><li class="navListItem"><a class="navItem" href="/docs/en/admin-api-functions">Functions</a></li><li class="navListItem"><a class="navItem" href="/docs/en/admin-api-packages">Packages</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Adaptors</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/adaptors-kafka">Kafka client wrapper</a></li><li class="navListItem"><a class="navItem" href="/docs/en/adaptors-spark">Apache Spark</a></li><li class="navListItem"><a class="navItem" href="/docs/en/adaptors-storm">Apache Storm</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Cookbooks</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/cookbooks-compaction">Topic compaction</a></li><li class="navListItem"><a class="navItem" href="/docs/en/cookbooks-deduplication">Message deduplication</a></li><li class="navListItem"><a class="navItem" href="/docs/en/cookbooks-non-persistent">Non-persistent messaging</a></li><li class="navListItem"><a class="navItem" href="/docs/en/cookbooks-retention-expiry">Message retention and expiry</a></li><li class="navListItem"><a class="navItem" href="/docs/en/cookbooks-encryption">Encryption</a></li><li class="navListItem"><a class="navItem" href="/docs/en/cookbooks-message-queue">Message queue</a></li><li class="navListItem"><a class="navItem" href="/docs/en/cookbooks-bookkeepermetadata">BookKeeper Ledger Metadata</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Development</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/develop-tools">Simulation tools</a></li><li class="navListItem"><a class="navItem" href="/docs/en/developing-binary-protocol">Binary protocol</a></li><li class="navListItem"><a class="navItem" href="/docs/en/develop-schema">Custom schema storage</a></li><li class="navListItem"><a class="navItem" href="/docs/en/develop-load-manager">Modular load manager</a></li><li class="navListItem"><a class="navItem" href="/docs/en/develop-plugin">Plugin</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Reference</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/en/reference-terminology">Terminology</a></li><li class="navListItem"><a class="navItem" href="/docs/en/reference-cli-tools">Pulsar CLI tools</a></li><li class="navListItem"><a class="navItem" href="/docs/en/reference-configuration">Pulsar configuration</a></li><li class="navListItem"><a class="navItem" href="/docs/en/reference-metrics">Pulsar Metrics</a></li></ul></div></div></section></div><script>
var coll = document.getElementsByClassName('collapsible');
var checkActiveCategory = true;
for (var i = 0; i < coll.length; i++) {
var links = coll[i].nextElementSibling.getElementsByTagName('*');
if (checkActiveCategory){
for (var j = 0; j < links.length; j++) {
if (links[j].classList.contains('navListItemActive')){
coll[i].nextElementSibling.classList.toggle('hide');
coll[i].childNodes[1].classList.toggle('rotate');
checkActiveCategory = false;
break;
}
}
}
coll[i].addEventListener('click', function() {
var arrow = this.childNodes[1];
arrow.classList.toggle('rotate');
var content = this.nextElementSibling;
content.classList.toggle('hide');
});
}
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');
var headings = document.querySelector('.toc-headings');
headings && headings.addEventListener('click', function(event) {
var el = event.target;
while(el !== headings){
if (el.tagName === 'A') {
document.body.classList.remove('tocActive');
break;
} else{
el = el.parentNode;
}
}
}, false);
function createToggler(togglerSelector, targetSelector, className) {
var toggler = document.querySelector(togglerSelector);
var target = document.querySelector(targetSelector);
if (!toggler) {
return;
}
toggler.onclick = function(event) {
event.preventDefault();
target.classList.toggle(className);
};
}
});
</script></nav></div><div class="container mainContainer docsContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/apache/pulsar/edit/master/site2/docs/admin-api-namespaces.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 id="__docusaurus" class="postHeaderTitle">Managing Namespaces</h1></header><article><div><span><blockquote>
<p><strong>Important</strong></p>
<p>This page only shows <strong>some frequently used operations</strong>.</p>
<ul>
<li><p>For the latest and complete information about <code>Pulsar admin</code>, including commands, flags, descriptions, and more information, see <a href="https://pulsar.apache.org/tools/pulsar-admin/">Pulsar admin doc</a>.</p></li>
<li><p>For the latest and complete information about <code>REST API</code>, including parameters, responses, samples, and more, see <a href="https://pulsar.apache.org/admin-rest-api#/">REST</a>
API doc.</p></li>
<li><p>For the latest and complete information about <code>Java admin API</code>, including classes, methods, descriptions, and more, see <a href="https://pulsar.apache.org/api/admin/2.10.0-SNAPSHOT/">Java admin API doc</a>.</p></li>
</ul>
</blockquote>
<p>Pulsar <a href="/docs/en/reference-terminology#namespace">namespaces</a> are logical groupings of <a href="/docs/en/reference-terminology#topic">topics</a>.</p>
<p>Namespaces can be managed via:</p>
<ul>
<li>The <code>namespaces</code> command of the <a href="https://pulsar.apache.org/tools/pulsar-admin/"><code>pulsar-admin</code></a> tool</li>
<li>The <code>/admin/v2/namespaces</code> endpoint of the admin <a href="https://pulsar.apache.org/admin-rest-api#/">REST</a>
API</li>
<li>The <code>namespaces</code> method of the <code>PulsarAdmin</code> object in the <a href="/docs/en/client-libraries-java">Java API</a></li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="namespaces-resources"></a><a href="#namespaces-resources" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Namespaces resources</h2>
<h3><a class="anchor" aria-hidden="true" id="create-namespaces"></a><a href="#create-namespaces" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Create namespaces</h3>
<p>You can create new namespaces under a given <a href="/docs/en/reference-terminology#tenant">tenant</a>.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-793-tab-794" class="nav-link active" data-group="group_793" data-tab="tab-group-793-content-794">pulsar-admin</div><div id="tab-group-793-tab-795" class="nav-link" data-group="group_793" data-tab="tab-group-793-content-795">REST API</div><div id="tab-group-793-tab-796" class="nav-link" data-group="group_793" data-tab="tab-group-793-content-796">Java</div></div><div class="tab-content"><div id="tab-group-793-content-794" class="tab-pane active" data-group="group_793" tabindex="-1"><div><span><p>Use the <a href="/docs/en/reference-pulsar-admin#namespaces-create"><code>create</code></a> subcommand and specify the namespace by name:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces create <span class="hljs-built_in">test</span>-tenant/<span class="hljs-built_in">test</span>-namespace</span><br /></code></pre>
</span></div></div><div id="tab-group-793-content-795" class="tab-pane" data-group="group_793" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|PUT|/admin/v2/namespaces/:tenant/:namespace|operation/createNamespace?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-793-content-796" class="tab-pane" data-group="group_793" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().createNamespace(namespace);<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="get-policies"></a><a href="#get-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Get policies</h3>
<p>You can fetch the current policies associated with a namespace at any time.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-797-tab-798" class="nav-link active" data-group="group_797" data-tab="tab-group-797-content-798">pulsar-admin</div><div id="tab-group-797-tab-799" class="nav-link" data-group="group_797" data-tab="tab-group-797-content-799">REST API</div><div id="tab-group-797-tab-800" class="nav-link" data-group="group_797" data-tab="tab-group-797-content-800">Java</div></div><div class="tab-content"><div id="tab-group-797-content-798" class="tab-pane active" data-group="group_797" tabindex="-1"><div><span><p>Use the <a href="/docs/en/reference-pulsar-admin#namespaces-policies"><code>policies</code></a> subcommand and specify the namespace:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces policies <span class="hljs-built_in">test</span>-tenant/<span class="hljs-built_in">test</span>-namespace</span><br />{<br /> "auth_policies": {<br /> "namespace_auth": {},<br /> "destination_auth": {}<br /> },<br /> "replication_clusters": [],<br /> "bundles_activated": true,<br /> "bundles": {<br /> "boundaries": [<br /> "0x00000000",<br /> "0xffffffff"<br /> ],<br /> "numBundles": 1<br /> },<br /> "backlog_quota_map": {},<br /> "persistence": null,<br /> "latency_stats_sample_rate": {},<br /> "message_ttl_in_seconds": 0,<br /> "retention_policies": null,<br /> "deleted": false<br />}<br /></code></pre>
</span></div></div><div id="tab-group-797-content-799" class="tab-pane" data-group="group_797" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|GET|/admin/v2/namespaces/:tenant/:namespace|operation/getPolicies?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-797-content-800" class="tab-pane" data-group="group_797" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().getPolicies(namespace);<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="list-namespaces"></a><a href="#list-namespaces" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>List namespaces</h3>
<p>You can list all namespaces within a given Pulsar <a href="/docs/en/reference-terminology#tenant">tenant</a>.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-801-tab-802" class="nav-link active" data-group="group_801" data-tab="tab-group-801-content-802">pulsar-admin</div><div id="tab-group-801-tab-803" class="nav-link" data-group="group_801" data-tab="tab-group-801-content-803">REST API</div><div id="tab-group-801-tab-804" class="nav-link" data-group="group_801" data-tab="tab-group-801-content-804">Java</div></div><div class="tab-content"><div id="tab-group-801-content-802" class="tab-pane active" data-group="group_801" tabindex="-1"><div><span><p>Use the <a href="/docs/en/reference-pulsar-admin#namespaces-list"><code>list</code></a> subcommand and specify the tenant:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces list <span class="hljs-built_in">test</span>-tenant</span><br />test-tenant/ns1<br />test-tenant/ns2<br /></code></pre>
</span></div></div><div id="tab-group-801-content-803" class="tab-pane" data-group="group_801" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|GET|/admin/v2/namespaces/:tenant|operation/getTenantNamespaces?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-801-content-804" class="tab-pane" data-group="group_801" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().getNamespaces(tenant);<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="delete-namespaces"></a><a href="#delete-namespaces" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Delete namespaces</h3>
<p>You can delete existing namespaces from a tenant.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-805-tab-806" class="nav-link active" data-group="group_805" data-tab="tab-group-805-content-806">pulsar-admin</div><div id="tab-group-805-tab-807" class="nav-link" data-group="group_805" data-tab="tab-group-805-content-807">REST API</div><div id="tab-group-805-tab-808" class="nav-link" data-group="group_805" data-tab="tab-group-805-content-808">Java</div></div><div class="tab-content"><div id="tab-group-805-content-806" class="tab-pane active" data-group="group_805" tabindex="-1"><div><span><p>Use the <a href="/docs/en/reference-pulsar-admin#namespaces-delete"><code>delete</code></a> subcommand and specify the namespace:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces delete <span class="hljs-built_in">test</span>-tenant/ns1</span><br /></code></pre>
</span></div></div><div id="tab-group-805-content-807" class="tab-pane" data-group="group_805" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|DELETE|/admin/v2/namespaces/:tenant/:namespace|operation/deleteNamespace?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-805-content-808" class="tab-pane" data-group="group_805" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().deleteNamespace(namespace);<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="configure-replication-clusters"></a><a href="#configure-replication-clusters" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Configure replication clusters</h3>
<h4><a class="anchor" aria-hidden="true" id="set-replication-cluster"></a><a href="#set-replication-cluster" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Set replication cluster</h4>
<p>You can set replication clusters for a namespace to enable Pulsar to internally replicate the published messages from one colocation facility to another.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-809-tab-810" class="nav-link active" data-group="group_809" data-tab="tab-group-809-content-810">pulsar-admin</div><div id="tab-group-809-tab-811" class="nav-link" data-group="group_809" data-tab="tab-group-809-content-811">REST API</div><div id="tab-group-809-tab-812" class="nav-link" data-group="group_809" data-tab="tab-group-809-content-812">Java</div></div><div class="tab-content"><div id="tab-group-809-content-810" class="tab-pane active" data-group="group_809" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">set-clusters</span> <span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1 </span>\<br /> <span class="hljs-built_in">--clusters</span> <span class="hljs-string">cl1<br /></span></code></pre>
</span></div></div><div id="tab-group-809-content-811" class="tab-pane" data-group="group_809" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|POST|/admin/v2/namespaces/:tenant/:namespace/replication|operation/setNamespaceReplicationClusters?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-809-content-812" class="tab-pane" data-group="group_809" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().setNamespaceReplicationClusters(namespace, clusters);<br /></code></pre>
</span></div></div></div></div>
<h4><a class="anchor" aria-hidden="true" id="get-replication-cluster"></a><a href="#get-replication-cluster" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Get replication cluster</h4>
<p>You can get the list of replication clusters for a given namespace.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-813-tab-814" class="nav-link active" data-group="group_813" data-tab="tab-group-813-content-814">pulsar-admin</div><div id="tab-group-813-tab-815" class="nav-link" data-group="group_813" data-tab="tab-group-813-content-815">REST API</div><div id="tab-group-813-tab-816" class="nav-link" data-group="group_813" data-tab="tab-group-813-content-816">Java</div></div><div class="tab-content"><div id="tab-group-813-content-814" class="tab-pane active" data-group="group_813" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">get-clusters</span> <span class="hljs-string">test-tenant/</span><span class="hljs-string">cl1/</span><span class="hljs-string">ns1<br /></span></code></pre>
<pre><code class="hljs"><span class="hljs-attribute">cl2</span><br /></code></pre>
</span></div></div><div id="tab-group-813-content-815" class="tab-pane" data-group="group_813" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|GET|/admin/v2/namespaces/:tenant/:namespace/replication|operation/getNamespaceReplicationClusters?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-813-content-816" class="tab-pane" data-group="group_813" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().getNamespaceReplicationClusters(namespace)<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="configure-backlog-quota-policies"></a><a href="#configure-backlog-quota-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Configure backlog quota policies</h3>
<h4><a class="anchor" aria-hidden="true" id="set-backlog-quota-policies"></a><a href="#set-backlog-quota-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Set backlog quota policies</h4>
<p>Backlog quota helps the broker to restrict bandwidth/storage of a namespace once it reaches a certain threshold limit. Admin can set the limit and take corresponding action after the limit is reached.</p>
<ol>
<li><p>producer_request_hold: broker holds but not persists produce request payload</p></li>
<li><p>producer_exception: broker disconnects with the client by giving an exception</p></li>
<li><p>consumer_backlog_eviction: broker starts discarding backlog messages</p></li>
</ol>
<p>Backlog quota restriction can be taken care by defining restriction of backlog-quota-type: destination_storage.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-817-tab-818" class="nav-link active" data-group="group_817" data-tab="tab-group-817-content-818">pulsar-admin</div><div id="tab-group-817-tab-819" class="nav-link" data-group="group_817" data-tab="tab-group-817-content-819">REST API</div><div id="tab-group-817-tab-820" class="nav-link" data-group="group_817" data-tab="tab-group-817-content-820">Java</div></div><div class="tab-content"><div id="tab-group-817-content-818" class="tab-pane active" data-group="group_817" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">set-backlog-quota</span> <span class="hljs-built_in">--limit</span> <span class="hljs-string">10G </span><span class="hljs-built_in">--limitTime</span> <span class="hljs-string">36000 </span><span class="hljs-built_in">--policy</span> <span class="hljs-string">producer_request_hold </span><span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1<br /></span></code></pre>
</span></div></div><div id="tab-group-817-content-819" class="tab-pane" data-group="group_817" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|POST|/admin/v2/namespaces/:tenant/:namespace/backlogQuota|operation/setBacklogQuota?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-817-content-820" class="tab-pane" data-group="group_817" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().setBacklogQuota(namespace, <span class="hljs-keyword">new</span> BacklogQuota(limit, limitTime, policy))<br /></code></pre>
</span></div></div></div></div>
<h4><a class="anchor" aria-hidden="true" id="get-backlog-quota-policies"></a><a href="#get-backlog-quota-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Get backlog quota policies</h4>
<p>You can get a configured backlog quota for a given namespace.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-821-tab-822" class="nav-link active" data-group="group_821" data-tab="tab-group-821-content-822">pulsar-admin</div><div id="tab-group-821-tab-823" class="nav-link" data-group="group_821" data-tab="tab-group-821-content-823">REST API</div><div id="tab-group-821-tab-824" class="nav-link" data-group="group_821" data-tab="tab-group-821-content-824">Java</div></div><div class="tab-content"><div id="tab-group-821-content-822" class="tab-pane active" data-group="group_821" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">get-backlog-quotas</span> <span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1<br /></span></code></pre>
<pre><code class="hljs css language-json">{<br /> <span class="hljs-attr">"destination_storage"</span>: {<br /> <span class="hljs-attr">"limit"</span>: <span class="hljs-number">10</span>,<br /> <span class="hljs-attr">"policy"</span>: <span class="hljs-string">"producer_request_hold"</span><br /> }<br />}<br /></code></pre>
</span></div></div><div id="tab-group-821-content-823" class="tab-pane" data-group="group_821" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|GET|/admin/v2/namespaces/:tenant/:namespace/backlogQuotaMap|operation/getBacklogQuotaMap?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-821-content-824" class="tab-pane" data-group="group_821" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().getBacklogQuotaMap(namespace);<br /></code></pre>
</span></div></div></div></div>
<h4><a class="anchor" aria-hidden="true" id="remove-backlog-quota-policies"></a><a href="#remove-backlog-quota-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Remove backlog quota policies</h4>
<p>You can remove backlog quota policies for a given namespace.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-825-tab-826" class="nav-link active" data-group="group_825" data-tab="tab-group-825-content-826">pulsar-admin</div><div id="tab-group-825-tab-827" class="nav-link" data-group="group_825" data-tab="tab-group-825-content-827">REST API</div><div id="tab-group-825-tab-828" class="nav-link" data-group="group_825" data-tab="tab-group-825-content-828">Java</div></div><div class="tab-content"><div id="tab-group-825-content-826" class="tab-pane active" data-group="group_825" tabindex="-1"><div><span><pre><code class="hljs"><span class="hljs-variable">$</span> pulsar<span class="hljs-literal">-admin</span> namespaces <span class="hljs-built_in">remove-backlog</span><span class="hljs-literal">-quota</span> <span class="hljs-built_in">test-tenant</span>/ns1<br /></code></pre>
</span></div></div><div id="tab-group-825-content-827" class="tab-pane" data-group="group_825" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|DELETE|/admin/v2/namespaces/:tenant/:namespace/backlogQuota|operation/removeBacklogQuota?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-825-content-828" class="tab-pane" data-group="group_825" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().removeBacklogQuota(namespace, backlogQuotaType)<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="configure-persistence-policies"></a><a href="#configure-persistence-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Configure persistence policies</h3>
<h4><a class="anchor" aria-hidden="true" id="set-persistence-policies"></a><a href="#set-persistence-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Set persistence policies</h4>
<p>Persistence policies allow users to configure persistency-level for all topic messages under a given namespace.</p>
<ul>
<li><p>Bookkeeper-ack-quorum: Number of acks (guaranteed copies) to wait for each entry, default: 0</p></li>
<li><p>Bookkeeper-ensemble: Number of bookies to use for a topic, default: 0</p></li>
<li><p>Bookkeeper-write-quorum: How many writes to make of each entry, default: 0</p></li>
<li><p>Ml-mark-delete-max-rate: Throttling rate of mark-delete operation (0 means no throttle), default: 0.0</p></li>
</ul>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-829-tab-830" class="nav-link active" data-group="group_829" data-tab="tab-group-829-content-830">pulsar-admin</div><div id="tab-group-829-tab-831" class="nav-link" data-group="group_829" data-tab="tab-group-829-content-831">REST API</div><div id="tab-group-829-tab-832" class="nav-link" data-group="group_829" data-tab="tab-group-829-content-832">Java</div></div><div class="tab-content"><div id="tab-group-829-content-830" class="tab-pane active" data-group="group_829" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">set-persistence</span> <span class="hljs-built_in">--bookkeeper-ack-quorum</span> 2 <span class="hljs-built_in">--bookkeeper-ensemble</span> 3 <span class="hljs-built_in">--bookkeeper-write-quorum</span> 2 <span class="hljs-built_in">--ml-mark-delete-max-rate</span> 0 <span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1<br /></span></code></pre>
</span></div></div><div id="tab-group-829-content-831" class="tab-pane" data-group="group_829" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|POST|/admin/v2/namespaces/:tenant/:namespace/persistence|operation/setPersistence?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-829-content-832" class="tab-pane" data-group="group_829" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().setPersistence(namespace,<span class="hljs-keyword">new</span> PersistencePolicies(bookkeeperEnsemble, bookkeeperWriteQuorum,bookkeeperAckQuorum,managedLedgerMaxMarkDeleteRate))<br /></code></pre>
</span></div></div></div></div>
<h4><a class="anchor" aria-hidden="true" id="get-persistence-policies"></a><a href="#get-persistence-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Get persistence policies</h4>
<p>You can get the configured persistence policies of a given namespace.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-833-tab-834" class="nav-link active" data-group="group_833" data-tab="tab-group-833-content-834">pulsar-admin</div><div id="tab-group-833-tab-835" class="nav-link" data-group="group_833" data-tab="tab-group-833-content-835">REST API</div><div id="tab-group-833-tab-836" class="nav-link" data-group="group_833" data-tab="tab-group-833-content-836">Java</div></div><div class="tab-content"><div id="tab-group-833-content-834" class="tab-pane active" data-group="group_833" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">get-persistence</span> <span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1<br /></span></code></pre>
<pre><code class="hljs css language-json">{<br /> <span class="hljs-attr">"bookkeeperEnsemble"</span>: <span class="hljs-number">3</span>,<br /> <span class="hljs-attr">"bookkeeperWriteQuorum"</span>: <span class="hljs-number">2</span>,<br /> <span class="hljs-attr">"bookkeeperAckQuorum"</span>: <span class="hljs-number">2</span>,<br /> <span class="hljs-attr">"managedLedgerMaxMarkDeleteRate"</span>: <span class="hljs-number">0</span><br />}<br /></code></pre>
</span></div></div><div id="tab-group-833-content-835" class="tab-pane" data-group="group_833" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|GET|/admin/v2/namespaces/:tenant/:namespace/persistence|operation/getPersistence?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-833-content-836" class="tab-pane" data-group="group_833" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().getPersistence(namespace)<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="configure-namespace-bundles"></a><a href="#configure-namespace-bundles" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Configure namespace bundles</h3>
<h4><a class="anchor" aria-hidden="true" id="unload-namespace-bundles"></a><a href="#unload-namespace-bundles" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Unload namespace bundles</h4>
<p>The namespace bundle is a virtual group of topics which belong to the same namespace. If the broker gets overloaded with the number of bundles, this command can help unload a bundle from that broker, so it can be served by some other less-loaded brokers. The namespace bundle ID ranges from 0x00000000 to 0xffffffff.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-837-tab-838" class="nav-link active" data-group="group_837" data-tab="tab-group-837-content-838">pulsar-admin</div><div id="tab-group-837-tab-839" class="nav-link" data-group="group_837" data-tab="tab-group-837-content-839">REST API</div><div id="tab-group-837-tab-840" class="nav-link" data-group="group_837" data-tab="tab-group-837-content-840">Java</div></div><div class="tab-content"><div id="tab-group-837-content-838" class="tab-pane active" data-group="group_837" tabindex="-1"><div><span><pre><code class="hljs">$ pulsar-admin namespaces <span class="hljs-built_in">unload</span> <span class="hljs-comment">--bundle 0x00000000_0xffffffff test-tenant/ns1</span><br /></code></pre>
</span></div></div><div id="tab-group-837-content-839" class="tab-pane" data-group="group_837" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject</span>: endpoint|PUT|<span class="hljs-regexp">/admin/v</span>2/namespaces/<span class="hljs-symbol">:tenant/</span><span class="hljs-symbol">:namespace/</span>{bundle}/unload|operation/unloadNamespaceBundle?version=[[<span class="hljs-symbol">pulsar:</span>version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-837-content-840" class="tab-pane" data-group="group_837" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().unloadNamespaceBundle(namespace, bundle)<br /></code></pre>
</span></div></div></div></div>
<h4><a class="anchor" aria-hidden="true" id="split-namespace-bundles"></a><a href="#split-namespace-bundles" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Split namespace bundles</h4>
<p>One namespace bundle can contain multiple topics but can be served by only one broker. If a single bundle is creating an excessive load on a broker, an admin can split the bundle using the command below, permitting one or more of the new bundles to be unloaded, thus balancing the load across the brokers.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-841-tab-842" class="nav-link active" data-group="group_841" data-tab="tab-group-841-content-842">pulsar-admin</div><div id="tab-group-841-tab-843" class="nav-link" data-group="group_841" data-tab="tab-group-841-content-843">REST API</div><div id="tab-group-841-tab-844" class="nav-link" data-group="group_841" data-tab="tab-group-841-content-844">Java</div></div><div class="tab-content"><div id="tab-group-841-content-842" class="tab-pane active" data-group="group_841" tabindex="-1"><div><span><pre><code class="hljs"><span class="hljs-variable">$</span> pulsar<span class="hljs-literal">-admin</span> namespaces <span class="hljs-built_in">split-bundle</span> -<span class="hljs-literal">-bundle</span> <span class="hljs-number">0</span>x00000000_0xffffffff <span class="hljs-built_in">test-tenant</span>/ns1<br /></code></pre>
</span></div></div><div id="tab-group-841-content-843" class="tab-pane" data-group="group_841" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject</span>: endpoint|PUT|<span class="hljs-regexp">/admin/v</span>2/namespaces/<span class="hljs-symbol">:tenant/</span><span class="hljs-symbol">:namespace/</span>{bundle}/split|operation/splitNamespaceBundle?version=[[<span class="hljs-symbol">pulsar:</span>version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-841-content-844" class="tab-pane" data-group="group_841" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().splitNamespaceBundle(namespace, bundle)<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="configure-message-ttl"></a><a href="#configure-message-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Configure message TTL</h3>
<h4><a class="anchor" aria-hidden="true" id="set-message-ttl"></a><a href="#set-message-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Set message-ttl</h4>
<p>You can configure the time to live (in seconds) duration for messages. In the example below, the message-ttl is set as 100s.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-845-tab-846" class="nav-link active" data-group="group_845" data-tab="tab-group-845-content-846">pulsar-admin</div><div id="tab-group-845-tab-847" class="nav-link" data-group="group_845" data-tab="tab-group-845-content-847">REST API</div><div id="tab-group-845-tab-848" class="nav-link" data-group="group_845" data-tab="tab-group-845-content-848">Java</div></div><div class="tab-content"><div id="tab-group-845-content-846" class="tab-pane active" data-group="group_845" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">set-message-ttl</span> <span class="hljs-built_in">--messageTTL</span> <span class="hljs-string">100 </span><span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1<br /></span></code></pre>
</span></div></div><div id="tab-group-845-content-847" class="tab-pane" data-group="group_845" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|POST|/admin/v2/namespaces/:tenant/:namespace/messageTTL|operation/setNamespaceMessageTTL?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-845-content-848" class="tab-pane" data-group="group_845" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().setNamespaceMessageTTL(namespace, messageTTL)<br /></code></pre>
</span></div></div></div></div>
<h4><a class="anchor" aria-hidden="true" id="get-message-ttl"></a><a href="#get-message-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Get message-ttl</h4>
<p>When the message-ttl for a namespace is set, you can use the command below to get the configured value. This example comtinues the example of the command <code>set message-ttl</code>, so the returned value is 100(s).</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-849-tab-850" class="nav-link active" data-group="group_849" data-tab="tab-group-849-content-850">pulsar-admin</div><div id="tab-group-849-tab-851" class="nav-link" data-group="group_849" data-tab="tab-group-849-content-851">REST API</div><div id="tab-group-849-tab-852" class="nav-link" data-group="group_849" data-tab="tab-group-849-content-852">Java</div></div><div class="tab-content"><div id="tab-group-849-content-850" class="tab-pane active" data-group="group_849" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">get-message-ttl</span> <span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1<br /></span></code></pre>
<pre><code class="hljs"><span class="hljs-number">100</span><br /></code></pre>
</span></div></div><div id="tab-group-849-content-851" class="tab-pane" data-group="group_849" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|GET|/admin/v2/namespaces/:tenant/:namespace/messageTTL|operation/getNamespaceMessageTTL?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
<pre><code class="hljs"><span class="hljs-number">100</span><br /></code></pre>
</span></div></div><div id="tab-group-849-content-852" class="tab-pane" data-group="group_849" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().getNamespaceMessageTTL(namespace)<br /></code></pre>
<pre><code class="hljs"><span class="hljs-number">100</span><br /></code></pre>
</span></div></div></div></div>
<h4><a class="anchor" aria-hidden="true" id="remove-message-ttl"></a><a href="#remove-message-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Remove message-ttl</h4>
<p>Remove a message TTL of the configured namespace.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-853-tab-854" class="nav-link active" data-group="group_853" data-tab="tab-group-853-content-854">pulsar-admin</div><div id="tab-group-853-tab-855" class="nav-link" data-group="group_853" data-tab="tab-group-853-content-855">REST API</div><div id="tab-group-853-tab-856" class="nav-link" data-group="group_853" data-tab="tab-group-853-content-856">Java</div></div><div class="tab-content"><div id="tab-group-853-content-854" class="tab-pane active" data-group="group_853" tabindex="-1"><div><span><pre><code class="hljs">$ pulsar-admin namespaces <span class="hljs-keyword">remove</span>-<span class="hljs-keyword">message</span>-ttl <span class="hljs-keyword">test</span>-tenant/ns1<br /></code></pre>
</span></div></div><div id="tab-group-853-content-855" class="tab-pane" data-group="group_853" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|DELETE|/admin/v2/namespaces/:tenant/:namespace/messageTTL|operation/removeNamespaceMessageTTL?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-853-content-856" class="tab-pane" data-group="group_853" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().removeNamespaceMessageTTL(namespace)<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="clear-backlog"></a><a href="#clear-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Clear backlog</h3>
<h4><a class="anchor" aria-hidden="true" id="clear-namespace-backlog"></a><a href="#clear-namespace-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Clear namespace backlog</h4>
<p>It clears all message backlog for all the topics that belong to a specific namespace. You can also clear backlog for a specific subscription as well.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-857-tab-858" class="nav-link active" data-group="group_857" data-tab="tab-group-857-content-858">pulsar-admin</div><div id="tab-group-857-tab-859" class="nav-link" data-group="group_857" data-tab="tab-group-857-content-859">REST API</div><div id="tab-group-857-tab-860" class="nav-link" data-group="group_857" data-tab="tab-group-857-content-860">Java</div></div><div class="tab-content"><div id="tab-group-857-content-858" class="tab-pane active" data-group="group_857" tabindex="-1"><div><span><pre><code class="hljs">$ pulsar-admin namespaces clear-<span class="hljs-keyword">backlog </span>--<span class="hljs-keyword">sub </span>my-<span class="hljs-keyword">subscription </span>test-tenant/ns1<br /></code></pre>
</span></div></div><div id="tab-group-857-content-859" class="tab-pane" data-group="group_857" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|POST|/admin/v2/namespaces/:tenant/:namespace/clearBacklog|operation/clearNamespaceBacklogForSubscription?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-857-content-860" class="tab-pane" data-group="group_857" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().clearNamespaceBacklogForSubscription(namespace, subscription)<br /></code></pre>
</span></div></div></div></div>
<h4><a class="anchor" aria-hidden="true" id="clear-bundle-backlog"></a><a href="#clear-bundle-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Clear bundle backlog</h4>
<p>It clears all message backlog for all the topics that belong to a specific NamespaceBundle. You can also clear backlog for a specific subscription as well.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-861-tab-862" class="nav-link active" data-group="group_861" data-tab="tab-group-861-content-862">pulsar-admin</div><div id="tab-group-861-tab-863" class="nav-link" data-group="group_861" data-tab="tab-group-861-content-863">REST API</div><div id="tab-group-861-tab-864" class="nav-link" data-group="group_861" data-tab="tab-group-861-content-864">Java</div></div><div class="tab-content"><div id="tab-group-861-content-862" class="tab-pane active" data-group="group_861" tabindex="-1"><div><span><pre><code class="hljs">$ pulsar-admin namespaces clear-<span class="hljs-keyword">backlog </span> --<span class="hljs-keyword">bundle </span><span class="hljs-number">0x00000000</span>_<span class="hljs-number">0xffffffff</span> --<span class="hljs-keyword">sub </span>my-<span class="hljs-keyword">subscription </span>test-tenant/ns1<br /></code></pre>
</span></div></div><div id="tab-group-861-content-863" class="tab-pane" data-group="group_861" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject</span>: endpoint|POST|<span class="hljs-regexp">/admin/v</span>2/namespaces/<span class="hljs-symbol">:tenant/</span><span class="hljs-symbol">:namespace/</span>{bundle}/clearBacklog|operation?version=[[<span class="hljs-symbol">pulsar:</span>version_number]]/clearNamespaceBundleBacklogForSubscription}<br /></code></pre>
</span></div></div><div id="tab-group-861-content-864" class="tab-pane" data-group="group_861" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().clearNamespaceBundleBacklogForSubscription(namespace, bundle, subscription)<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="configure-retention"></a><a href="#configure-retention" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Configure retention</h3>
<h4><a class="anchor" aria-hidden="true" id="set-retention"></a><a href="#set-retention" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Set retention</h4>
<p>Each namespace contains multiple topics and the retention size (storage size) of each topic should not exceed a specific threshold or it should be stored for a certain period. This command helps configure the retention size and time of topics in a given namespace.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-865-tab-866" class="nav-link active" data-group="group_865" data-tab="tab-group-865-content-866">pulsar-admin</div><div id="tab-group-865-tab-867" class="nav-link" data-group="group_865" data-tab="tab-group-865-content-867">REST API</div><div id="tab-group-865-tab-868" class="nav-link" data-group="group_865" data-tab="tab-group-865-content-868">Java</div></div><div class="tab-content"><div id="tab-group-865-content-866" class="tab-pane active" data-group="group_865" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">set-retention</span> <span class="hljs-built_in">--size</span> <span class="hljs-string">100 </span><span class="hljs-built_in">--time</span> <span class="hljs-string">10 </span><span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1<br /></span></code></pre>
</span></div></div><div id="tab-group-865-content-867" class="tab-pane" data-group="group_865" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|POST|/admin/v2/namespaces/:tenant/:namespace/retention|operation/setRetention?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-865-content-868" class="tab-pane" data-group="group_865" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().setRetention(namespace, <span class="hljs-keyword">new</span> RetentionPolicies(retentionTimeInMin, retentionSizeInMB))<br /></code></pre>
</span></div></div></div></div>
<h4><a class="anchor" aria-hidden="true" id="get-retention"></a><a href="#get-retention" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Get retention</h4>
<p>It shows retention information of a given namespace.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-869-tab-870" class="nav-link active" data-group="group_869" data-tab="tab-group-869-content-870">pulsar-admin</div><div id="tab-group-869-tab-871" class="nav-link" data-group="group_869" data-tab="tab-group-869-content-871">REST API</div><div id="tab-group-869-tab-872" class="nav-link" data-group="group_869" data-tab="tab-group-869-content-872">Java</div></div><div class="tab-content"><div id="tab-group-869-content-870" class="tab-pane active" data-group="group_869" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">get-retention</span> <span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1<br /></span></code></pre>
<pre><code class="hljs css language-json">{<br /> <span class="hljs-attr">"retentionTimeInMinutes"</span>: <span class="hljs-number">10</span>,<br /> <span class="hljs-attr">"retentionSizeInMB"</span>: <span class="hljs-number">100</span><br />}<br /></code></pre>
</span></div></div><div id="tab-group-869-content-871" class="tab-pane" data-group="group_869" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|GET|/admin/v2/namespaces/:tenant/:namespace/retention|operation/getRetention?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-869-content-872" class="tab-pane" data-group="group_869" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().getRetention(namespace)<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="configure-dispatch-throttling-for-topics"></a><a href="#configure-dispatch-throttling-for-topics" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Configure dispatch throttling for topics</h3>
<h4><a class="anchor" aria-hidden="true" id="set-dispatch-throttling-for-topics"></a><a href="#set-dispatch-throttling-for-topics" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Set dispatch throttling for topics</h4>
<p>It sets message dispatch rate for all the topics under a given namespace.
The dispatch rate can be restricted by the number of messages per X seconds (<code>msg-dispatch-rate</code>) or by the number of message-bytes per X second (<code>byte-dispatch-rate</code>).
dispatch rate is in second and it can be configured with <code>dispatch-rate-period</code>. Default value of <code>msg-dispatch-rate</code> and <code>byte-dispatch-rate</code> is -1 which
disables the throttling.</p>
<blockquote>
<p><strong>Note</strong></p>
<ul>
<li><p>If neither <code>clusterDispatchRate</code> nor <code>topicDispatchRate</code> is configured, dispatch throttling is disabled.</p></li>
<li><p>If <code>topicDispatchRate</code> is not configured, <code>clusterDispatchRate</code> takes effect.</p></li>
<li><p>If <code>topicDispatchRate</code> is configured, <code>topicDispatchRate</code> takes effect.</p></li>
</ul>
</blockquote>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-873-tab-874" class="nav-link active" data-group="group_873" data-tab="tab-group-873-content-874">pulsar-admin</div><div id="tab-group-873-tab-875" class="nav-link" data-group="group_873" data-tab="tab-group-873-content-875">REST API</div><div id="tab-group-873-tab-876" class="nav-link" data-group="group_873" data-tab="tab-group-873-content-876">Java</div></div><div class="tab-content"><div id="tab-group-873-content-874" class="tab-pane active" data-group="group_873" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">set-dispatch-rate</span> <span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1 </span>\<br /> <span class="hljs-built_in">--msg-dispatch-rate</span> <span class="hljs-string">1000 </span>\<br /> <span class="hljs-built_in">--byte-dispatch-rate</span> <span class="hljs-string">1048576 </span>\<br /> <span class="hljs-built_in">--dispatch-rate-period</span> 1<br /></code></pre>
</span></div></div><div id="tab-group-873-content-875" class="tab-pane" data-group="group_873" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|POST|/admin/v2/namespaces/:tenant/:namespace/dispatchRate|operation/setDispatchRate?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-873-content-876" class="tab-pane" data-group="group_873" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().setDispatchRate(namespace, <span class="hljs-keyword">new</span> DispatchRate(<span class="hljs-number">1000</span>, <span class="hljs-number">1048576</span>, <span class="hljs-number">1</span>))<br /></code></pre>
</span></div></div></div></div>
<h4><a class="anchor" aria-hidden="true" id="get-configured-message-rate-for-topics"></a><a href="#get-configured-message-rate-for-topics" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Get configured message-rate for topics</h4>
<p>It shows configured message-rate for the namespace (topics under this namespace can dispatch this many messages per second)</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-877-tab-878" class="nav-link active" data-group="group_877" data-tab="tab-group-877-content-878">pulsar-admin</div><div id="tab-group-877-tab-879" class="nav-link" data-group="group_877" data-tab="tab-group-877-content-879">REST API</div><div id="tab-group-877-tab-880" class="nav-link" data-group="group_877" data-tab="tab-group-877-content-880">Java</div></div><div class="tab-content"><div id="tab-group-877-content-878" class="tab-pane active" data-group="group_877" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">get-dispatch-rate</span> <span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1<br /></span></code></pre>
<pre><code class="hljs css language-json">{<br /> <span class="hljs-attr">"dispatchThrottlingRatePerTopicInMsg"</span> : <span class="hljs-number">1000</span>,<br /> <span class="hljs-attr">"dispatchThrottlingRatePerTopicInByte"</span> : <span class="hljs-number">1048576</span>,<br /> <span class="hljs-attr">"ratePeriodInSecond"</span> : <span class="hljs-number">1</span><br />}<br /></code></pre>
</span></div></div><div id="tab-group-877-content-879" class="tab-pane" data-group="group_877" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|GET|/admin/v2/namespaces/:tenant/:namespace/dispatchRate|operation/getDispatchRate?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-877-content-880" class="tab-pane" data-group="group_877" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().getDispatchRate(namespace)<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="configure-dispatch-throttling-for-subscription"></a><a href="#configure-dispatch-throttling-for-subscription" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Configure dispatch throttling for subscription</h3>
<h4><a class="anchor" aria-hidden="true" id="set-dispatch-throttling-for-subscription"></a><a href="#set-dispatch-throttling-for-subscription" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Set dispatch throttling for subscription</h4>
<p>It sets message dispatch rate for all the subscription of topics under a given namespace.
The dispatch rate can be restricted by the number of messages per X seconds (<code>msg-dispatch-rate</code>) or by the number of message-bytes per X second (<code>byte-dispatch-rate</code>).
dispatch rate is in second and it can be configured with <code>dispatch-rate-period</code>. Default value of <code>msg-dispatch-rate</code> and <code>byte-dispatch-rate</code> is -1 which
disables the throttling.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-881-tab-882" class="nav-link active" data-group="group_881" data-tab="tab-group-881-content-882">pulsar-admin</div><div id="tab-group-881-tab-883" class="nav-link" data-group="group_881" data-tab="tab-group-881-content-883">REST API</div><div id="tab-group-881-tab-884" class="nav-link" data-group="group_881" data-tab="tab-group-881-content-884">Java</div></div><div class="tab-content"><div id="tab-group-881-content-882" class="tab-pane active" data-group="group_881" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">set-subscription-dispatch-rate</span> <span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1 </span>\<br /> <span class="hljs-built_in">--msg-dispatch-rate</span> <span class="hljs-string">1000 </span>\<br /> <span class="hljs-built_in">--byte-dispatch-rate</span> <span class="hljs-string">1048576 </span>\<br /> <span class="hljs-built_in">--dispatch-rate-period</span> 1<br /></code></pre>
</span></div></div><div id="tab-group-881-content-883" class="tab-pane" data-group="group_881" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|POST|/admin/v2/namespaces/:tenant/:namespace/subscriptionDispatchRate|operation/setDispatchRate?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-881-content-884" class="tab-pane" data-group="group_881" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().setSubscriptionDispatchRate(namespace, <span class="hljs-keyword">new</span> DispatchRate(<span class="hljs-number">1000</span>, <span class="hljs-number">1048576</span>, <span class="hljs-number">1</span>))<br /></code></pre>
</span></div></div></div></div>
<h4><a class="anchor" aria-hidden="true" id="get-configured-message-rate-for-subscription"></a><a href="#get-configured-message-rate-for-subscription" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Get configured message-rate for subscription</h4>
<p>It shows configured message-rate for the namespace (topics under this namespace can dispatch this many messages per second)</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-885-tab-886" class="nav-link active" data-group="group_885" data-tab="tab-group-885-content-886">pulsar-admin</div><div id="tab-group-885-tab-887" class="nav-link" data-group="group_885" data-tab="tab-group-885-content-887">REST API</div><div id="tab-group-885-tab-888" class="nav-link" data-group="group_885" data-tab="tab-group-885-content-888">Java</div></div><div class="tab-content"><div id="tab-group-885-content-886" class="tab-pane active" data-group="group_885" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">get-subscription-dispatch-rate</span> <span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1<br /></span></code></pre>
<pre><code class="hljs css language-json">{<br /> <span class="hljs-attr">"dispatchThrottlingRatePerTopicInMsg"</span> : <span class="hljs-number">1000</span>,<br /> <span class="hljs-attr">"dispatchThrottlingRatePerTopicInByte"</span> : <span class="hljs-number">1048576</span>,<br /> <span class="hljs-attr">"ratePeriodInSecond"</span> : <span class="hljs-number">1</span><br />}<br /></code></pre>
</span></div></div><div id="tab-group-885-content-887" class="tab-pane" data-group="group_885" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|GET|/admin/v2/namespaces/:tenant/:namespace/subscriptionDispatchRate|operation/getDispatchRate?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-885-content-888" class="tab-pane" data-group="group_885" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().getSubscriptionDispatchRate(namespace)<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="configure-dispatch-throttling-for-replicator"></a><a href="#configure-dispatch-throttling-for-replicator" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Configure dispatch throttling for replicator</h3>
<h4><a class="anchor" aria-hidden="true" id="set-dispatch-throttling-for-replicator"></a><a href="#set-dispatch-throttling-for-replicator" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Set dispatch throttling for replicator</h4>
<p>It sets message dispatch rate for all the replicator between replication clusters under a given namespace.
The dispatch rate can be restricted by the number of messages per X seconds (<code>msg-dispatch-rate</code>) or by the number of message-bytes per X second (<code>byte-dispatch-rate</code>).
dispatch rate is in second and it can be configured with <code>dispatch-rate-period</code>. Default value of <code>msg-dispatch-rate</code> and <code>byte-dispatch-rate</code> is -1 which
disables the throttling.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-889-tab-890" class="nav-link active" data-group="group_889" data-tab="tab-group-889-content-890">pulsar-admin</div><div id="tab-group-889-tab-891" class="nav-link" data-group="group_889" data-tab="tab-group-889-content-891">REST API</div><div id="tab-group-889-tab-892" class="nav-link" data-group="group_889" data-tab="tab-group-889-content-892">Java</div></div><div class="tab-content"><div id="tab-group-889-content-890" class="tab-pane active" data-group="group_889" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">set-replicator-dispatch-rate</span> <span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1 </span>\<br /> <span class="hljs-built_in">--msg-dispatch-rate</span> <span class="hljs-string">1000 </span>\<br /> <span class="hljs-built_in">--byte-dispatch-rate</span> <span class="hljs-string">1048576 </span>\<br /> <span class="hljs-built_in">--dispatch-rate-period</span> 1<br /></code></pre>
</span></div></div><div id="tab-group-889-content-891" class="tab-pane" data-group="group_889" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|POST|/admin/v2/namespaces/:tenant/:namespace/replicatorDispatchRate|operation/setDispatchRate?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-889-content-892" class="tab-pane" data-group="group_889" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().setReplicatorDispatchRate(namespace, <span class="hljs-keyword">new</span> DispatchRate(<span class="hljs-number">1000</span>, <span class="hljs-number">1048576</span>, <span class="hljs-number">1</span>))<br /></code></pre>
</span></div></div></div></div>
<h4><a class="anchor" aria-hidden="true" id="get-configured-message-rate-for-replicator"></a><a href="#get-configured-message-rate-for-replicator" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Get configured message-rate for replicator</h4>
<p>It shows configured message-rate for the namespace (topics under this namespace can dispatch this many messages per second)</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-893-tab-894" class="nav-link active" data-group="group_893" data-tab="tab-group-893-content-894">pulsar-admin</div><div id="tab-group-893-tab-895" class="nav-link" data-group="group_893" data-tab="tab-group-893-content-895">REST API</div><div id="tab-group-893-tab-896" class="nav-link" data-group="group_893" data-tab="tab-group-893-content-896">Java</div></div><div class="tab-content"><div id="tab-group-893-content-894" class="tab-pane active" data-group="group_893" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">get-replicator-dispatch-rate</span> <span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1<br /></span></code></pre>
<pre><code class="hljs css language-json">{<br /> <span class="hljs-attr">"dispatchThrottlingRatePerTopicInMsg"</span> : <span class="hljs-number">1000</span>,<br /> <span class="hljs-attr">"dispatchThrottlingRatePerTopicInByte"</span> : <span class="hljs-number">1048576</span>,<br /> <span class="hljs-attr">"ratePeriodInSecond"</span> : <span class="hljs-number">1</span><br />}<br /></code></pre>
</span></div></div><div id="tab-group-893-content-895" class="tab-pane" data-group="group_893" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|GET|/admin/v2/namespaces/:tenant/:namespace/replicatorDispatchRate|operation/getDispatchRate?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-893-content-896" class="tab-pane" data-group="group_893" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().getReplicatorDispatchRate(namespace)<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="configure-deduplication-snapshot-interval"></a><a href="#configure-deduplication-snapshot-interval" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Configure deduplication snapshot interval</h3>
<h4><a class="anchor" aria-hidden="true" id="get-deduplication-snapshot-interval"></a><a href="#get-deduplication-snapshot-interval" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Get deduplication snapshot interval</h4>
<p>It shows configured <code>deduplicationSnapshotInterval</code> for a namespace (Each topic under the namespace will take a deduplication snapshot according to this interval)</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-897-tab-898" class="nav-link active" data-group="group_897" data-tab="tab-group-897-content-898">pulsar-admin</div><div id="tab-group-897-tab-899" class="nav-link" data-group="group_897" data-tab="tab-group-897-content-899">REST API</div><div id="tab-group-897-tab-900" class="nav-link" data-group="group_897" data-tab="tab-group-897-content-900">Java</div></div><div class="tab-content"><div id="tab-group-897-content-898" class="tab-pane active" data-group="group_897" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">get-deduplication-snapshot-interval</span> <span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1<br /></span></code></pre>
</span></div></div><div id="tab-group-897-content-899" class="tab-pane" data-group="group_897" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|GET|/admin/v2/namespaces/:tenant/:namespace/deduplicationSnapshotInterval?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-897-content-900" class="tab-pane" data-group="group_897" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().getDeduplicationSnapshotInterval(namespace)<br /></code></pre>
</span></div></div></div></div>
<h4><a class="anchor" aria-hidden="true" id="set-deduplication-snapshot-interval"></a><a href="#set-deduplication-snapshot-interval" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Set deduplication snapshot interval</h4>
<p>Set configured <code>deduplicationSnapshotInterval</code> for a namespace. Each topic under the namespace will take a deduplication snapshot according to this interval.
<code>brokerDeduplicationEnabled</code> must be set to <code>true</code> for this property to take effect.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-901-tab-902" class="nav-link active" data-group="group_901" data-tab="tab-group-901-content-902">pulsar-admin</div><div id="tab-group-901-tab-903" class="nav-link" data-group="group_901" data-tab="tab-group-901-content-903">REST API</div><div id="tab-group-901-tab-904" class="nav-link" data-group="group_901" data-tab="tab-group-901-content-904">Java</div></div><div class="tab-content"><div id="tab-group-901-content-902" class="tab-pane active" data-group="group_901" tabindex="-1"><div><span><pre><code class="hljs">$ <span class="hljs-string">pulsar-admin </span><span class="hljs-string">namespaces </span><span class="hljs-built_in">set-deduplication-snapshot-interval</span> <span class="hljs-string">test-tenant/</span><span class="hljs-string">ns1 </span><span class="hljs-built_in">--interval</span> <span class="hljs-string">1000 </span><br /></code></pre>
</span></div></div><div id="tab-group-901-content-903" class="tab-pane" data-group="group_901" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|POST|/admin/v2/namespaces/:tenant/:namespace/deduplicationSnapshotInterval?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
<pre><code class="hljs css language-json">{<br /> <span class="hljs-attr">"interval"</span>: <span class="hljs-number">1000</span><br />}<br /></code></pre>
</span></div></div><div id="tab-group-901-content-904" class="tab-pane" data-group="group_901" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().setDeduplicationSnapshotInterval(namespace, <span class="hljs-number">1000</span>)<br /></code></pre>
</span></div></div></div></div>
<h4><a class="anchor" aria-hidden="true" id="remove-deduplication-snapshot-interval"></a><a href="#remove-deduplication-snapshot-interval" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Remove deduplication snapshot interval</h4>
<p>Remove configured <code>deduplicationSnapshotInterval</code> of a namespace (Each topic under the namespace will take a deduplication snapshot according to this interval)</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-905-tab-906" class="nav-link active" data-group="group_905" data-tab="tab-group-905-content-906">pulsar-admin</div><div id="tab-group-905-tab-907" class="nav-link" data-group="group_905" data-tab="tab-group-905-content-907">REST API</div><div id="tab-group-905-tab-908" class="nav-link" data-group="group_905" data-tab="tab-group-905-content-908">Java</div></div><div class="tab-content"><div id="tab-group-905-content-906" class="tab-pane active" data-group="group_905" tabindex="-1"><div><span><pre><code class="hljs">$ pulsar-<span class="hljs-keyword">admin</span> namespaces remove-deduplication-<span class="hljs-keyword">snapshot</span>-<span class="hljs-type">interval</span> test-tenant/ns1<br /></code></pre>
</span></div></div><div id="tab-group-905-content-907" class="tab-pane" data-group="group_905" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|POST|/admin/v2/namespaces/:tenant/:namespace/deduplicationSnapshotInterval?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-905-content-908" class="tab-pane" data-group="group_905" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().removeDeduplicationSnapshotInterval(namespace)<br /></code></pre>
</span></div></div></div></div>
<h3><a class="anchor" aria-hidden="true" id="namespace-isolation"></a><a href="#namespace-isolation" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Namespace isolation</h3>
<p>You can use the <a href="/docs/en/administration-isolation">Pulsar isolation policy</a> to allocate resources (broker and bookie) for a namespace.</p>
<h3><a class="anchor" aria-hidden="true" id="unload-namespaces-from-a-broker"></a><a href="#unload-namespaces-from-a-broker" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Unload namespaces from a broker</h3>
<p>You can unload a namespace, or a <a href="/docs/en/reference-terminology#namespace-bundle">namespace bundle</a>, from the Pulsar <a href="/docs/en/reference-terminology#broker">broker</a> that is currently responsible for it.</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin"></a><a href="#pulsar-admin" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>pulsar-admin</h4>
<p>Use the <a href="/docs/en/reference-pulsar-admin#unload"><code>unload</code></a> subcommand of the <a href="/docs/en/reference-pulsar-admin#namespaces"><code>namespaces</code></a> command.</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-909-tab-910" class="nav-link active" data-group="group_909" data-tab="tab-group-909-content-910">pulsar-admin</div><div id="tab-group-909-tab-911" class="nav-link" data-group="group_909" data-tab="tab-group-909-content-911">REST</div><div id="tab-group-909-tab-912" class="nav-link" data-group="group_909" data-tab="tab-group-909-content-912">Java</div></div><div class="tab-content"><div id="tab-group-909-content-910" class="tab-pane active" data-group="group_909" tabindex="-1"><div><span><pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces unload my-tenant/my-ns</span><br /></code></pre>
</span></div></div><div id="tab-group-909-content-911" class="tab-pane" data-group="group_909" tabindex="-1"><div><span><pre><code class="hljs">{<span class="hljs-variable">@inject:</span> endpoint|PUT|/admin/v2/namespaces/:tenant/:namespace/unload|operation/unloadNamespace?version=[[<span class="hljs-attribute">pulsar</span>:version_number]]}<br /></code></pre>
</span></div></div><div id="tab-group-909-content-912" class="tab-pane" data-group="group_909" tabindex="-1"><div><span><pre><code class="hljs css language-java">admin.namespaces().unload(namespace)<br /></code></pre>
</span></div></div></div></div>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/en/admin-api-brokers"><span class="arrow-prev"></span><span>Brokers</span></a><a class="docs-next button" href="/docs/en/admin-api-permissions"><span>Permissions</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#namespaces-resources">Namespaces resources</a><ul class="toc-headings"><li><a href="#create-namespaces">Create namespaces</a></li><li><a href="#get-policies">Get policies</a></li><li><a href="#list-namespaces">List namespaces</a></li><li><a href="#delete-namespaces">Delete namespaces</a></li><li><a href="#configure-replication-clusters">Configure replication clusters</a></li><li><a href="#configure-backlog-quota-policies">Configure backlog quota policies</a></li><li><a href="#configure-persistence-policies">Configure persistence policies</a></li><li><a href="#configure-namespace-bundles">Configure namespace bundles</a></li><li><a href="#configure-message-ttl">Configure message TTL</a></li><li><a href="#clear-backlog">Clear backlog</a></li><li><a href="#configure-retention">Configure retention</a></li><li><a href="#configure-dispatch-throttling-for-topics">Configure dispatch throttling for topics</a></li><li><a href="#configure-dispatch-throttling-for-subscription">Configure dispatch throttling for subscription</a></li><li><a href="#configure-dispatch-throttling-for-replicator">Configure dispatch throttling for replicator</a></li><li><a href="#configure-deduplication-snapshot-interval">Configure deduplication snapshot interval</a></li><li><a href="#namespace-isolation">Namespace isolation</a></li><li><a href="#unload-namespaces-from-a-broker">Unload namespaces from a broker</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="copyright">Copyright © 2022 The Apache Software Foundation. All Rights Reserved. Apache, Apache Pulsar and the Apache feather logo are trademarks of The Apache Software Foundation.</section><span><script>
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
'<a id="community-menu" href="#">Community <span style="font-size: 0.75em">&nbsp;▼</span></a>' +
'<div id="community-dropdown" class="hide">' +
'<ul id="community-dropdown-items">' +
'<li><a href="/en/contact">Contact</a></li>' +
'<li><a href="/en/contributing">Contributing</a></li>' +
'<li><a href="/en/coding-guide">Coding guide</a></li>' +
'<li><a href="/en/events">Events</a></li>' +
'<li><a href="https://twitter.com/Apache_Pulsar" target="_blank">Twitter &#x2750</a></li>' +
'<li><a href="https://github.com/apache/pulsar/wiki" target="_blank">Wiki &#x2750</a></li>' +
'<li><a href="https://github.com/apache/pulsar/issues" target="_blank">Issue tracking &#x2750</a></li>' +
'<li><a href="https://pulsar-summit.org/" target="_blank">Pulsar Summit &#x2750</a></li>' +
'<li>&nbsp;</li>' +
'<li><a href="/en/resources">Resources</a></li>' +
'<li><a href="/en/team">Team</a></li>' +
'<li><a href="/en/powered-by">Powered By</a></li>' +
'</ul>' +
'</div>' +
'</li>';
community.innerHTML = communityMenu;
const communityMenuItem = document.getElementById("community-menu");
const communityDropDown = document.getElementById("community-dropdown");
communityMenuItem.addEventListener("click", function(event) {
event.preventDefault();
if (communityDropDown.className == 'hide') {
communityDropDown.className = 'visible';
} else {
communityDropDown.className = 'hide';
}
});
</script></span></footer></div><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script></body></html>