CINXE.COM

RubyGems - sbmt-kafka_producer - Versions diffs - 2.0.0 → 2.2.0 - Mend - Supply Chain Defender

<!DOCTYPE html> <html> <head> <title> RubyGems - sbmt-kafka_producer - Versions diffs - 2.0.0 → 2.2.0 - Mend - Supply Chain Defender </title> <link rel="icon" type="image/png" href="/packs/media/images/production/favicons/favicon-32x32-fa0286238d4d512e71dba3881cbbcc42.png" /> <link rel="mask-icon" type="image/x-icon" href="/packs/media/images/production/favicons/favicon-786db6a85c0dea068c1a7047338024d2.svg" /> <link rel="apple-touch-icon" type="image/png" href="/packs/media/images/production/favicons/apple-touch-icon-11491aa2351c88b3b48534d1576a2ff9.png" /> <link rel="shortcut icon" type="image/x-icon" href="/packs/media/images/production/favicons/favicon-81c62e5500c39bd10e99844e94455995.ico" /> <meta name="csrf-param" content="authenticity_token" /> <meta name="csrf-token" content="qa7JOJzCgozn9aIPCop9vXSSUBPNWpaxVIyJLYjqlxSUw02JMLe-ctKKnH-GTbOpztA4HlEFRjJia3cbxt823w" /> <meta content='no-cache' name='turbolinks-cache-control'> <meta content='width=device-width, initial-scale=1' name='viewport'> <link rel="stylesheet" href="/packs/css/application-b44eb75784afb1e9f8ce.css" media="all" /> <script src="/packs/js/application-9f130b109122a7b55e22.js" data-turbolinks-track="reload"></script> <link href='https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i' rel='stylesheet'> </head> <body class='registries ruby_gems diffs' id='page-top'> <div id='wrapper'> <div class='d-flex flex-column' id='content-wrapper'> <div id='content'> <nav class='navbar navbar-expand navbar-light bg-white topbar mb-4 shadow'> <a class='sidebar-brand d-flex align-items-center justify-content-center' href='/'> <div class='sidebar-brand-text mx-3 d-none d-xxl-block d-xl-block'> <img alt="Diffend" src="/packs/media/images/production/logos/vertical-dark-5363ad390f9fcfd11bfecf89a3fb60f1.svg" /> </div> </a> <div class='container'> <ul class='navbar-nav'> <li class='nav-item'> <a class='nav-link' href='/gems'> <span class='mr-2 d-none d-lg-inline text-gray-600'> RubyGems </span> </a> </li> <li class='nav-item'> <a class='nav-link' href='/npm'> <span class='mr-2 d-none d-lg-inline text-gray-600'> npm </span> </a> </li> <div class='topbar-divider d-sm-block'></div> <li class='nav-item'> <a class='nav-link' href='/organizations'> <span class='mr-2 d-none d-lg-inline text-gray-600'> Organizations </span> </a> </li> </ul> <ul class='navbar-nav'> <div class='topbar-divider d-none d-sm-block'></div> <li class='nav-item'> <a class='nav-link' href='/users/sign_in'> <span class='mr-2 d-none d-lg-inline text-gray-600'> <i class='fas fa-key fa-fw mr-2'></i> Log in </span> </a> </li> <li class='nav-item'> <a class='nav-link' href='/users/sign_up'> <span class='mr-2 d-none d-lg-inline text-gray-600'> <i class='fas fa-user-plus fa-fw mr-2'></i> Sign up </span> </a> </li> </ul> </div> </nav> <div class='container'> <div class='row'> <div class='col mb-1'> <nav> <ol class='breadcrumb'> <li class='breadcrumb-item'> <a href="/gems">RubyGems</a> </li> <li class='breadcrumb-item'> <a href="/gems/sbmt-kafka_producer">sbmt-kafka_producer</a> </li> <li class='breadcrumb-item'> <a href="/gems/sbmt-kafka_producer">Versions diffs</a> </li> <li class='breadcrumb-item'> <a href="/gems/sbmt-kafka_producer/2.0.0/2.2.0">2.0.0 → 2.2.0</a> </li> </ol> </nav> </div> </div> <div class='row'> <div class='col'> <div class='text-right mb-4'> </div> </div> </div> <div class='row'> <div class='col align-items-center mb-4'> <div class='text-center'> <h2 class='text-gray-800'> sbmt-kafka_producer 2.0.0 → 2.2.0 </h2> </div> </div> </div> <div data-diff-id='f16738d6-14e2-40c8-a0a7-055679fd4b15' data-diff-state='finished' id='diff-id'> <div class='row'> <div class='col pt-2 text-black'> <div class='row'> <div class='col-lg-12 mb-4 mt-2'> <div class='card bg-info text-white shadow'> <div class='card-body'> <span class='icon text-white-100 mr-2'> <i class='fas fa-info-circle'></i> </span> Sign up to get <strong>free</strong> protection for your applications and to get access to all the features. </div> </div> </div> </div> <div id='diff'> <div class='mb-3'> <div class="d2h-file-list-wrapper"> <div class="d2h-file-list-header"> <span class="d2h-file-list-title">Files changed (7)</span> <a class="d2h-file-switch d2h-hide">hide</a> <a class="d2h-file-switch d2h-show">show</a> </div> <ol class="d2h-file-list"> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/sbmt-kafka_producer/2.0.0/2.2.0/page/1#d2h-683205" class="d2h-file-name">checksums.yaml</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+4</span> <span class="d2h-lines-deleted">-4</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/sbmt-kafka_producer/2.0.0/2.2.0/page/1#d2h-670634" class="d2h-file-name">data/CHANGELOG.md</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+12</span> <span class="d2h-lines-deleted">-0</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/sbmt-kafka_producer/2.0.0/2.2.0/page/1#d2h-027470" class="d2h-file-name">data/README.md</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+4</span> <span class="d2h-lines-deleted">-0</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/sbmt-kafka_producer/2.0.0/2.2.0/page/1#d2h-226072" class="d2h-file-name">data/lib/sbmt/kafka_producer/base_producer.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+6</span> <span class="d2h-lines-deleted">-1</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/sbmt-kafka_producer/2.0.0/2.2.0/page/1#d2h-966581" class="d2h-file-name">data/lib/sbmt/kafka_producer/kafka_client_factory.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+18</span> <span class="d2h-lines-deleted">-3</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/sbmt-kafka_producer/2.0.0/2.2.0/page/1#d2h-357120" class="d2h-file-name">data/lib/sbmt/kafka_producer/version.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+1</span> <span class="d2h-lines-deleted">-1</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/sbmt-kafka_producer/2.0.0/2.2.0/page/1#d2h-004177" class="d2h-file-name">metadata</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+2</span> <span class="d2h-lines-deleted">-2</span> </span> </span> </li> </ol> </div> </div> <div id="d2h-683205" class="d2h-file-wrapper" data-lang="yaml"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-683205">checksums.yaml</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -1,7 +1,7 @@</div> </td> </tr><tr> <td id="d2h-683205-23" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-683205-23"> <div class="line-num1">1</div> <div class="line-num2">1</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">---</span> </div> </td> </tr><tr> <td id="d2h-683205-34" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-683205-34"> <div class="line-num1">2</div> <div class="line-num2">2</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">SHA256:</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">3</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> metadata.gz: <del>3b6c10d4e49a462afad448f607d1d9c202b59a7b70661ef17cf7ec8dd4d8112e</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">4</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> data.tar.gz: <del>4cf15927ca33194dc5639afcf7967b3965ac817ad8813380e33f7dc003aa11d0</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">3</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> metadata.gz: <ins>4f2c9bec545e5dd939135a388d69acd38c4adfbc65c5d0f9db1cfc94d5431290</ins></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">4</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> data.tar.gz: <ins>77d7376225e878c89499bb19bea8cd87230b247a4b238856fc2724101872a9f8</ins></span> </div> </td> </tr><tr> <td id="d2h-683205-89" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-683205-89"> <div class="line-num1">5</div> <div class="line-num2">5</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">SHA512:</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">6</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> metadata.gz: <del>467ccc822998a5a9bb174557b6a72be74855060cb5e24e3097efb9ac9be746adfede6c4c77721e637ae6b14db4dc8983c7b76a23c6127016345f3f7fdcf1f681</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">7</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> data.tar.gz: <del>bd1df75213ff393acf379fe4d3bbf013747af8f193a0970effbff0782e6c7dd1adeb8cd8cec4704cebb6fc214a1631dc330a679d77ca83c786067786adda329f</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">6</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> metadata.gz: <ins>9fb93062edacf5150ad961b79031acdbc4adcf7cf823563014b041bd69e78cb988caf46b107b5f27c6fb0eafdc8d460da2b88c3279786aedf7534a3ad4febfb2</ins></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">7</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> data.tar.gz: <ins>11cc83bda4221bac3b65be54606d75dbb2c1acc7e55d6cb41012207ad78fc6715d1bdc3fc8da58ff1bd45d339bdfc2a77167bc7af7115c005d0aa9dd77e536ae</ins></span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-670634" class="d2h-file-wrapper" data-lang="md"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-670634">data/CHANGELOG.md</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -13,6 +13,18 @@ and this project adheres to [Semantic Versioning](http:&#x2F;&#x2F;semver.org&#x2F;).</div> </td> </tr><tr> <td id="d2h-670634-171" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-670634-171"> <div class="line-num1">13</div> <div class="line-num2">13</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-670634-182" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-670634-182"> <div class="line-num1">14</div> <div class="line-num2">14</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">### Fixed</span> </div> </td> </tr><tr> <td id="d2h-670634-193" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-670634-193"> <div class="line-num1">15</div> <div class="line-num2">15</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-670634-204" class="d2h-code-linenumber d2h-ins"><a href="#d2h-670634-204"> <div class="line-num1"></div> <div class="line-num2">16</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">## [2.2.0] - 2024-04-12</span> </div> </td> </tr><tr> <td id="d2h-670634-215" class="d2h-code-linenumber d2h-ins"><a href="#d2h-670634-215"> <div class="line-num1"></div> <div class="line-num2">17</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-670634-226" class="d2h-code-linenumber d2h-ins"><a href="#d2h-670634-226"> <div class="line-num1"></div> <div class="line-num2">18</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">### Changed</span> </div> </td> </tr><tr> <td id="d2h-670634-237" class="d2h-code-linenumber d2h-ins"><a href="#d2h-670634-237"> <div class="line-num1"></div> <div class="line-num2">19</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-670634-248" class="d2h-code-linenumber d2h-ins"><a href="#d2h-670634-248"> <div class="line-num1"></div> <div class="line-num2">20</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">- Add logs with `offset`.</span> </div> </td> </tr><tr> <td id="d2h-670634-259" class="d2h-code-linenumber d2h-ins"><a href="#d2h-670634-259"> <div class="line-num1"></div> <div class="line-num2">21</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-670634-270" class="d2h-code-linenumber d2h-ins"><a href="#d2h-670634-270"> <div class="line-num1"></div> <div class="line-num2">22</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">## [2.1.0] - 2024-03-14</span> </div> </td> </tr><tr> <td id="d2h-670634-281" class="d2h-code-linenumber d2h-ins"><a href="#d2h-670634-281"> <div class="line-num1"></div> <div class="line-num2">23</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-670634-292" class="d2h-code-linenumber d2h-ins"><a href="#d2h-670634-292"> <div class="line-num1"></div> <div class="line-num2">24</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">### Changed</span> </div> </td> </tr><tr> <td id="d2h-670634-303" class="d2h-code-linenumber d2h-ins"><a href="#d2h-670634-303"> <div class="line-num1"></div> <div class="line-num2">25</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-670634-314" class="d2h-code-linenumber d2h-ins"><a href="#d2h-670634-314"> <div class="line-num1"></div> <div class="line-num2">26</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">- Memoize kafka clients. Add a registry with them to KafkaClientFactory.</span> </div> </td> </tr><tr> <td id="d2h-670634-325" class="d2h-code-linenumber d2h-ins"><a href="#d2h-670634-325"> <div class="line-num1"></div> <div class="line-num2">27</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-670634-336" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-670634-336"> <div class="line-num1">16</div> <div class="line-num2">28</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">## [2.0.0] - 2024-01-29</span> </div> </td> </tr><tr> <td id="d2h-670634-347" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-670634-347"> <div class="line-num1">17</div> <div class="line-num2">29</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-670634-358" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-670634-358"> <div class="line-num1">18</div> <div class="line-num2">30</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">### Changed</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-027470" class="d2h-file-wrapper" data-lang="md"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-027470">data/README.md</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -19,6 +19,10 @@ And then execute:</div> </td> </tr><tr> <td id="d2h-027470-396" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-396"> <div class="line-num1">19</div> <div class="line-num2">19</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">bundle install</span> </div> </td> </tr><tr> <td id="d2h-027470-407" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-407"> <div class="line-num1">20</div> <div class="line-num2">20</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">```</span> </div> </td> </tr><tr> <td id="d2h-027470-418" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-418"> <div class="line-num1">21</div> <div class="line-num2">21</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-429" class="d2h-code-linenumber d2h-ins"><a href="#d2h-027470-429"> <div class="line-num1"></div> <div class="line-num2">22</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">## Demo</span> </div> </td> </tr><tr> <td id="d2h-027470-440" class="d2h-code-linenumber d2h-ins"><a href="#d2h-027470-440"> <div class="line-num1"></div> <div class="line-num2">23</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-451" class="d2h-code-linenumber d2h-ins"><a href="#d2h-027470-451"> <div class="line-num1"></div> <div class="line-num2">24</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">Learn how to use this gem and how it works with Ruby on Rails at here https:&#x2F;&#x2F;github.com&#x2F;SberMarket-Tech&#x2F;outbox-example-apps</span> </div> </td> </tr><tr> <td id="d2h-027470-462" class="d2h-code-linenumber d2h-ins"><a href="#d2h-027470-462"> <div class="line-num1"></div> <div class="line-num2">25</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-473" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-473"> <div class="line-num1">22</div> <div class="line-num2">26</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">## Auto configuration</span> </div> </td> </tr><tr> <td id="d2h-027470-484" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-484"> <div class="line-num1">23</div> <div class="line-num2">27</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-495" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-495"> <div class="line-num1">24</div> <div class="line-num2">28</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">We recommend going through the configuration and file creation process using the following Rails generators. Each generator can be run by using the `--help` option to learn more about the available arguments.</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-226072" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-226072">data/lib/sbmt/kafka_producer/base_producer.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -9,9 +9,10 @@ module Sbmt</div> </td> </tr><tr> <td id="d2h-226072-533" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-226072-533"> <div class="line-num1">9</div> <div class="line-num2">9</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> option :topic</span> </div> </td> </tr><tr> <td id="d2h-226072-544" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-226072-544"> <div class="line-num1">10</div> <div class="line-num2">10</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-226072-555" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-226072-555"> <div class="line-num1">11</div> <div class="line-num2">11</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> def sync_publish!(payload, options = {})</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">12</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> around_publish do</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">12</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> <ins>report = </ins>around_publish do</span> </div> </td> </tr><tr> <td id="d2h-226072-588" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-226072-588"> <div class="line-num1">13</div> <div class="line-num2">13</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> client.produce_sync(payload: payload, **options.merge(topic: topic))</span> </div> </td> </tr><tr> <td id="d2h-226072-599" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-226072-599"> <div class="line-num1">14</div> <div class="line-num2">14</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-226072-610" class="d2h-code-linenumber d2h-ins"><a href="#d2h-226072-610"> <div class="line-num1"></div> <div class="line-num2">15</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> log_success(report)</span> </div> </td> </tr><tr> <td id="d2h-226072-621" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-226072-621"> <div class="line-num1">15</div> <div class="line-num2">16</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> true</span> </div> </td> </tr><tr> <td id="d2h-226072-632" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-226072-632"> <div class="line-num1">16</div> <div class="line-num2">17</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-226072-643" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-226072-643"> <div class="line-num1">17</div> <div class="line-num2">18</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -81,6 +82,10 @@ module Sbmt</div> </td> </tr><tr> <td id="d2h-226072-660" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-226072-660"> <div class="line-num1">81</div> <div class="line-num2">82</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> ErrorTracker.error(error)</span> </div> </td> </tr><tr> <td id="d2h-226072-671" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-226072-671"> <div class="line-num1">82</div> <div class="line-num2">83</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-226072-682" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-226072-682"> <div class="line-num1">83</div> <div class="line-num2">84</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-226072-693" class="d2h-code-linenumber d2h-ins"><a href="#d2h-226072-693"> <div class="line-num1"></div> <div class="line-num2">85</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def log_success(report)</span> </div> </td> </tr><tr> <td id="d2h-226072-704" class="d2h-code-linenumber d2h-ins"><a href="#d2h-226072-704"> <div class="line-num1"></div> <div class="line-num2">86</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> logger.info &quot;Message has been successfully sent to Kafka - topic: #{report.topic_name}, partition: #{report.partition}, offset: #{report.offset}&quot;</span> </div> </td> </tr><tr> <td id="d2h-226072-715" class="d2h-code-linenumber d2h-ins"><a href="#d2h-226072-715"> <div class="line-num1"></div> <div class="line-num2">87</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-226072-726" class="d2h-code-linenumber d2h-ins"><a href="#d2h-226072-726"> <div class="line-num1"></div> <div class="line-num2">88</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-226072-737" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-226072-737"> <div class="line-num1">84</div> <div class="line-num2">89</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> def format_exception_error(error)</span> </div> </td> </tr><tr> <td id="d2h-226072-748" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-226072-748"> <div class="line-num1">85</div> <div class="line-num2">90</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> text = &quot;#{format_exception_error(error.cause)}. &quot; if with_cause?(error)</span> </div> </td> </tr><tr> <td id="d2h-226072-759" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-226072-759"> <div class="line-num1">86</div> <div class="line-num2">91</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-966581" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-966581">data/lib/sbmt/kafka_producer/kafka_client_factory.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -3,6 +3,9 @@</div> </td> </tr><tr> <td id="d2h-966581-797" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-797"> <div class="line-num1">3</div> <div class="line-num2">3</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">module Sbmt</span> </div> </td> </tr><tr> <td id="d2h-966581-808" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-808"> <div class="line-num1">4</div> <div class="line-num2">4</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> module KafkaProducer</span> </div> </td> </tr><tr> <td id="d2h-966581-819" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-819"> <div class="line-num1">5</div> <div class="line-num2">5</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> class KafkaClientFactory</span> </div> </td> </tr><tr> <td id="d2h-966581-830" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-830"> <div class="line-num1"></div> <div class="line-num2">6</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> CLIENTS_REGISTRY_MUTEX = Mutex.new</span> </div> </td> </tr><tr> <td id="d2h-966581-841" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-841"> <div class="line-num1"></div> <div class="line-num2">7</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> CLIENTS_REGISTRY = {}</span> </div> </td> </tr><tr> <td id="d2h-966581-852" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-852"> <div class="line-num1"></div> <div class="line-num2">8</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-966581-863" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-863"> <div class="line-num1">6</div> <div class="line-num2">9</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> class &lt;&lt; self</span> </div> </td> </tr><tr> <td id="d2h-966581-874" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-874"> <div class="line-num1">7</div> <div class="line-num2">10</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> def default_client</span> </div> </td> </tr><tr> <td id="d2h-966581-885" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-885"> <div class="line-num1">8</div> <div class="line-num2">11</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> @default_client ||= ConnectionPool::Wrapper.new do</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -15,15 +18,27 @@ module Sbmt</div> </td> </tr><tr> <td id="d2h-966581-902" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-902"> <div class="line-num1">15</div> <div class="line-num2">18</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> def build(kafka = {})</span> </div> </td> </tr><tr> <td id="d2h-966581-913" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-913"> <div class="line-num1">16</div> <div class="line-num2">19</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> return default_client if kafka.empty?</span> </div> </td> </tr><tr> <td id="d2h-966581-924" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-924"> <div class="line-num1">17</div> <div class="line-num2">20</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">18</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> <del>ConnectionPool::Wrapper.new</del> do</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">19</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> <del>WaterDrop</del>::<del>Producer</del>.new do<del> |config|</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">20</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> <del>configure_client(</del>config<del>, kafka)</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">21</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> <ins>fetch_client(kafka)</ins> do</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">22</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> <ins>ConnectionPool</ins>::<ins>Wrapper</ins>.new do</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">23</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> <ins>WaterDrop::Producer.new do |</ins>config<ins>|</ins></span> </div> </td> </tr><tr> <td id="d2h-966581-1001" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-1001"> <div class="line-num1"></div> <div class="line-num2">24</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> configure_client(config, kafka)</span> </div> </td> </tr><tr> <td id="d2h-966581-1012" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-1012"> <div class="line-num1"></div> <div class="line-num2">25</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-966581-1023" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-1023"> <div class="line-num1">21</div> <div class="line-num2">26</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-966581-1034" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-1034"> <div class="line-num1">22</div> <div class="line-num2">27</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-966581-1045" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-1045"> <div class="line-num1">23</div> <div class="line-num2">28</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-966581-1056" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-1056"> <div class="line-num1">24</div> <div class="line-num2">29</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-966581-1067" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-1067"> <div class="line-num1">25</div> <div class="line-num2">30</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> private</span> </div> </td> </tr><tr> <td id="d2h-966581-1078" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-1078"> <div class="line-num1">26</div> <div class="line-num2">31</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-966581-1089" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-1089"> <div class="line-num1"></div> <div class="line-num2">32</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def fetch_client(kafka)</span> </div> </td> </tr><tr> <td id="d2h-966581-1100" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-1100"> <div class="line-num1"></div> <div class="line-num2">33</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> key = Digest::SHA1.hexdigest(Marshal.dump(kafka))</span> </div> </td> </tr><tr> <td id="d2h-966581-1111" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-1111"> <div class="line-num1"></div> <div class="line-num2">34</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> return CLIENTS_REGISTRY[key] if CLIENTS_REGISTRY.key?(key)</span> </div> </td> </tr><tr> <td id="d2h-966581-1122" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-1122"> <div class="line-num1"></div> <div class="line-num2">35</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-966581-1133" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-1133"> <div class="line-num1"></div> <div class="line-num2">36</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> CLIENTS_REGISTRY_MUTEX.synchronize do</span> </div> </td> </tr><tr> <td id="d2h-966581-1144" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-1144"> <div class="line-num1"></div> <div class="line-num2">37</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> return CLIENTS_REGISTRY[key] if CLIENTS_REGISTRY.key?(key)</span> </div> </td> </tr><tr> <td id="d2h-966581-1155" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-1155"> <div class="line-num1"></div> <div class="line-num2">38</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> CLIENTS_REGISTRY[key] = yield</span> </div> </td> </tr><tr> <td id="d2h-966581-1166" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-1166"> <div class="line-num1"></div> <div class="line-num2">39</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-966581-1177" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-1177"> <div class="line-num1"></div> <div class="line-num2">40</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-966581-1188" class="d2h-code-linenumber d2h-ins"><a href="#d2h-966581-1188"> <div class="line-num1"></div> <div class="line-num2">41</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-966581-1199" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-1199"> <div class="line-num1">27</div> <div class="line-num2">42</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> def configure_client(kafka_config, kafka_options = {})</span> </div> </td> </tr><tr> <td id="d2h-966581-1210" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-1210"> <div class="line-num1">28</div> <div class="line-num2">43</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> kafka_config.logger = config.logger_class.classify.constantize.new</span> </div> </td> </tr><tr> <td id="d2h-966581-1221" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-966581-1221"> <div class="line-num1">29</div> <div class="line-num2">44</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> kafka_config.kafka = config.to_kafka_options.merge(custom_kafka_config(kafka_options)).symbolize_keys</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-357120" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-357120">data/lib/sbmt/kafka_producer/version.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -2,6 +2,6 @@</div> </td> </tr><tr> <td id="d2h-357120-1259" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-357120-1259"> <div class="line-num1">2</div> <div class="line-num2">2</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-357120-1270" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-357120-1270"> <div class="line-num1">3</div> <div class="line-num2">3</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">module Sbmt</span> </div> </td> </tr><tr> <td id="d2h-357120-1281" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-357120-1281"> <div class="line-num1">4</div> <div class="line-num2">4</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> module KafkaProducer</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">5</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> VERSION = &quot;2.<del>0</del>.0&quot;</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">5</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> VERSION = &quot;2.<ins>2</ins>.0&quot;</span> </div> </td> </tr><tr> <td id="d2h-357120-1314" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-357120-1314"> <div class="line-num1">6</div> <div class="line-num2">6</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-357120-1325" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-357120-1325"> <div class="line-num1">7</div> <div class="line-num2">7</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">end</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-004177" class="d2h-file-wrapper" data-lang=""> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-004177">metadata</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -1,14 +1,14 @@</div> </td> </tr><tr> <td id="d2h-004177-1363" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-1363"> <div class="line-num1">1</div> <div class="line-num2">1</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">--- !ruby&#x2F;object:Gem::Specification</span> </div> </td> </tr><tr> <td id="d2h-004177-1374" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-1374"> <div class="line-num1">2</div> <div class="line-num2">2</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">name: sbmt-kafka_producer</span> </div> </td> </tr><tr> <td id="d2h-004177-1385" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-1385"> <div class="line-num1">3</div> <div class="line-num2">3</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">version: !ruby&#x2F;object:Gem::Version</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">4</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> version: 2.<del>0</del>.0</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">4</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> version: 2.<ins>2</ins>.0</span> </div> </td> </tr><tr> <td id="d2h-004177-1418" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-1418"> <div class="line-num1">5</div> <div class="line-num2">5</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">platform: ruby</span> </div> </td> </tr><tr> <td id="d2h-004177-1429" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-1429"> <div class="line-num1">6</div> <div class="line-num2">6</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">authors:</span> </div> </td> </tr><tr> <td id="d2h-004177-1440" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-1440"> <div class="line-num1">7</div> <div class="line-num2">7</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">- Sbermarket Ruby-Platform Team</span> </div> </td> </tr><tr> <td id="d2h-004177-1451" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-1451"> <div class="line-num1">8</div> <div class="line-num2">8</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">autorequire:</span> </div> </td> </tr><tr> <td id="d2h-004177-1462" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-1462"> <div class="line-num1">9</div> <div class="line-num2">9</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">bindir: exe</span> </div> </td> </tr><tr> <td id="d2h-004177-1473" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-1473"> <div class="line-num1">10</div> <div class="line-num2">10</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">cert_chain: []</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">11</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">date: 2024-<del>02</del>-<del>27</del> 00:00:00.000000000 Z</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">11</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">date: 2024-<ins>04</ins>-<ins>16</ins> 00:00:00.000000000 Z</span> </div> </td> </tr><tr> <td id="d2h-004177-1506" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-1506"> <div class="line-num1">12</div> <div class="line-num2">12</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">dependencies:</span> </div> </td> </tr><tr> <td id="d2h-004177-1517" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-1517"> <div class="line-num1">13</div> <div class="line-num2">13</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn">- !ruby&#x2F;object:Gem::Dependency</span> </div> </td> </tr><tr> <td id="d2h-004177-1528" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-1528"> <div class="line-num1">14</div> <div class="line-num2">14</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">&nbsp;</span> <span class="d2h-code-line-ctn"> name: anyway_config</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> <footer class='sticky-footer mt-3'> <div class='container text-center mb-3 copyright'> <a class='mr-4 text-gray-600' href='mailto:diffend@whitesourcesoftware.com'> Contact Us </a> <a class='mr-4 text-gray-600' href='https://www.whitesourcesoftware.com/terms-of-service/'> Terms of Service </a> <a class='mr-4 text-gray-600' href='https://www.whitesourcesoftware.com/privacy-policy/'> Privacy Policy </a> <a class='mr-4 text-gray-600' href='https://diffend.io/docs'> Docs </a> </div> <div class='container mt-4'> <div class='copyright text-center'> Copyright © 2024 Mend Software </div> </div> </footer> </div> </div> </div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10