blob: 1ac6a3f55d12e207605883c1d5677979669e1d83 [file] [log] [blame]
<!doctype html>
<html lang="en" dir="ltr" class="blog-wrapper blog-post-page plugin-blog plugin-id-default">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v2.4.0">
<title data-rh="true">Apache Pulsar 2.6.1 | Apache Pulsar</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://pulsar.apache.org/img/pulsar-social-media-card.png"><meta data-rh="true" name="twitter:image" content="https://pulsar.apache.org/img/pulsar-social-media-card.png"><meta data-rh="true" property="og:url" content="https://pulsar.apache.org/blog/2020/08/21/Apache-Pulsar-2-6-1/"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="Apache Pulsar 2.6.1 | Apache Pulsar"><meta data-rh="true" name="description" content="We are excited to see that the Apache Pulsar community has successfully released 2.6.1 version after a lot of hard work. It is a great milestone for this fast-growing project and the Pulsar community. 2.6.1 is the result of a big effort from the community, with over 100 commits and a long list of improvements and bug fixes."><meta data-rh="true" property="og:description" content="We are excited to see that the Apache Pulsar community has successfully released 2.6.1 version after a lot of hard work. It is a great milestone for this fast-growing project and the Pulsar community. 2.6.1 is the result of a big effort from the community, with over 100 commits and a long list of improvements and bug fixes."><meta data-rh="true" property="og:type" content="article"><meta data-rh="true" property="article:published_time" content="2020-08-21T00:00:00.000Z"><meta data-rh="true" property="article:author" content="https://twitter.com/wolf4j1"><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://pulsar.apache.org/blog/2020/08/21/Apache-Pulsar-2-6-1/"><link data-rh="true" rel="alternate" href="https://pulsar.apache.org/blog/2020/08/21/Apache-Pulsar-2-6-1/" hreflang="en"><link data-rh="true" rel="alternate" href="https://pulsar.apache.org/blog/2020/08/21/Apache-Pulsar-2-6-1/" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://WK2YL0SALL-dsn.algolia.net" crossorigin="anonymous"><link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="Apache Pulsar RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="Apache Pulsar Atom Feed">
<link rel="search" type="application/opensearchdescription+xml" title="Apache Pulsar" href="/opensearch.xml">
<link rel="stylesheet" href="/css/katex-0.13.24.min.css" media="print" onload="this.media=&#39;all&#39;">
<script src="/js/sine-waves.min.js" async></script>
<script src="/js/matomo-agent.js"></script><link rel="stylesheet" href="/assets/css/styles.b0f65ef3.css">
<link rel="preload" href="/assets/js/runtime~main.1d0ed2a7.js" as="script">
<link rel="preload" href="/assets/js/main.e07a0c68.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}return t}()||function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}(),document.documentElement.setAttribute("data-announcement-bar-initially-dismissed",function(){try{return"true"===localStorage.getItem("docusaurus.announcement.dismiss")}catch(t){}return!1}())</script><div id="__docusaurus">
<div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#docusaurus_skipToContent_fallback">Skip to main content</a></div><div class="announcementBar_mb4j" style="background-color:#282826;color:#fff" role="banner"><div class="content_knG7 announcementBarContent_xLdY">
<a class="announcement-bar" href="https://registration.socio.events/e/pulsarvirtualsummiteurope2024" target="_blank">
<div class="announcement-bar__content">
<svg class="announcement-bar__icon">
<svg viewBox="0 0 33 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.5 19.6001H16.1L15.3 29.2001L26.5 12.4H17.06L18.1 2.80005L6.5 19.6001Z" stroke="#F7F7F7" stroke-width="1.5" stroke-linejoin="round"/>
</svg>
</svg>
<span>
Get your free pass for Pulsar Virtual Summit Europe 2024 on May 14, 2024 ๐Ÿ—“๏ธ
</span>
<svg class="announcement-bar__icon">
<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="20" height="20" transform="translate(6 6)" fill="white" fill-opacity="0.01"/>
<path d="M17.6667 10.1667L23.5 16.0001M23.5 16.0001L17.6667 21.8334M23.5 16.0001L8.5 16.0001" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<rect x="0.5" y="0.5" width="31" height="31" rx="15.5" stroke="white"/>
</svg>
</svg>
</div>
</a>
</div></div><nav aria-label="Main" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/logo-black.svg" alt="Apache Pulsar logo" class="themedImage_ToTc themedImage--light_HNdA" height="25" width="127"><img src="/img/logo-black.svg" alt="Apache Pulsar logo" class="themedImage_ToTc themedImage--dark_i4oU" height="25" width="127"></div><b class="navbar__title text--truncate"></b></a><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Get Started</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/docs/3.2.x/concepts-overview/">Concepts</a></li><li><a class="dropdown__link" href="/docs/3.2.x/">Quickstart</a></li><li><a class="dropdown__link" href="/ecosystem/">Ecosystem</a></li></ul></div><a class="navbar__item navbar__link" href="/docs/3.2.x/">Docs</a><a class="navbar__item navbar__link" href="/features/">Features</a><a class="navbar__item navbar__link" href="/use-cases/">Use Cases</a><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link community-dropdown">Community</a><ul class="dropdown__menu"><li><a class="dropdown__link scroll-link scroll-welcome" id="scroll-welcome" href="/community/">Welcome</a></li><li><a class="dropdown__link scroll-link scroll-discussions" id="scroll-discussions" href="/community/#section-discussions">Discussions</a></li><li><a class="dropdown__link scroll-link" id="scroll-governance" href="/community/#section-governance">Governance</a></li><li><a class="dropdown__link scroll-link" id="scroll-community" href="/community/#section-community">Meet the Community</a></li><li><a class="dropdown__link scroll-link" id="scroll-contribute" href="/community/#section-contribute">Contribute</a></li><li><a class="dropdown__link" href="/contribute/">Contribution Guide</a></li><li><a href="https://github.com/apache/pulsar/wiki" target="_blank" rel="noopener noreferrer" class="dropdown__link">Wiki</a></li><li><a href="https://github.com/apache/pulsar/issues" target="_blank" rel="noopener noreferrer" class="dropdown__link">Issue Tracking</a></li></ul></div><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Learn</a><ul class="dropdown__menu"><li><a aria-current="page" class="dropdown__link dropdown__link--active" href="/blog/">Blog</a></li><li><a class="dropdown__link" href="/books/">Books</a></li><li><a class="dropdown__link" href="/case-studies/">Case Studies</a></li><li><a class="dropdown__link" href="/articles/">Articles</a></li><li><a class="dropdown__link" href="/presentations/">Presentations</a></li><li><a class="dropdown__link" href="/events/">Events</a></li></ul></div></div><div class="navbar__items navbar__items--right"><a class="navbar__item navbar__link navbar_download_button" href="/download/">Download</a><div class="searchBox_ZlJk"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20" aria-hidden="true"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0"><div class="container margin-top--lg"><div class="row"><main class="col col--12" itemscope="" itemtype="https://schema.org/Blog"><article class="BlogContainerPost_N_n1" itemprop="blogPost" itemscope="" itemtype="https://schema.org/BlogPosting"><header><div><h1 class="title_xvU1" itemprop="headline">Apache Pulsar 2.6.1</h1><div class="row"><div class="col authorCol_q4o9"><div class="avatar"><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://twitter.com/wolf4j1" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">XiaoLong Ran</span></a></div></div></div></div></div><div class="container_iJTo"><time datetime="2020-08-21T00:00:00.000Z" itemprop="datePublished">August 21, 2020</time> ยท <!-- -->11 min read</div></div></header><div id="post-content" class="markdown" itemprop="articleBody"><p>We are excited to see that the Apache Pulsar community has successfully released 2.6.1 version after a lot of hard work. It is a great milestone for this fast-growing project and the Pulsar community. 2.6.1 is the result of a big effort from the community, with over 100 commits and a long list of improvements and bug fixes.</p><p>Here are some highlights and major features added in Pulsar 2.6.1.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="broker">Broker<a href="#broker" class="hash-link" aria-label="Direct link to Broker" title="Direct link to Broker">โ€‹</a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="limit-the-batch-size-to-the-minimum-of-the-maxnumberofmessages-and-maxsizeofmessages">Limit the batch size to the minimum of the <code>maxNumberOfMessages</code> and <code>maxSizeOfMessages</code><a href="#limit-the-batch-size-to-the-minimum-of-the-maxnumberofmessages-and-maxsizeofmessages" class="hash-link" aria-label="Direct link to limit-the-batch-size-to-the-minimum-of-the-maxnumberofmessages-and-maxsizeofmessages" title="Direct link to limit-the-batch-size-to-the-minimum-of-the-maxnumberofmessages-and-maxsizeofmessages">โ€‹</a></h3><ol><li><p>Batch size is not limited to the minimum of the <code>maxNumberOfMessages</code> and <code>maxSizeOfMessages</code> from the BatchReceive policy.</p></li><li><p>When the batch size is greater than the <code>receiveQ</code> of the consumer (for example, the batch size is 3000 and a receiveQ is 500), the following issue occurs:</p><p>In a multi-topic (pattern) consumer, the client stops receiving any messages. The client gets paused and never resumed when setting a timeout in the batch policy. Only one batch is fetched and the client is never resumed.</p></li></ol><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/6865" target="_blank" rel="noopener noreferrer">PR-6865</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fix-hash-range-conflict-issue-in-key_shared-subscription-with-sticky-hash-range">Fix hash range conflict issue in Key_Shared subscription with sticky hash range<a href="#fix-hash-range-conflict-issue-in-key_shared-subscription-with-sticky-hash-range" class="hash-link" aria-label="Direct link to Fix hash range conflict issue in Key_Shared subscription with sticky hash range" title="Direct link to Fix hash range conflict issue in Key_Shared subscription with sticky hash range">โ€‹</a></h3><p>In <code>Key_Shared</code> subscription where the <code>stickyHashRange</code> is used, consumers are not allowed to use interleaving hashes.</p><p>The pull request fixes the hash range conflict issue in <code>Key_Shared</code> with sticky hash range.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7231" target="_blank" rel="noopener noreferrer">PR-7231</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fix-get-lookup-permission-error">Fix get lookup permission error<a href="#fix-get-lookup-permission-error" class="hash-link" aria-label="Direct link to Fix get lookup permission error" title="Direct link to Fix get lookup permission error">โ€‹</a></h3><p>If the <code>canProduce</code> or <code>canConsume</code> method throws an exception, the <code>canLookup</code> method just throws the exception and does not check other permissions. The code snippet is as follows: </p><div class="language-java codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-java codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">try</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">canLookupAsync</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">topicName</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> role</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> authenticationData</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token function" style="color:rgb(80, 250, 123)">get</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">conf</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token function" style="color:rgb(80, 250, 123)">getZooKeeperOperationTimeoutSeconds</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token constant" style="color:rgb(189, 147, 249)">SECONDS</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>PR-7234 invokes <code>canLookupAsync</code>. When Pulsar AuthorizationService checks lookup permission, if the user has the <code>canProducer</code> or <code>canConsumer</code> role, the user performs <code>canLookup</code> operations.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7234" target="_blank" rel="noopener noreferrer">PR-7234</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="avoid-introducing-null-read-position-for-the-managed-cursor">Avoid introducing null read position for the managed cursor<a href="#avoid-introducing-null-read-position-for-the-managed-cursor" class="hash-link" aria-label="Direct link to Avoid introducing null read position for the managed cursor" title="Direct link to Avoid introducing null read position for the managed cursor">โ€‹</a></h3><p>Avoid introducing null read position for the managed cursor. The most doubtful thing is the <code>getNextValidPosition</code> method in the <code>ManagedLedgerImpl</code>. If a given position is greater than the position added last time, it returns a <code>null</code> value, and the read position is also <code>null</code>.</p><p>In this PR, we add a log and print the stack trace to find the root cause and fallback to the next position if the <code>null</code> occurs at the next valid position.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7264" target="_blank" rel="noopener noreferrer">PR-7264</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fix-error-in-creation-of-non-durable-cursor">Fix error in creation of non-durable cursor<a href="#fix-error-in-creation-of-non-durable-cursor" class="hash-link" aria-label="Direct link to Fix error in creation of non-durable cursor" title="Direct link to Fix error in creation of non-durable cursor">โ€‹</a></h3><p>An NPE occurs when we fail to create a non-durable cursor and continue to create the subscription instance. </p><div class="language-java codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-java codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">try</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> cursor </span><span class="token operator">=</span><span class="token plain"> ledger</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token function" style="color:rgb(80, 250, 123)">newNonDurableCursor</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">startPosition</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> subscriptionName</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">catch</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token class-name">ManagedLedgerException</span><span class="token plain"> e</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> subscriptionFuture</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token function" style="color:rgb(80, 250, 123)">completeExceptionally</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">e</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">new</span><span class="token plain"> </span><span class="token class-name">PersistentSubscription</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">this</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> subscriptionName</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> cursor</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token boolean">false</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Additionally, the NPE leads to the topic usage count increasing to 1. When deleting a topic, the topic cannot be deleted even if you use the force flag.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7355" target="_blank" rel="noopener noreferrer">PR-7355</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="avoid-an-npe-occurs-in-the-managedledgerimplisoffloadedneedsdelete-method">Avoid an NPE occurs in the <code>ManagedLedgerImpl.isOffloadedNeedsDelete</code> method<a href="#avoid-an-npe-occurs-in-the-managedledgerimplisoffloadedneedsdelete-method" class="hash-link" aria-label="Direct link to avoid-an-npe-occurs-in-the-managedledgerimplisoffloadedneedsdelete-method" title="Direct link to avoid-an-npe-occurs-in-the-managedledgerimplisoffloadedneedsdelete-method">โ€‹</a></h3><p>When the default value of the <code>offload-deletion-lag</code> is set to <code>null</code>, an NPE occurs. To fix the bug, null check is added in the <code>ManagedLedgerImpl.isOffloadedNeedsDelete</code> method.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7389" target="_blank" rel="noopener noreferrer">PR-7389</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fix-producer-stuck-issue-due-to-npe-when-creating-a-new-ledger">Fix producer stuck issue due to NPE when creating a new ledger<a href="#fix-producer-stuck-issue-due-to-npe-when-creating-a-new-ledger" class="hash-link" aria-label="Direct link to Fix producer stuck issue due to NPE when creating a new ledger" title="Direct link to Fix producer stuck issue due to NPE when creating a new ledger">โ€‹</a></h3><p>NPE occurs when creating a ledger if the network address is unresolvable. If NPE occurs before adding the timeout task, the timeout mechanism does not work. The unresolvable network address is common in the Kubernetes environment. It happens when a bookie pod or a worker node restarts.</p><p>This pull request fixes from the following perspectives:</p><ol><li>Catch the NPE when creating a new ledger.</li><li>When the timeout task is triggered, it always executes the callback. It is totally fine because we already have the logic to ensure the callback is triggered only once.</li><li>Add a mechanism to detect that the <code>CreatingLedger</code> state is not moving.</li></ol><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7401" target="_blank" rel="noopener noreferrer">PR-7401</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fix-npe-when-using-advertisedlisteners">Fix NPE when using advertisedListeners<a href="#fix-npe-when-using-advertisedlisteners" class="hash-link" aria-label="Direct link to Fix NPE when using advertisedListeners" title="Direct link to Fix NPE when using advertisedListeners">โ€‹</a></h3><p>The broker failed to acquire ownership for the namespace bundle when using <code>advertisedListeners=internal:pulsar://node1:6650,external:pulsar://node1.external:6650</code> with external listener name. Correct <code>BrokerServiceUrlTls</code> when TLS is not enabled.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7620" target="_blank" rel="noopener noreferrer">PR-7620</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fix-the-issue-that-the-deduplication-cursor-cannot-be-deleted-after-message-deduplication-is-disabled">Fix the issue that the deduplication cursor cannot be deleted after message deduplication is disabled<a href="#fix-the-issue-that-the-deduplication-cursor-cannot-be-deleted-after-message-deduplication-is-disabled" class="hash-link" aria-label="Direct link to Fix the issue that the deduplication cursor cannot be deleted after message deduplication is disabled" title="Direct link to Fix the issue that the deduplication cursor cannot be deleted after message deduplication is disabled">โ€‹</a></h3><p>When enabling the message deduplication in the <code>broker.conf</code> file, disabling it and then restarting the broker, the deduplication cursor is not deleted.</p><p>This PR fixes the issue, so when you disable message deduplication, you can delete the deduplication cursor.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7656" target="_blank" rel="noopener noreferrer">PR-7656</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fix-the-issue-that-getlastentry-reads-entry--1">Fix the issue that GetLastEntry() reads entry <code>-1</code><a href="#fix-the-issue-that-getlastentry-reads-entry--1" class="hash-link" aria-label="Direct link to fix-the-issue-that-getlastentry-reads-entry--1" title="Direct link to fix-the-issue-that-getlastentry-reads-entry--1">โ€‹</a></h3><p>Previously, the code does not include a return statement. If the entry is set to <code>-1</code>, after sending code, the response reads the entry and sends a second response, as shown in the following example.</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">16:34:25.779 [pulsar-io-54-7:org.apache.bookkeeper.client.LedgerHandle@748] ERROR org.apache.bookkeeper.client.LedgerHandle - IncorrectParameterException on ledgerId:0 firstEntry:-1 lastEntry:-1</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">16:34:25.779 [pulsar-client-io-82-1:org.apache.pulsar.client.impl.ConsumerImpl@1986] INFO org.apache.pulsar.client.impl.ConsumerImpl - [persistent://external-repl-prop/pulsar-function-admin/assignment][c-use-fw-localhost-0-function-assignment-initialize-reader-b21f7607c9] Successfully getLastMessageId 0:-1</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">16:34:25.779 [pulsar-client-io-82-1:org.apache.pulsar.client.impl.ClientCnx@602] WARN org.apache.pulsar.client.impl.ClientCnx - [id: 0xc78f4a0e, L:/127.0.0.1:55657 - R:localhost/127.0.0.1:55615] Received error from server: Failed to get batch size for entry org.apache.bookkeeper.mledger.ManagedLedgerException: Incorrect parameter input</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">16:34:25.779 [pulsar-client-io-82-1:org.apache.pulsar.client.impl.ClientCnx@612] WARN org.apache.pulsar.client.impl.ClientCnx - [id: 0xc78f4a0e, L:/127.0.0.1:55657 - R:localhost/127.0.0.1:55615] Received unknown request id from server: 10</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>PR-7495 adds a return statement to code, so GetLastEntry() reads the last entry, instead of <code>-1</code>. </p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7495" target="_blank" rel="noopener noreferrer">PR-7495</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fix-the-error-of-updating-partitions-for-non-persistent-topic">Fix the error of updating partitions for non-persistent topic<a href="#fix-the-error-of-updating-partitions-for-non-persistent-topic" class="hash-link" aria-label="Direct link to Fix the error of updating partitions for non-persistent topic" title="Direct link to Fix the error of updating partitions for non-persistent topic">โ€‹</a></h3><p>When updating partitions on a non-persistent topic, Error 409 is returned. The pull request fixes partitions errors for non-persistent topics.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7459" target="_blank" rel="noopener noreferrer">PR-7459</a>.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="zookeeper">ZooKeeper<a href="#zookeeper" class="hash-link" aria-label="Direct link to ZooKeeper" title="Direct link to ZooKeeper">โ€‹</a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="use-hostname-for-bookie-rack-awareness-mapping">Use hostname for bookie rack awareness mapping<a href="#use-hostname-for-bookie-rack-awareness-mapping" class="hash-link" aria-label="Direct link to Use hostname for bookie rack awareness mapping" title="Direct link to Use hostname for bookie rack awareness mapping">โ€‹</a></h3><p>In <a href="https://github.com/apache/pulsar/pull/5607" target="_blank" rel="noopener noreferrer">PR-5607</a>, the <code>useHostName()</code> is added with <code>return false</code>. The rack-aware policy passes the Bookie&#x27;s hostname into an IP address and then uses that IP address to figure out to which rack the bookie belongs.</p><p>Then two issues occur: </p><ol><li>The IP does not match the hostname which is recorded in the <code>/bookies</code> z-node</li><li>If there is an error in parsing the bookie hostname (eg: transient DNS error), an NPE is triggered and the BK client never realizes that this bookie is available in the cluster.</li></ol><p>The exception is thrown at Line 77(as shown in the following code snippet), since <code>getAddress()</code> returns a <code>null</code> given that the address is parsed. </p><div class="language-java codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-java codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token number">74</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">dnsResolver</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token function" style="color:rgb(80, 250, 123)">useHostName</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token number">75</span><span class="token plain"> names</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token function" style="color:rgb(80, 250, 123)">add</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">addr</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token function" style="color:rgb(80, 250, 123)">getHostName</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token number">76</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">else</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token number">77</span><span class="token plain"> names</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token function" style="color:rgb(80, 250, 123)">add</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">addr</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token function" style="color:rgb(80, 250, 123)">getAddress</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token function" style="color:rgb(80, 250, 123)">getHostAddress</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token number">78</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>The default implementation for the <code>DnsResolver.useHostName()</code> returns <code>true</code>.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7361" target="_blank" rel="noopener noreferrer">PR-7361</a>.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="java-client">Java Client<a href="#java-client" class="hash-link" aria-label="Direct link to Java Client" title="Direct link to Java Client">โ€‹</a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fix-the-issue-that-the-http-header-used-in-athenz-authentication-can-not-be-renamed">Fix the issue that the HTTP header used in Athenz authentication can not be renamed<a href="#fix-the-issue-that-the-http-header-used-in-athenz-authentication-can-not-be-renamed" class="hash-link" aria-label="Direct link to Fix the issue that the HTTP header used in Athenz authentication can not be renamed" title="Direct link to Fix the issue that the HTTP header used in Athenz authentication can not be renamed">โ€‹</a></h3><p>The authentication plugin for Athenz allows users to change the name of the HTTP header for sending an authentication token to a broker server with a parameter named <code>roleHeader</code>. The change uses the value of the <code>roleHeader</code> parameter on the <code>AuthenticationAthenz</code> side, and uses it directly as the header name.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7311" target="_blank" rel="noopener noreferrer">PR-7311</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fix-the-issue-that-batch-ack-set-is-recycled-multiple-times">Fix the issue that batch ack set is recycled multiple times<a href="#fix-the-issue-that-batch-ack-set-is-recycled-multiple-times" class="hash-link" aria-label="Direct link to Fix the issue that batch ack set is recycled multiple times" title="Direct link to Fix the issue that batch ack set is recycled multiple times">โ€‹</a></h3><p>The batch ack sets are recycled multiple times, due to race condition in group ack flush and cumulative Ack. So we add a recycled state check for the ack set in PR-7409, and fix the recycle issue.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7409" target="_blank" rel="noopener noreferrer">PR-7409</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="add-authentication-client-with-oauth2-support">Add authentication client with OAuth2 support<a href="#add-authentication-client-with-oauth2-support" class="hash-link" aria-label="Direct link to Add authentication client with OAuth2 support" title="Direct link to Add authentication client with OAuth2 support">โ€‹</a></h3><p>Pulsar supports authenticating clients using OAuth 2.0 access tokens. You can use tokens to identify a Pulsar client and associate with some &quot;principal&quot; (or &quot;role&quot;) that is permitted to do some actions, for example, publish messages to a topic or consume messages from a topic. </p><p>This module is to support Pulsar Client Authentication Plugin for OAuth 2.0 directly. The client communicates with the Oauth 2.0 server, gets an <code>access token</code> from the Oauth 2.0 server, and passes the <code>access token</code> to Pulsar broker to do the authentication.</p><p>So, the broker can use <code>org.apache.pulsar.broker.authentication.AuthenticationProviderToken</code>,
and the user can add their own <code>AuthenticationProvider</code> to work with this module.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7420" target="_blank" rel="noopener noreferrer">PR-7420</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="not-subscribe-to-the-topic-when-the-consumer-is-closed">Not subscribe to the topic when the consumer is closed<a href="#not-subscribe-to-the-topic-when-the-consumer-is-closed" class="hash-link" aria-label="Direct link to Not subscribe to the topic when the consumer is closed" title="Direct link to Not subscribe to the topic when the consumer is closed">โ€‹</a></h3><p>Fix race condition on the closed consumer while reconnecting to the broker.</p><p>The race condition happens when the consumer reconnects to the broker. The connection of the consumer is set to <code>null</code> when the consumer reconnects to the broker. If the consumer is not connected to broker at this time, the client does not send the consumer command to the broker. So, when the consumer reconnects to the broker, the consumer sends the subscribe command again. </p><p>This pull request adds a state check when the <code>connectionOpened()</code> of the consumer opens. If the consumer is in closing or closed state, the consumer does not send the subscribe command.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7589" target="_blank" rel="noopener noreferrer">PR-7589</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="oauth2-authentication-plugin-uses-asynchttpclient">OAuth2 authentication plugin uses AsyncHttpClient<a href="#oauth2-authentication-plugin-uses-asynchttpclient" class="hash-link" aria-label="Direct link to OAuth2 authentication plugin uses AsyncHttpClient" title="Direct link to OAuth2 authentication plugin uses AsyncHttpClient">โ€‹</a></h3><p>Previously, the OAuth2 client authentication plugin used Apache HTTP client lib to make requests, Apache HTTP client is used to validate hostname. As suggested in <a href="https://github.com/apache/pulsar/issues/7612" target="_blank" rel="noopener noreferrer">#7612</a>, we get rid of the dependency of using Apache HTTP client.</p><p>In PR-7615, OAuth2 client authentication plugin uses AsyncHttpClient, which is used in client and broker. For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7615" target="_blank" rel="noopener noreferrer">PR-7615</a>.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="cpp-client">CPP Client<a href="#cpp-client" class="hash-link" aria-label="Direct link to CPP Client" title="Direct link to CPP Client">โ€‹</a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="cpp-oauth2-authentication-client">CPP Oauth2 authentication client<a href="#cpp-oauth2-authentication-client" class="hash-link" aria-label="Direct link to CPP Oauth2 authentication client" title="Direct link to CPP Oauth2 authentication client">โ€‹</a></h3><p>Pulsar supports authenticating clients using OAuth 2.0 access tokens. You can use tokens to identify a Pulsar client and associate with some &quot;principal&quot; (or &quot;role&quot;) that is permitted to do some actions (eg: publish messages to a topic or consume messages from a topic). This change tries to support it in cpp client.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7467" target="_blank" rel="noopener noreferrer">PR-7467</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fix-partition-index-error-in-close-callback">Fix partition index error in close callback<a href="#fix-partition-index-error-in-close-callback" class="hash-link" aria-label="Direct link to Fix partition index error in close callback" title="Direct link to Fix partition index error in close callback">โ€‹</a></h3><p>In partitioned producer/consumer&#x27;s close callback, the partition index is always <code>0</code>. The <code>ProducerImpl/ConsumerImpl</code> internal partition index field should be passed to <code>PartitionedProducerImpl/PartitionedConsumerImpl</code> close callback.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7282" target="_blank" rel="noopener noreferrer">PR-7282</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fix-segment-crashes-caused-by-race-condition-of-timer-in-cpp-client">Fix segment crashes caused by race condition of timer in CPP client<a href="#fix-segment-crashes-caused-by-race-condition-of-timer-in-cpp-client" class="hash-link" aria-label="Direct link to Fix segment crashes caused by race condition of timer in CPP client" title="Direct link to Fix segment crashes caused by race condition of timer in CPP client">โ€‹</a></h3><p>Segment crashes occur in a race condition:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">- The close operation calls the `keepAliveTimer_.reset()`.</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">- The `keepAliveTimer` is called by `startConsumerStatsTimer` and `handleKeepAliveTimeout` methods. Actually, the `keepAliveTimer` should not be called by those two methods.</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>This pull request fixes those issues.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7572" target="_blank" rel="noopener noreferrer">PR-7572</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="add-support-to-read-credentials-from-file">Add support to read credentials from file<a href="#add-support-to-read-credentials-from-file" class="hash-link" aria-label="Direct link to Add support to read credentials from file" title="Direct link to Add support to read credentials from file">โ€‹</a></h3><p>Support reading credentials from a file to make it align with the Java client.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7606" target="_blank" rel="noopener noreferrer">PR-7606</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fix-multi-topic-consumer-segfault-on-connection-error">Fix multi-topic consumer segfault on connection error<a href="#fix-multi-topic-consumer-segfault-on-connection-error" class="hash-link" aria-label="Direct link to Fix multi-topic consumer segfault on connection error" title="Direct link to Fix multi-topic consumer segfault on connection error">โ€‹</a></h3><p>The multi-topic consumer triggers a segfault when an error occurs in creating a consumer. This is due to the calls to close the partial consumers with a null callback.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7588" target="_blank" rel="noopener noreferrer">PR-7588</a>.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="functions">Functions<a href="#functions" class="hash-link" aria-label="Direct link to Functions" title="Direct link to Functions">โ€‹</a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="use-fully-qualified-hostname-as-default-to-advertise-worker">Use fully qualified hostname as default to advertise worker<a href="#use-fully-qualified-hostname-as-default-to-advertise-worker" class="hash-link" aria-label="Direct link to Use fully qualified hostname as default to advertise worker" title="Direct link to Use fully qualified hostname as default to advertise worker">โ€‹</a></h3><p>There is a difference in getting hostnames between <code>Java 8</code> and <code>Java 11</code>. In Java 8, <code>InetAddress.getLocalHost().getHostName()</code> returns the fully qualified hostname; in Java 11, it returns a simple hostname. In this case, we should rather use the <code>getCanonicalHostName()</code>, which returns the fully qualified hostname. This is the same method to get the advertised address for workers as well.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7360" target="_blank" rel="noopener noreferrer">PR-7360</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fix-the-function-bc-issue-introduced-in-release-260">Fix the function BC issue introduced in release 2.6.0<a href="#fix-the-function-bc-issue-introduced-in-release-260" class="hash-link" aria-label="Direct link to Fix the function BC issue introduced in release 2.6.0" title="Direct link to Fix the function BC issue introduced in release 2.6.0">โ€‹</a></h3><p>A backwards compatibility breakage is introduced in <a href="https://github.com/apache/pulsar/pull/5985" target="_blank" rel="noopener noreferrer">PR-5985</a>. When the running function workers are separated from brokers, updating workers and brokers independently from release 2.5.0 to 2.6.0 results in the following error:</p><div class="language-text codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">java.lang.NullPointerException: null\n\tat java.net.URI$Parser.parse(URI.java:3104) ~[?:?]</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">java.net.URI.&lt;init&gt;(URI.java:600) ~[?:?]\n\tat java.net.URI.create(URI.java:881) ~[?:?]</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">org.apache.pulsar.functions.worker.WorkerUtils.initializeDlogNamespace(WorkerUtils.java:160) ~[org.apache.pulsar-pulsar-functions-worker-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">org.apache.pulsar.functions.worker.Worker.initialize(Worker.java:155) ~[org.apache.pulsar-pulsar-functions-worker-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT] </span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">org.apache.pulsar.functions.worker.Worker.start(Worker.java:69) ~[org.apache.pulsar-pulsar-functions-worker-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT] </span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">org.apache.pulsar.functions.worker.FunctionWorkerStarter.main(FunctionWorkerStarter.java:67) [org.apache.pulsar-pulsar-functions-worker-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>This is because the broker 2.5.0 supports &quot;bookkeeperMetadataServiceUri&quot; and the admin client returns a <code>null</code> field, thus causing the NPE.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7528" target="_blank" rel="noopener noreferrer">PR-7528</a>.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="pulsar-perf">pulsar-perf<a href="#pulsar-perf" class="hash-link" aria-label="Direct link to pulsar-perf" title="Direct link to pulsar-perf">โ€‹</a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="support-tlsallowinsecureconnection-in-pulsar-perf-produceconsumeread-performance-tests">Support <code>tlsAllowInsecureConnection</code> in pulsar-perf produce/consume/read performance tests<a href="#support-tlsallowinsecureconnection-in-pulsar-perf-produceconsumeread-performance-tests" class="hash-link" aria-label="Direct link to support-tlsallowinsecureconnection-in-pulsar-perf-produceconsumeread-performance-tests" title="Direct link to support-tlsallowinsecureconnection-in-pulsar-perf-produceconsumeread-performance-tests">โ€‹</a></h3><p>Add <code>tlsAllowInsecureConnection</code> config to the CLI tool <strong>pulsar-perf</strong>, to support produce/consume/read performance tests to clusters with insecure TLS connections.</p><p>For more information about implementation, see <a href="https://github.com/apache/pulsar/pull/7300" target="_blank" rel="noopener noreferrer">PR-7300</a>.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="more-information">More information<a href="#more-information" class="hash-link" aria-label="Direct link to More information" title="Direct link to More information">โ€‹</a></h2><ul><li>To download Apache Pulsar 2.6.1, click <a href="https://pulsar.apache.org/download/" target="_blank" rel="noopener noreferrer">download</a>.</li><li>For more information about Apache Pulsar 2.6.1, see <a href="https://pulsar.apache.org/release-notes/#2.6.1" target="_blank" rel="noopener noreferrer">2.6.1 release notes</a> and <a href="https://github.com/apache/pulsar/pulls?q=is%3Apr+label%3Arelease%2F2.6.1+is%3Aclosed" target="_blank" rel="noopener noreferrer">2.6.1 PR list</a>.</li></ul><p>If you have any questions or suggestions, contact us with mailing lists or slack.</p><ul><li><a href="mailto:users@pulsar.apache.org" target="_blank" rel="noopener noreferrer">users@pulsar.apache.org</a></li><li><a href="mailto:dev@pulsar.apache.org" target="_blank" rel="noopener noreferrer">dev@pulsar.apache.org</a></li><li>Pulsar slack channel: <a href="https://apache-pulsar.slack.com/" target="_blank" rel="noopener noreferrer">https://apache-pulsar.slack.com/</a></li><li>Self-registration at <a href="https://apache-pulsar.herokuapp.com/" target="_blank" rel="noopener noreferrer">https://apache-pulsar.herokuapp.com/</a></li></ul><p>Looking forward to your contributions to <a href="https://github.com/apache/pulsar" target="_blank" rel="noopener noreferrer">Pulsar</a>.</p></div><footer class="row docusaurus-mt-lg blogPostFooterDetailsFull_Wr5y"><div class="col margin-top--sm"><a href="https://github.com/apache/pulsar-site/edit/main/blog/2020-08-21-Apache-Pulsar-2-6-1.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div></footer></article><nav class="pagination-nav blog-post-pagination-nav docusaurus-mt-lg" aria-label="Blog post page navigation"><div><a class="pagination-nav__link pagination-nav__link--prev" href="/blog/2020/08/24/Pulsar-300-contributors/"><div class="pagination-nav__sublabel">Newer Post</div><div class="pagination-nav__label">Apache Pulsar Celebrates 300 Contributors</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/blog/2020/06/18/Apache-Pulsar-2-6-0/"><div class="pagination-nav__sublabel">Older Post</div><div class="pagination-nav__label">Apache Pulsar 2.6.0</div></a><div class="blog-post-pagination-nav-more"><a href="/blog">Show All</a></div></div></nav></main></div></div></div><footer class="footer"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title"></div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://www.apache.org/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Foundation<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://www.apache.org/events/current-event.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Events<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title"></div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://www.apache.org/licenses/" target="_blank" rel="noopener noreferrer" class="footer__link-item">License<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://www.apache.org/foundation/thanks" target="_blank" rel="noopener noreferrer" class="footer__link-item">Thanks<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://www.apache.org/foundation/sponsorship" target="_blank" rel="noopener noreferrer" class="footer__link-item">Sponsorship<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title"></div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/security/">Security</a></li><li class="footer__item"><a href="https://www.apache.org/foundation/policies/privacy.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Privacy<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a class="footer__link-item" href="/contact/">Contact</a></li></ul></div><div class="col footer__col"><div class="footer__title"></div><ul class="footer__items clean-list"><li class="footer__item">
<div class="social-icons">
<a target="_blank" href="https://communityinviter.com/apps/apache-pulsar/apache-pulsar" aria-label="Join the Apache Pulsar Slack workspace">
<img alt="Slack logo" src="/img/slack-white.svg" width="26">
</a>
<a target="_blank" href="https://github.com/apache/pulsar/" aria-label="View the Apache Pulsar project on GitHub">
<img alt="GitHub logo" src="/img/github-white.svg" width="26">
</a>
</div>
</li></ul></div></div><div class="footer__bottom text--center"><div class="margin-bottom--sm"><a class="footerLogoLink_BH7S" href="/"><img src="/img/pulsar-white.svg" alt="Pulsar Logo" class="themedImage_ToTc themedImage--light_HNdA footer__logo"><img src="/img/pulsar-white.svg" alt="Pulsar Logo" class="themedImage_ToTc themedImage--dark_i4oU footer__logo"></a></div><div class="footer__copyright">
<div>
<img class="footer-apache-logo" src="/img/feather-logo-white.svg" alt="" width="20">
The Apache Software Foundation
</div>
<p>Apache Pulsar is available under the Apache License, version 2.0. Apache Pulsar is an open-source, distributed messaging and streaming platform built for the cloud.</p>
<p>Copyright ยฉ 2024 The Apache Software Foundation. All Rights Reserved. Apache, Pulsar, Apache Pulsar, and the Apache feather logo are trademarks or registered trademarks of The Apache Software Foundation.</p>
</div></div></div></footer></div>
<script src="/assets/js/runtime~main.1d0ed2a7.js"></script>
<script src="/assets/js/main.e07a0c68.js"></script>
</body>
</html>