blob: 1f5e3e01aa968184a622182f0dc1ab1c2385e077 [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.8.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/2021/09/23/Apache-Pulsar-2-8-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.8.1 | Apache Pulsar"><meta data-rh="true" name="description" content="The Apache Pulsar community releases version 2.8.1! 49 contributors provided improvements and bug fixes that delivered 213 commits."><meta data-rh="true" property="og:description" content="The Apache Pulsar community releases version 2.8.1! 49 contributors provided improvements and bug fixes that delivered 213 commits."><meta data-rh="true" property="og:type" content="article"><meta data-rh="true" property="article:published_time" content="2021-09-23T00:00:00.000Z"><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://pulsar.apache.org/blog/2021/09/23/Apache-Pulsar-2-8-1/"><link data-rh="true" rel="alternate" href="https://pulsar.apache.org/blog/2021/09/23/Apache-Pulsar-2-8-1/" hreflang="en"><link data-rh="true" rel="alternate" href="https://pulsar.apache.org/blog/2021/09/23/Apache-Pulsar-2-8-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.8.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"><span itemprop="name">Hang Chen, Anonymitaet</span></div></div></div></div></div><div class="container_iJTo"><time datetime="2021-09-23T00:00:00.000Z" itemprop="datePublished">September 23, 2021</time> Β· <!-- -->6 min read</div></div></header><div id="post-content" class="markdown" itemprop="articleBody"><p>The Apache Pulsar community releases version 2.8.1! 49 contributors provided improvements and bug fixes that delivered 213 commits.</p><p>Highlights of this release are as below:</p><ul><li><p>Key-shared subscriptions no longer stop dispatching to consumers when repeatedly opening and closing consumers. <a href="https://github.com/apache/pulsar/pull/10920" target="_blank" rel="noopener noreferrer">PR-10920</a></p></li><li><p>System topic no longer has potential data loss when not configured for compaction. <a href="https://github.com/apache/pulsar/pull/11003" target="_blank" rel="noopener noreferrer">PR-11003</a></p></li><li><p>Consumers are not allowed to read data on topics to which they are not subscribed. <a href="https://github.com/apache/pulsar/pull/11912" target="_blank" rel="noopener noreferrer">PR-11912</a></p></li></ul><p>This blog walks through the most noteworthy changes grouped by component. For the complete list including all features, enhancements, and bug fixes, check out the <a href="https://pulsar.apache.org/release-notes/#281-mdash-2021-09-10-a-id281a" target="_blank" rel="noopener noreferrer">Pulsar 2.8.1 Release Notes</a>.</p><h1>Notable bug fixes and enhancements</h1><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="precise-publish-rate-limit-takes-effect-as-expected-pr-11446">Precise publish rate limit takes effect as expected. <a href="https://github.com/apache/pulsar/pull/11446" target="_blank" rel="noopener noreferrer">PR-11446</a><a href="#precise-publish-rate-limit-takes-effect-as-expected-pr-11446" class="hash-link" aria-label="Direct link to precise-publish-rate-limit-takes-effect-as-expected-pr-11446" title="Direct link to precise-publish-rate-limit-takes-effect-as-expected-pr-11446">​</a></h3><p><strong>Issue</strong>: Previously, when setting precise publish rate limits on topics, it did not work.</p><p><strong>Resolution</strong>: Implemented a new <code>RateLimiter</code> using the <code>LeakingBucket</code> and <code>FixedWindow</code> algorithms.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="messages-with-the-same-keys-are-delivered-to-the-correct-consumers-on-key-shared-subscriptions-pr-10762">Messages with the same keys are delivered to the correct consumers on Key-Shared subscriptions. <a href="https://github.com/apache/pulsar/pull/10762" target="_blank" rel="noopener noreferrer">PR-10762</a><a href="#messages-with-the-same-keys-are-delivered-to-the-correct-consumers-on-key-shared-subscriptions-pr-10762" class="hash-link" aria-label="Direct link to messages-with-the-same-keys-are-delivered-to-the-correct-consumers-on-key-shared-subscriptions-pr-10762" title="Direct link to messages-with-the-same-keys-are-delivered-to-the-correct-consumers-on-key-shared-subscriptions-pr-10762">​</a></h3><p><strong>Issue</strong>: Messages with the same keys were out of order when message redelivery occurred on a Key-Shared subscription.</p><p><strong>Resolution</strong>: When sending a message to <code>messagesToRedeliver</code>, the broker saved the hash value of the key. If the dispatcher attempted to send newer messages to the consumer that had a key corresponding to any one of the saved hash values, they were added to <code>messagesToRedeliver</code> instead of being sent. This prevented messages with the same key from being out of order.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="active-producers-with-the-same-name-are-no-longer-removed-from-the-topic-map-pr-11804">Active producers with the same name are no longer removed from the topic map. <a href="https://github.com/apache/pulsar/pull/11804" target="_blank" rel="noopener noreferrer">PR-11804</a><a href="#active-producers-with-the-same-name-are-no-longer-removed-from-the-topic-map-pr-11804" class="hash-link" aria-label="Direct link to active-producers-with-the-same-name-are-no-longer-removed-from-the-topic-map-pr-11804" title="Direct link to active-producers-with-the-same-name-are-no-longer-removed-from-the-topic-map-pr-11804">​</a></h3><p><strong>Issue</strong>: Previously, when there were producers with the same name, an error would be triggered and the old producer would be removed even though it was still writing to a topic.</p><p><strong>Resolution</strong>: Validated producers based on a connection ID (local &amp; remote addresses and unique ID) and a producer ID within that connection rather than a producer name.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="topics-in-a-fenced-state-can-recover-when-producers-continue-to-reconnect-to-brokers-pr-11737">Topics in a fenced state can recover when producers continue to reconnect to brokers. <a href="https://github.com/apache/pulsar/pull/11737" target="_blank" rel="noopener noreferrer">PR-11737</a><a href="#topics-in-a-fenced-state-can-recover-when-producers-continue-to-reconnect-to-brokers-pr-11737" class="hash-link" aria-label="Direct link to topics-in-a-fenced-state-can-recover-when-producers-continue-to-reconnect-to-brokers-pr-11737" title="Direct link to topics-in-a-fenced-state-can-recover-when-producers-continue-to-reconnect-to-brokers-pr-11737">​</a></h3><p><strong>Issue</strong>: Previously, when a producer continued to reconnect to a broker, the fenced state of the topic was always set to true, which caused the topic to be unable to recover.</p><p><strong>Resolution</strong>: Add an entry to <code>ManagedLedgerException</code> when the polled operation is not equal to the current operation.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="topic-properly-initializes-the-cursor-to-prevent-data-loss-pr-11547">Topic properly initializes the cursor to prevent data loss. <a href="https://github.com/apache/pulsar/pull/11547" target="_blank" rel="noopener noreferrer">PR-11547</a><a href="#topic-properly-initializes-the-cursor-to-prevent-data-loss-pr-11547" class="hash-link" aria-label="Direct link to topic-properly-initializes-the-cursor-to-prevent-data-loss-pr-11547" title="Direct link to topic-properly-initializes-the-cursor-to-prevent-data-loss-pr-11547">​</a></h3><p><strong>Issue</strong>: Previously, when subscribing to a topic with the earliest position, data would be lost because <code>ManagedLedger</code> used a wrong position to initialize a cursor.</p><p><strong>Resolution</strong>: Added a test to check a cursor&#x27;s position when subscribing to a topic with the earliest position.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="deadlock-no-longer-occurs-when-using-hasmessageavailableasync-and-readnextasync-pr-11183">Deadlock no longer occurs when using <code>hasMessageAvailableAsync</code> and <code>readNextAsync</code>. <a href="https://github.com/apache/pulsar/pull/11183" target="_blank" rel="noopener noreferrer">PR-11183</a><a href="#deadlock-no-longer-occurs-when-using-hasmessageavailableasync-and-readnextasync-pr-11183" class="hash-link" aria-label="Direct link to deadlock-no-longer-occurs-when-using-hasmessageavailableasync-and-readnextasync-pr-11183" title="Direct link to deadlock-no-longer-occurs-when-using-hasmessageavailableasync-and-readnextasync-pr-11183">​</a></h3><p><strong>Issue</strong>: Previously, when messages were added to an incoming queue, a deadlock might occur. The deadlock might happen in two possible scenarios. First, if the message was added to the queue before the message was read. Second, if <code>readNextAsync</code> was completed before <code>future.whenComplete</code> was called.</p><p><strong>Resolution</strong>: Used an internal thread to process the callback of <code>hasMessageAvailableAsync</code>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="memory-leak-does-not-occur-when-calling-getlastmessageid-api-pr-10977">Memory leak does not occur when calling getLastMessageId API. <a href="https://github.com/apache/pulsar/pull/10977" target="_blank" rel="noopener noreferrer">PR-10977</a><a href="#memory-leak-does-not-occur-when-calling-getlastmessageid-api-pr-10977" class="hash-link" aria-label="Direct link to memory-leak-does-not-occur-when-calling-getlastmessageid-api-pr-10977" title="Direct link to memory-leak-does-not-occur-when-calling-getlastmessageid-api-pr-10977">​</a></h3><p><strong>Issue</strong>: Previously, the broker ran out of memory when calling the <code>getLastMessageId</code> API.</p><p><strong>Resolution</strong>: Added the <code>entry.release()</code> call to the <code>PersistentTopic.getLastMessageId</code>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="compaction-is-triggered-for-system-topics-pr-10941">Compaction is triggered for system topics. <a href="https://github.com/apache/pulsar/pull/10941" target="_blank" rel="noopener noreferrer">PR-10941</a><a href="#compaction-is-triggered-for-system-topics-pr-10941" class="hash-link" aria-label="Direct link to compaction-is-triggered-for-system-topics-pr-10941" title="Direct link to compaction-is-triggered-for-system-topics-pr-10941">​</a></h3><p><strong>Issue</strong>: Previously, when a topic had only non-durable subscriptions, the compaction was not triggered because it had 0 estimated backlog size. </p><p><strong>Resolution</strong>: Used the total backlog size to trigger the compaction. Changed the behavior in the case of no durable subscriptions to use the total backlog size</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="key-shared-subscriptions-no-longer-stop-dispatching-to-consumers-when-repeatedly-opening-and-closing-consumers-pr-10920">Key-shared subscriptions no longer stop dispatching to consumers when repeatedly opening and closing consumers. <a href="https://github.com/apache/pulsar/pull/10920" target="_blank" rel="noopener noreferrer">PR-10920</a><a href="#key-shared-subscriptions-no-longer-stop-dispatching-to-consumers-when-repeatedly-opening-and-closing-consumers-pr-10920" class="hash-link" aria-label="Direct link to key-shared-subscriptions-no-longer-stop-dispatching-to-consumers-when-repeatedly-opening-and-closing-consumers-pr-10920" title="Direct link to key-shared-subscriptions-no-longer-stop-dispatching-to-consumers-when-repeatedly-opening-and-closing-consumers-pr-10920">​</a></h3><p><strong>Issue</strong>: Repeatedly opening and closing consumers with a Key-Shared subscription might occasionally stop dispatching messages to all consumers.</p><p><strong>Resolution</strong>: Moved the mark-delete position and removed the consumer from the selector before calling <code>removeConsumer()</code>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="consumers-are-not-allowed-to-read-data-on-topics-to-which-they-are-not-subscribed-pr-11912">Consumers are not allowed to read data on topics to which they are not subscribed. <a href="https://github.com/apache/pulsar/pull/11912" target="_blank" rel="noopener noreferrer">PR-11912</a><a href="#consumers-are-not-allowed-to-read-data-on-topics-to-which-they-are-not-subscribed-pr-11912" class="hash-link" aria-label="Direct link to consumers-are-not-allowed-to-read-data-on-topics-to-which-they-are-not-subscribed-pr-11912" title="Direct link to consumers-are-not-allowed-to-read-data-on-topics-to-which-they-are-not-subscribed-pr-11912">​</a></h3><p><strong>Issue</strong>: Previously, the request ledger was not checked whether it belonged to a consumer’s connected topic, which allowed the consumer to read data that does not belong to the connected topic.</p><p><strong>Resolution</strong>: Added a check on the <code>ManagedLedger</code> level before executing read operations. </p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="topic-policy">Topic Policy<a href="#topic-policy" class="hash-link" aria-label="Direct link to Topic Policy" title="Direct link to Topic Policy">​</a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="retention-policy-works-as-expected-pr-11021">Retention policy works as expected. <a href="https://github.com/apache/pulsar/pull/11021" target="_blank" rel="noopener noreferrer">PR-11021</a><a href="#retention-policy-works-as-expected-pr-11021" class="hash-link" aria-label="Direct link to retention-policy-works-as-expected-pr-11021" title="Direct link to retention-policy-works-as-expected-pr-11021">​</a></h3><p><strong>Issue</strong>: Previously, the retention policy did not work because it was not set in the <code>managedLedger</code> configuration.</p><p><strong>Resolution</strong>: Set the retention policy in the <code>managedLedger</code> configuration to the <code>onUpdate</code> listener method.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="system-topic-no-longer-has-potential-data-loss-when-not-configured-for-compaction-pr-11003">System topic no longer has potential data loss when not configured for compaction. <a href="https://github.com/apache/pulsar/pull/11003" target="_blank" rel="noopener noreferrer">PR-11003</a><a href="#system-topic-no-longer-has-potential-data-loss-when-not-configured-for-compaction-pr-11003" class="hash-link" aria-label="Direct link to system-topic-no-longer-has-potential-data-loss-when-not-configured-for-compaction-pr-11003" title="Direct link to system-topic-no-longer-has-potential-data-loss-when-not-configured-for-compaction-pr-11003">​</a></h3><p><strong>Issue</strong>: Previously, data might be lost if there were no durable subscriptions on topics.</p><p><strong>Resolution</strong>: Leveraged the topic compaction cursor to retain data.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="proxy">Proxy<a href="#proxy" class="hash-link" aria-label="Direct link to Proxy" title="Direct link to Proxy">​</a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="pulsar-proxy-correctly-shuts-down-outbound-connections-pr-11848">Pulsar proxy correctly shuts down outbound connections. <a href="https://github.com/apache/pulsar/pull/11848" target="_blank" rel="noopener noreferrer">PR-11848</a><a href="#pulsar-proxy-correctly-shuts-down-outbound-connections-pr-11848" class="hash-link" aria-label="Direct link to pulsar-proxy-correctly-shuts-down-outbound-connections-pr-11848" title="Direct link to pulsar-proxy-correctly-shuts-down-outbound-connections-pr-11848">​</a></h3><p><strong>Issue</strong>: Previously, there was a memory leak of outgoing TCP connections in the Pulsar proxy because the <code>ProxyConnectionPool</code> instances were created outside the <code>PulsarClientImpl</code> instance and not closed when the client was closed.</p><p><strong>Resolution</strong>: Shut down the <code>ConnectionPool</code> correctly.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="function">Function<a href="#function" class="hash-link" aria-label="Direct link to Function" title="Direct link to Function">​</a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="pulsar-functions-support-protobuf-schema-pr-11709">Pulsar Functions support Protobuf schema. <a href="https://github.com/apache/pulsar/pull/11709" target="_blank" rel="noopener noreferrer">PR-11709</a><a href="#pulsar-functions-support-protobuf-schema-pr-11709" class="hash-link" aria-label="Direct link to pulsar-functions-support-protobuf-schema-pr-11709" title="Direct link to pulsar-functions-support-protobuf-schema-pr-11709">​</a></h3><p><strong>Issue</strong>: Previously, the exception <code>GeneratedMessageV3 is not assignable</code> was thrown when using a Protobuf schema.</p><p><strong>Resolution</strong>: Added the relevant dependencies to the Pulsar instance.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="client">Client<a href="#client" class="hash-link" aria-label="Direct link to Client" title="Direct link to Client">​</a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="partitioned-topic-consumers-clean-up-resources-after-a-failure-pr-11754">Partitioned-topic consumers clean up resources after a failure. <a href="https://github.com/apache/pulsar/pull/11754" target="_blank" rel="noopener noreferrer">PR-11754</a><a href="#partitioned-topic-consumers-clean-up-resources-after-a-failure-pr-11754" class="hash-link" aria-label="Direct link to partitioned-topic-consumers-clean-up-resources-after-a-failure-pr-11754" title="Direct link to partitioned-topic-consumers-clean-up-resources-after-a-failure-pr-11754">​</a></h3><p><strong>Issue</strong>: Previously, partitioned-topic consumers did not clean up the resources when failing to create consumers. If this failure occurred with non-recoverable errors, it triggered a memory leak, which made applications unstable.</p><p><strong>Resolution</strong>: Closed and cleaned timer task references.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="race-conditions-do-not-occur-on-multi-topic-consumers-pr-11764">Race conditions do not occur on multi-topic consumers. <a href="https://github.com/apache/pulsar/pull/11764" target="_blank" rel="noopener noreferrer">PR-11764</a><a href="#race-conditions-do-not-occur-on-multi-topic-consumers-pr-11764" class="hash-link" aria-label="Direct link to race-conditions-do-not-occur-on-multi-topic-consumers-pr-11764" title="Direct link to race-conditions-do-not-occur-on-multi-topic-consumers-pr-11764">​</a></h3><p><strong>Issue</strong>: Previously, there was a race condition between 2 threads when one of the individual consumers was in a &quot;paused&quot; state and the shared queue was full. </p><p><strong>Resolution</strong>: Validated the state of the shared queue after marking the consumer as &quot;paused&quot;. The consumer is not blocked if the other thread has emptied the queue in the meantime. </p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="consumers-are-not-blocked-on-batchreceive-pr-11691">Consumers are not blocked on <code>batchReceive</code>. <a href="https://github.com/apache/pulsar/pull/11691" target="_blank" rel="noopener noreferrer">PR-11691</a><a href="#consumers-are-not-blocked-on-batchreceive-pr-11691" class="hash-link" aria-label="Direct link to consumers-are-not-blocked-on-batchreceive-pr-11691" title="Direct link to consumers-are-not-blocked-on-batchreceive-pr-11691">​</a></h3><p><strong>Issue</strong>: Previously, consumers were blocked when <code>Consumer.batchReceive()</code> was called concurrently by different threads due to a race condition in <code>ConsumerBase.java</code>.</p><p><strong>Resolution</strong>: Put <code>pinnedInternalExecutor</code> in <code>ConsumerBase</code> to allow batch timer, <code>ConsumerImpl</code>, and <code>MultiTopicsConsumerImpl</code> to submit work in a single thread.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="python-client-correctly-enables-custom-logging-pr-11882">Python client correctly enables custom logging. <a href="https://github.com/apache/pulsar/pull/11882" target="_blank" rel="noopener noreferrer">PR-11882</a><a href="#python-client-correctly-enables-custom-logging-pr-11882" class="hash-link" aria-label="Direct link to python-client-correctly-enables-custom-logging-pr-11882" title="Direct link to python-client-correctly-enables-custom-logging-pr-11882">​</a></h3><p><strong>Issue</strong>: Previously, deadlock might happen when custom logging was enabled in the Python client.</p><p><strong>Resolution</strong>: Detached the worker thread and reduced log level.</p><h1>What is Next?</h1><p>If you are interested in learning more about Pulsar 2.8.1, you can <a href="https://pulsar.apache.org/download/" target="_blank" rel="noopener noreferrer">download</a> and try it out now! </p><p>The first-ever Pulsar Virtual Summit Europe 2021 will take place in October. <a href="https://hopin.com/events/pulsar-summit-europe-2021" target="_blank" rel="noopener noreferrer">Register now</a> and help us make it an even bigger success by spreading the word on social media!</p><p>For more information about the Apache Pulsar project and the progress, visit
the <a href="https://pulsar.apache.org" target="_blank" rel="noopener noreferrer">Pulsar website</a>, follow the project on Twitter <a href="https://twitter.com/apache_pulsar" target="_blank" rel="noopener noreferrer">@apache_pulsar</a>, and join <a href="https://apache-pulsar.herokuapp.com/" target="_blank" rel="noopener noreferrer">Pulsar Slack</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/2021-09-23-Apache-Pulsar-2-8-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/2021/12/11/Log4j-CVE/"><div class="pagination-nav__sublabel">Newer Post</div><div class="pagination-nav__label">Log4j2 Zero Day vulnerability (CVE-2021-44228)</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/blog/2021/08/18/asia-cfp/"><div class="pagination-nav__sublabel">Older Post</div><div class="pagination-nav__label">Announcing Pulsar Summit Asia 2021: CFP Is Open!</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>