blob: 3817fee7f494d3570f4a336c0b5c622fe8416420 [file] [log] [blame]
<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-development/extensions-core/kafka-supervisor-reference">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v2.4.1">
<title data-rh="true">Apache Kafka supervisor reference | Apache® Druid</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://druid.apache.org/img/druid_nav.png"><meta data-rh="true" name="twitter:image" content="https://druid.apache.org/img/druid_nav.png"><meta data-rh="true" property="og:url" content="https://druid.apache.org/docs/28.0.0/development/extensions-core/kafka-supervisor-reference"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Apache Kafka supervisor reference | Apache® Druid"><meta data-rh="true" name="description" content="Reference topic for Apache Kafka supervisors"><meta data-rh="true" property="og:description" content="Reference topic for Apache Kafka supervisors"><link data-rh="true" rel="icon" href="/img/favicon.png"><link data-rh="true" rel="canonical" href="https://druid.apache.org/docs/28.0.0/development/extensions-core/kafka-supervisor-reference"><link data-rh="true" rel="alternate" href="https://druid.apache.org/docs/28.0.0/development/extensions-core/kafka-supervisor-reference" hreflang="en"><link data-rh="true" rel="alternate" href="https://druid.apache.org/docs/28.0.0/development/extensions-core/kafka-supervisor-reference" hreflang="x-default"><link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-131010415-1"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-131010415-1",{})</script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js"></script><link rel="stylesheet" href="/assets/css/styles.546f39eb.css">
<link rel="preload" href="/assets/js/runtime~main.0dcbfdea.js" as="script">
<link rel="preload" href="/assets/js/main.7f6fdf81.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")}()</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><nav aria-label="Main" class="navbar navbar--fixed-top navbar--dark"><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/druid_nav.png" alt="Apache® Druid" class="themedImage_ToTc themedImage--light_HNdA"><img src="/img/druid_nav.png" alt="Apache® Druid" class="themedImage_ToTc themedImage--dark_i4oU"></div></a></div><div class="navbar__items navbar__items--right"><a class="navbar__item navbar__link" href="/technology">Technology</a><a class="navbar__item navbar__link" href="/use-cases">Use Cases</a><a class="navbar__item navbar__link" href="/druid-powered">Powered By</a><a class="navbar__item navbar__link" href="/docs/28.0.0/design/">Docs</a><a class="navbar__item navbar__link" href="/community/">Community</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Apache®</a><ul class="dropdown__menu"><li><a href="https://www.apache.org/" target="_blank" rel="noopener noreferrer" class="dropdown__link">Foundation<svg width="12" height="12" 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><a href="https://apachecon.com/?ref=druid.apache.org" target="_blank" rel="noopener noreferrer" class="dropdown__link">Events<svg width="12" height="12" 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><a href="https://www.apache.org/licenses/" target="_blank" rel="noopener noreferrer" class="dropdown__link">License<svg width="12" height="12" 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><a href="https://www.apache.org/foundation/thanks.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">Thanks<svg width="12" height="12" 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><a href="https://www.apache.org/security/" target="_blank" rel="noopener noreferrer" class="dropdown__link">Security<svg width="12" height="12" 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><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">Sponsorship<svg width="12" height="12" 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><a class="navbar__item navbar__link" href="/downloads/">Download</a><div class="searchBox_ZlJk"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Loading..." aria-label="Search" class="navbar__search-input search-bar" disabled=""></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebarViewport_Xe31"><div class="sidebar_njMd"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/design/">Getting started</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/tutorials/tutorial-msq-extern">Tutorials</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/design/architecture">Design</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" href="/docs/28.0.0/ingestion/">Ingestion</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/28.0.0/ingestion/">Overview</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/docs/28.0.0/ingestion/data-formats">Ingestion concepts</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/docs/28.0.0/multi-stage-query/">SQL-based batch</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" tabindex="0" href="/docs/28.0.0/development/extensions-core/kafka-ingestion">Streaming</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/28.0.0/development/extensions-core/kafka-ingestion">Apache Kafka ingestion</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/28.0.0/development/extensions-core/kafka-supervisor-reference">Apache Kafka supervisor</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/28.0.0/development/extensions-core/kafka-supervisor-operations">Apache Kafka operations</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/28.0.0/development/extensions-core/kinesis-ingestion">Amazon Kinesis</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/docs/28.0.0/ingestion/native-batch">Classic batch</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/28.0.0/ingestion/ingestion-spec">Ingestion spec reference</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/28.0.0/ingestion/schema-design">Schema design tips</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/28.0.0/ingestion/faq">Troubleshooting FAQ</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/data-management/">Data management</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/querying/sql">Querying</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/api-reference/">API reference</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/configuration/">Configuration</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/operations/web-console">Operations</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/development/overview">Development</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/misc/papers-and-talks">Misc</a></div></li></ul></nav></div></div></aside><main class="docMainContainer_gTbr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">Ingestion</span><meta itemprop="position" content="1"></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">Streaming</span><meta itemprop="position" content="2"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Apache Kafka supervisor</span><meta itemprop="position" content="3"></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Apache Kafka supervisor reference</h1></header><p>This topic contains configuration reference information for the Apache Kafka supervisor for Apache Druid.</p><p>The following table outlines the high-level configuration options:</p><table><thead><tr><th>Property</th><th>Type</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td><code>type</code></td><td>String</td><td>The supervisor type. For Kafka streaming, set to <code>kafka</code>.</td><td>Yes</td></tr><tr><td><code>spec</code></td><td>Object</td><td>The container object for the supervisor configuration.</td><td>Yes</td></tr><tr><td><code>ioConfig</code></td><td>Object</td><td>The I/O configuration object to define the Kafka connection and I/O-related settings for the supervisor and indexing task. See <a href="#supervisor-io-configuration">Supervisor I/O configuration</a>.</td><td>Yes</td></tr><tr><td><code>dataSchema</code></td><td>Object</td><td>The schema for the Kafka indexing task to use during ingestion.</td><td>Yes</td></tr><tr><td><code>tuningConfig</code></td><td>Object</td><td>The tuning configuration object to define performance-related settings for the supervisor and indexing tasks. See <a href="#supervisor-tuning-configuration">Supervisor tuning configuration</a>.</td><td>No</td></tr></tbody></table><h2 class="anchor anchorWithStickyNavbar_LWe7" id="supervisor-io-configuration">Supervisor I/O configuration<a href="#supervisor-io-configuration" class="hash-link" aria-label="Direct link to Supervisor I/O configuration" title="Direct link to Supervisor I/O configuration"></a></h2><p>The following table outlines the configuration options for <code>ioConfig</code>:</p><table><thead><tr><th>Property</th><th>Type</th><th>Description</th><th>Required</th><th>Default</th></tr></thead><tbody><tr><td><code>topic</code></td><td>String</td><td>The Kafka topic to read from. Must be a specific topic. Druid does not support topic patterns.</td><td>Yes</td><td></td></tr><tr><td><code>inputFormat</code></td><td>Object</td><td>The input format to define input data parsing. See <a href="#specifying-data-format">Specifying data format</a> for details about specifying the input format.</td><td>Yes</td><td></td></tr><tr><td><code>consumerProperties</code></td><td>String, Object</td><td>A map of properties to pass to the Kafka consumer. See <a href="#consumer-properties">Consumer properties</a>.</td><td>Yes</td><td></td></tr><tr><td><code>pollTimeout</code></td><td>Long</td><td>The length of time to wait for the Kafka consumer to poll records, in milliseconds.</td><td>No</td><td>100</td></tr><tr><td><code>replicas</code></td><td>Integer</td><td>The number of replica sets, where 1 is a single set of tasks (no replication). Druid always assigns replicate tasks to different workers to provide resiliency against process failure.</td><td>No</td><td>1</td></tr><tr><td><code>taskCount</code></td><td>Integer</td><td>The maximum number of reading tasks in a replica set. The maximum number of reading tasks equals <code>taskCount * replicas</code>. The total number of tasks, reading and publishing, is greater than this count. See <a href="/docs/28.0.0/development/extensions-core/kafka-supervisor-operations#capacity-planning">Capacity planning</a> for more details. When <code>taskCount &gt; {numKafkaPartitions}</code>, the actual number of reading tasks is less than the <code>taskCount</code> value.</td><td>No</td><td>1</td></tr><tr><td><code>taskDuration</code></td><td>ISO 8601 period</td><td>The length of time before tasks stop reading and begin publishing segments.</td><td>No</td><td>PT1H</td></tr><tr><td><code>startDelay</code></td><td>ISO 8601 period</td><td>The period to wait before the supervisor starts managing tasks.</td><td>No</td><td>PT5S</td></tr><tr><td><code>period</code></td><td>ISO 8601 period</td><td>Determines how often the supervisor executes its management logic. Note that the supervisor also runs in response to certain events, such as tasks succeeding, failing, and reaching their task duration. The <code>period</code> value specifies the maximum time between iterations.</td><td>No</td><td>PT30S</td></tr><tr><td><code>useEarliestOffset</code></td><td>Boolean</td><td>If a supervisor manages a datasource for the first time, it obtains a set of starting offsets from Kafka. This flag determines whether it retrieves the earliest or latest offsets in Kafka. Under normal circumstances, subsequent tasks start from where the previous segments ended. Druid only uses <code>useEarliestOffset</code> on the first run.</td><td>No</td><td><code>false</code></td></tr><tr><td><code>completionTimeout</code></td><td>ISO 8601 period</td><td>The length of time to wait before declaring a publishing task as failed and terminating it. If the value is too low, your tasks may never publish. The publishing clock for a task begins roughly after <code>taskDuration</code> elapses.</td><td>No</td><td>PT30M</td></tr><tr><td><code>lateMessageRejectionStartDateTime</code></td><td>ISO 8601 date time</td><td>Configure tasks to reject messages with timestamps earlier than this date time. For example, if this property is set to <code>2016-01-01T11:00Z</code> and the supervisor creates a task at <code>2016-01-01T12:00Z</code>, Druid drops messages with timestamps earlier than <code>2016-01-01T11:00Z</code>. This can prevent concurrency issues if your data stream has late messages and you have multiple pipelines that need to operate on the same segments, such as a realtime and a nightly batch ingestion pipeline.</td><td>No</td><td></td></tr><tr><td><code>lateMessageRejectionPeriod</code></td><td>ISO 8601 period</td><td>Configure tasks to reject messages with timestamps earlier than this period before the task was created. For example, if this property is set to <code>PT1H</code> and the supervisor creates a task at <code>2016-01-01T12:00Z</code>, Druid drops messages with timestamps earlier than <code>2016-01-01T11:00Z</code>. This may help prevent concurrency issues if your data stream has late messages and you have multiple pipelines that need to operate on the same segments, such as a realtime and a nightly batch ingestion pipeline. Note that you can specify only one of the late message rejection properties.</td><td>No</td><td></td></tr><tr><td><code>earlyMessageRejectionPeriod</code></td><td>ISO 8601 period</td><td>Configure tasks to reject messages with timestamps later than this period after the task reached its task duration. For example, if this property is set to <code>PT1H</code>, the task duration is set to <code>PT1H</code> and the supervisor creates a task at <code>2016-01-01T12:00Z</code>, Druid drops messages with timestamps later than <code>2016-01-01T14:00Z</code>. Tasks sometimes run past their task duration, such as in cases of supervisor failover. Setting <code>earlyMessageRejectionPeriod</code> too low may cause Druid to drop messages unexpectedly whenever a task runs past its originally configured task duration.</td><td>No</td><td></td></tr><tr><td><code>autoScalerConfig</code></td><td>Object</td><td>Defines auto scaling behavior for Kafka ingest tasks. See <a href="#task-autoscaler-properties">Task autoscaler properties</a>.</td><td>No</td><td>null</td></tr><tr><td><code>idleConfig</code></td><td>Object</td><td>Defines how and when the Kafka supervisor can become idle. See <a href="#idle-supervisor-configuration">Idle supervisor configuration</a> for more details.</td><td>No</td><td>null</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="task-autoscaler-properties">Task autoscaler properties<a href="#task-autoscaler-properties" class="hash-link" aria-label="Direct link to Task autoscaler properties" title="Direct link to Task autoscaler properties"></a></h3><p>The following table outlines the configuration options for <code>autoScalerConfig</code>:</p><table><thead><tr><th>Property</th><th>Description</th><th>Required</th><th>Default</th></tr></thead><tbody><tr><td><code>enableTaskAutoScaler</code></td><td>Enable or disable autoscaling. <code>false</code> or blank disables the <code>autoScaler</code> even when <code>autoScalerConfig</code> is not null.</td><td>No</td><td><code>false</code></td></tr><tr><td><code>taskCountMax</code></td><td>Maximum number of ingestion tasks. Set <code>taskCountMax &gt;= taskCountMin</code>. If <code>taskCountMax &gt; {numKafkaPartitions}</code>, Druid only scales reading tasks up to the <code>{numKafkaPartitions}</code>. In this case, <code>taskCountMax</code> is ignored.</td><td>Yes</td><td></td></tr><tr><td><code>taskCountMin</code></td><td>Minimum number of ingestion tasks. When you enable the autoscaler, Druid ignores the value of <code>taskCount</code> in <code>ioConfig</code> and starts with the <code>taskCountMin</code> number of tasks.</td><td>Yes</td><td></td></tr><tr><td><code>minTriggerScaleActionFrequencyMillis</code></td><td>Minimum time interval between two scale actions.</td><td>No</td><td>600000</td></tr><tr><td><code>autoScalerStrategy</code></td><td>The algorithm of <code>autoScaler</code>. Only supports <code>lagBased</code>. See <a href="#lag-based-autoscaler-strategy-related-properties">Lag based autoscaler strategy related properties</a> for details.</td><td>No</td><td><code>lagBased</code></td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="lag-based-autoscaler-strategy-related-properties">Lag based autoscaler strategy related properties<a href="#lag-based-autoscaler-strategy-related-properties" class="hash-link" aria-label="Direct link to Lag based autoscaler strategy related properties" title="Direct link to Lag based autoscaler strategy related properties"></a></h3><p>The following table outlines the configuration options for <code>autoScalerStrategy</code>:</p><table><thead><tr><th>Property</th><th>Description</th><th>Required</th><th>Default</th></tr></thead><tbody><tr><td><code>lagCollectionIntervalMillis</code></td><td>The time period during which Druid collects lag metric points.</td><td>No</td><td>30000</td></tr><tr><td><code>lagCollectionRangeMillis</code></td><td>The total time window of lag collection. Use with <code>lagCollectionIntervalMillis</code> to specify the intervals at which to collect lag metric points.</td><td>No</td><td>600000</td></tr><tr><td><code>scaleOutThreshold</code></td><td>The threshold of scale out action.</td><td>No</td><td>6000000</td></tr><tr><td><code>triggerScaleOutFractionThreshold</code></td><td>Enables scale out action if <code>triggerScaleOutFractionThreshold</code> percent of lag points is higher than <code>scaleOutThreshold</code>.</td><td>No</td><td>0.3</td></tr><tr><td><code>scaleInThreshold</code></td><td>The threshold of scale in action.</td><td>No</td><td>1000000</td></tr><tr><td><code>triggerScaleInFractionThreshold</code></td><td>Enables scale in action if <code>triggerScaleInFractionThreshold</code> percent of lag points is lower than <code>scaleOutThreshold</code>.</td><td>No</td><td>0.9</td></tr><tr><td><code>scaleActionStartDelayMillis</code></td><td>The number of milliseconds to delay after the supervisor starts before the first scale logic check.</td><td>No</td><td>300000</td></tr><tr><td><code>scaleActionPeriodMillis</code></td><td>The frequency in milliseconds to check if a scale action is triggered.</td><td>No</td><td>60000</td></tr><tr><td><code>scaleInStep</code></td><td>The number of tasks to reduce at once when scaling down.</td><td>No</td><td>1</td></tr><tr><td><code>scaleOutStep</code></td><td>The number of tasks to add at once when scaling out.</td><td>No</td><td>2</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="ingesting-from-multiple-topics">Ingesting from multiple topics<a href="#ingesting-from-multiple-topics" class="hash-link" aria-label="Direct link to Ingesting from multiple topics" title="Direct link to Ingesting from multiple topics"></a></h3><p>To ingest data from multiple topics, you have to set <code>topicPattern</code> in the supervisor I/O configuration and not set <code>topic</code>.
You can pass multiple topics as a regex pattern as the value for <code>topicPattern</code> in the I/O configuration. For example, to
ingest data from clicks and impressions, set <code>topicPattern</code> to <code>clicks|impressions</code> in the I/O configuration.
Similarly, you can use <code>metrics-.*</code> as the value for <code>topicPattern</code> if you want to ingest from all the topics that
start with <code>metrics-</code>. If new topics are added to the cluster that match the regex, Druid automatically starts
ingesting from those new topics. A topic name that only matches partially such as <code>my-metrics-12</code> will not be
included for ingestion. If you enable multi-topic ingestion for a datasource, downgrading to a version older than
28.0.0 will cause the ingestion for that datasource to fail.</p><p>When ingesting data from multiple topics, partitions are assigned based on the hashcode of the topic name and the
id of the partition within that topic. The partition assignment might not be uniform across all the tasks. It&#x27;s also
assumed that partitions across individual topics have similar load. It is recommended that you have a higher number of
partitions for a high load topic and a lower number of partitions for a low load topic. Assuming that you want to
ingest from both high and low load topic in the same supervisor.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="idle-supervisor-configuration">Idle supervisor configuration<a href="#idle-supervisor-configuration" class="hash-link" aria-label="Direct link to Idle supervisor configuration" title="Direct link to Idle supervisor configuration"></a></h2><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p> Note that idle state transitioning is currently designated as experimental.</p></div></div><table><thead><tr><th>Property</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td><code>enabled</code></td><td>If <code>true</code>, the supervisor becomes idle if there is no data on input stream/topic for some time.</td><td>No</td></tr><tr><td><code>inactiveAfterMillis</code></td><td>The supervisor becomes idle if all existing data has been read from input topic and no new data has been published for <code>inactiveAfterMillis</code> milliseconds.</td><td>No</td></tr></tbody></table><p>When the supervisor enters the idle state, no new tasks are launched subsequent to the completion of the currently executing tasks. This strategy may lead to reduced costs for cluster operators while using topics that get sporadic data.</p><p>The following example demonstrates supervisor spec with <code>lagBased</code> autoscaler and idle configuration enabled:</p><div class="language-json codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-json codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;type&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;kafka&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;spec&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;dataSchema&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> ...</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;ioConfig&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;topic&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;metrics&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;inputFormat&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;type&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;json&quot;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;consumerProperties&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;bootstrap.servers&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;localhost:9092&quot;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;autoScalerConfig&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;enableTaskAutoScaler&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;taskCountMax&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">6</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;taskCountMin&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">2</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;minTriggerScaleActionFrequencyMillis&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">600000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;autoScalerStrategy&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;lagBased&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;lagCollectionIntervalMillis&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">30000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;lagCollectionRangeMillis&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">600000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;scaleOutThreshold&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">6000000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;triggerScaleOutFractionThreshold&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">0.3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;scaleInThreshold&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">1000000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;triggerScaleInFractionThreshold&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">0.9</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;scaleActionStartDelayMillis&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">300000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;scaleActionPeriodMillis&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">60000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;scaleInStep&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;scaleOutStep&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">2</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;taskCount&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;replicas&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;taskDuration&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token string" style="color:rgb(195, 232, 141)">&quot;PT1H&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;idleConfig&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;enabled&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;inactiveAfterMillis&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">600000</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;tuningConfig&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> ...</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="consumer-properties">Consumer properties<a href="#consumer-properties" class="hash-link" aria-label="Direct link to Consumer properties" title="Direct link to Consumer properties"></a></h2><p>Consumer properties must contain a property <code>bootstrap.servers</code> with a list of Kafka brokers in the form: <code>&lt;BROKER_1&gt;:&lt;PORT_1&gt;,&lt;BROKER_2&gt;:&lt;PORT_2&gt;,...</code>.
By default, <code>isolation.level</code> is set to <code>read_committed</code>. If you use older versions of Kafka servers without transactions support or don&#x27;t want Druid to consume only committed transactions, set <code>isolation.level</code> to <code>read_uncommitted</code>.</p><p>In some cases, you may need to fetch consumer properties at runtime. For example, when <code>bootstrap.servers</code> is not known upfront, or is not static. To enable SSL connections, you must provide passwords for <code>keystore</code>, <code>truststore</code> and <code>key</code> secretly. You can provide configurations at runtime with a dynamic config provider implementation like the environment variable config provider that comes with Druid. For more information, see <a href="/docs/28.0.0/operations/dynamic-config-provider">Dynamic config provider</a>.</p><p>For example, if you are using SASL and SSL with Kafka, set the following environment variables for the Druid user on the machines running the Overlord and the Peon services:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">export KAFKA_JAAS_CONFIG=&quot;org.apache.kafka.common.security.plain.PlainLoginModule required username=&#x27;admin_user&#x27; password=&#x27;admin_password&#x27;;&quot;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">export SSL_KEY_PASSWORD=mysecretkeypassword</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">export SSL_KEYSTORE_PASSWORD=mysecretkeystorepassword</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">export SSL_TRUSTSTORE_PASSWORD=mysecrettruststorepassword</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain"> &quot;druid.dynamic.config.provider&quot;: {</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> &quot;type&quot;: &quot;environment&quot;,</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> &quot;variables&quot;: {</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> &quot;sasl.jaas.config&quot;: &quot;KAFKA_JAAS_CONFIG&quot;,</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> &quot;ssl.key.password&quot;: &quot;SSL_KEY_PASSWORD&quot;,</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> &quot;ssl.keystore.password&quot;: &quot;SSL_KEYSTORE_PASSWORD&quot;,</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> &quot;ssl.truststore.password&quot;: &quot;SSL_TRUSTSTORE_PASSWORD&quot;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> }</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> }</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> }</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Verify that you&#x27;ve changed the values for all configurations to match your own environment. You can use the environment variable config provider syntax in the <strong>Consumer properties</strong> field on the <strong>Connect tab</strong> in the <strong>Load Data</strong> UI in the web console. When connecting to Kafka, Druid replaces the environment variables with their corresponding values.</p><p>You can provide SSL connections with <a href="/docs/28.0.0/operations/password-provider">Password provider</a> interface to define the <code>keystore</code>, <code>truststore</code>, and <code>key</code>, but this feature is deprecated.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="specifying-data-format">Specifying data format<a href="#specifying-data-format" class="hash-link" aria-label="Direct link to Specifying data format" title="Direct link to Specifying data format"></a></h2><p>The Kafka indexing service supports both <a href="/docs/28.0.0/ingestion/data-formats#input-format"><code>inputFormat</code></a> and <a href="/docs/28.0.0/ingestion/data-formats#parser"><code>parser</code></a> to specify the data format.
Use the <code>inputFormat</code> to specify the data format for Kafka indexing service unless you need a format only supported by the legacy <code>parser</code>.</p><p>Druid supports the following input formats:</p><ul><li><code>csv</code></li><li><code>tsv</code></li><li><code>json</code></li><li><code>kafka</code></li><li><code>avro_stream</code></li><li><code>avro_ocf</code></li><li><code>protobuf</code></li></ul><p>For more information, see <a href="/docs/28.0.0/ingestion/data-formats">Data formats</a>. You can also read <a href="/docs/28.0.0/development/extensions-contrib/thrift"><code>thrift</code></a> formats using <code>parser</code>.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="supervisor-tuning-configuration">Supervisor tuning configuration<a href="#supervisor-tuning-configuration" class="hash-link" aria-label="Direct link to Supervisor tuning configuration" title="Direct link to Supervisor tuning configuration"></a></h2><p>The <code>tuningConfig</code> object is optional. If you don&#x27;t specify the <code>tuningConfig</code> object, Druid uses the default configuration settings.</p><table><thead><tr><th>Property</th><th>Type</th><th>Description</th><th>Required</th><th>Default</th></tr></thead><tbody><tr><td><code>type</code></td><td>String</td><td>The indexing task type. This should always be <code>kafka</code>.</td><td>Yes</td><td></td></tr><tr><td><code>maxRowsInMemory</code></td><td>Integer</td><td>The number of rows to aggregate before persisting. This number represents the post-aggregation rows. It is not equivalent to the number of input events, but the resulting number of aggregated rows. Druid uses <code>maxRowsInMemory</code> to manage the required JVM heap size. The maximum heap memory usage for indexing scales is <code>maxRowsInMemory * (2 + maxPendingPersists)</code>. Normally, you do not need to set this, but depending on the nature of data, if rows are short in terms of bytes, you may not want to store a million rows in memory and this value should be set.</td><td>No</td><td>150000</td></tr><tr><td><code>maxBytesInMemory</code></td><td>Long</td><td>The number of bytes to aggregate in heap memory before persisting. This is based on a rough estimate of memory usage and not actual usage. Normally, this is computed internally. The maximum heap memory usage for indexing is <code>maxBytesInMemory * (2 + maxPendingPersists)</code>.</td><td>No</td><td>One-sixth of max JVM memory</td></tr><tr><td><code>skipBytesInMemoryOverheadCheck</code></td><td>Boolean</td><td>The calculation of <code>maxBytesInMemory</code> takes into account overhead objects created during ingestion and each intermediate persist. To exclude the bytes of these overhead objects from the <code>maxBytesInMemory</code> check, set <code>skipBytesInMemoryOverheadCheck</code> to <code>true</code>.</td><td>No</td><td><code>false</code></td></tr><tr><td><code>maxRowsPerSegment</code></td><td>Integer</td><td>The number of rows to store in a segment. This number is post-aggregation rows. Handoff occurs when <code>maxRowsPerSegment</code> or <code>maxTotalRows</code> is reached or every <code>intermediateHandoffPeriod</code>, whichever happens first.</td><td>No</td><td>5000000</td></tr><tr><td><code>maxTotalRows</code></td><td>Long</td><td>The number of rows to aggregate across all segments; this number is post-aggregation rows. Handoff happens either if <code>maxRowsPerSegment</code> or <code>maxTotalRows</code> is reached or every <code>intermediateHandoffPeriod</code>, whichever happens earlier.</td><td>No</td><td>20000000</td></tr><tr><td><code>intermediateHandoffPeriod</code></td><td>ISO 8601 period</td><td>The period that determines how often tasks hand off segments. Handoff occurs if <code>maxRowsPerSegment</code> or <code>maxTotalRows</code> is reached or every <code>intermediateHandoffPeriod</code>, whichever happens first.</td><td>No</td><td>P2147483647D</td></tr><tr><td><code>intermediatePersistPeriod</code></td><td>ISO 8601 period</td><td>The period that determines the rate at which intermediate persists occur.</td><td>No</td><td>PT10M</td></tr><tr><td><code>maxPendingPersists</code></td><td>Integer</td><td>Maximum number of persists that can be pending but not started. If a new intermediate persist exceeds this limit, Druid blocks ingestion until the currently running persist finishes. One persist can be running concurrently with ingestion, and none can be queued up. The maximum heap memory usage for indexing scales is <code>maxRowsInMemory * (2 + maxPendingPersists)</code>.</td><td>No</td><td>0</td></tr><tr><td><code>indexSpec</code></td><td>Object</td><td>Defines how Druid indexes the data. See <a href="#indexspec">IndexSpec</a> for more information.</td><td>No</td><td></td></tr><tr><td><code>indexSpecForIntermediatePersists</code></td><td>Object</td><td>Defines segment storage format options to use at indexing time for intermediate persisted temporary segments. You can use <code>indexSpecForIntermediatePersists</code> to disable dimension/metric compression on intermediate segments to reduce memory required for final merging. However, disabling compression on intermediate segments might increase page cache use while they are used before getting merged into final segment published. See <a href="#indexspec">IndexSpec</a> for possible values.</td><td>No</td><td>Same as <code>indexSpec</code></td></tr><tr><td><code>reportParseExceptions</code></td><td>Boolean</td><td>DEPRECATED. If <code>true</code>, Druid throws exceptions encountered during parsing causing ingestion to halt. If <code>false</code>, Druid skips unparseable rows and fields. Setting <code>reportParseExceptions</code> to <code>true</code> overrides existing configurations for <code>maxParseExceptions</code> and <code>maxSavedParseExceptions</code>, setting <code>maxParseExceptions</code> to 0 and limiting <code>maxSavedParseExceptions</code> to not more than 1.</td><td>No</td><td><code>false</code></td></tr><tr><td><code>handoffConditionTimeout</code></td><td>Long</td><td>Number of milliseconds to wait for segment handoff. Set to a value &gt;= 0, where 0 means to wait indefinitely.</td><td>No</td><td>900000 (15 minutes)</td></tr><tr><td><code>resetOffsetAutomatically</code></td><td>Boolean</td><td>Controls behavior when Druid needs to read Kafka messages that are no longer available, when <code>offsetOutOfRangeException</code> is encountered.<br>If <code>false</code>, the exception bubbles up causing tasks to fail and ingestion to halt. If this occurs, manual intervention is required to correct the situation, potentially using the <a href="/docs/28.0.0/api-reference/supervisor-api">Reset Supervisor API</a>. This mode is useful for production, since it will make you aware of issues with ingestion.<br>If <code>true</code>, Druid will automatically reset to the earlier or latest offset available in Kafka, based on the value of the <code>useEarliestOffset</code> property (earliest if <code>true</code>, latest if <code>false</code>). Note that this can lead to dropping data (if <code>useEarliestSequenceNumber</code> is <code>false</code>) or duplicating data (if <code>useEarliestSequenceNumber</code> is <code>true</code>) without your knowledge. Druid logs messages indicating that a reset has occurred without interrupting ingestion. This mode is useful for non-production situations since it enables Druid to recover from problems automatically, even if they lead to quiet dropping or duplicating of data. This feature behaves similarly to the Kafka <code>auto.offset.reset</code> consumer property.</td><td>No</td><td><code>false</code></td></tr><tr><td><code>workerThreads</code></td><td>Integer</td><td>The number of threads that the supervisor uses to handle requests/responses for worker tasks, along with any other internal asynchronous operation.</td><td>No</td><td><code>min(10, taskCount)</code></td></tr><tr><td><code>chatAsync</code></td><td>Boolean</td><td>If <code>true</code>, use asynchronous communication with indexing tasks, and ignore the <code>chatThreads</code> parameter. If <code>false</code>, use synchronous communication in a thread pool of size <code>chatThreads</code>.</td><td>No</td><td><code>true</code></td></tr><tr><td><code>chatThreads</code></td><td>Integer</td><td>The number of threads to use for communicating with indexing tasks. Ignored if <code>chatAsync</code> is <code>true</code>.</td><td>No</td><td><code>min(10, taskCount * replicas)</code></td></tr><tr><td><code>chatRetries</code></td><td>Integer</td><td>The number of times HTTP requests to indexing tasks are retried before considering tasks unresponsive.</td><td>No</td><td>8</td></tr><tr><td><code>httpTimeout</code></td><td>ISO 8601 period</td><td>The period of time to wait for a HTTP response from an indexing task.</td><td>No</td><td>PT10S</td></tr><tr><td><code>shutdownTimeout</code></td><td>ISO 8601 period</td><td>The period of time to wait for the supervisor to attempt a graceful shutdown of tasks before exiting.</td><td>No</td><td>PT80S</td></tr><tr><td><code>offsetFetchPeriod</code></td><td>ISO 8601 period</td><td>Determines how often the supervisor queries Kafka and the indexing tasks to fetch current offsets and calculate lag. If the user-specified value is below the minimum value of <code>PT5S</code>, the supervisor ignores the value and uses the minimum value instead.</td><td>No</td><td>PT30S</td></tr><tr><td><code>segmentWriteOutMediumFactory</code></td><td>Object</td><td>The segment write-out medium to use when creating segments. See <a href="/docs/28.0.0/configuration/#segmentwriteoutmediumfactory">Additional Peon configuration: SegmentWriteOutMediumFactory</a> for explanation and available options.</td><td>No</td><td>If not specified, Druid uses the value from <code>druid.peon.defaultSegmentWriteOutMediumFactory.type</code>.</td></tr><tr><td><code>logParseExceptions</code></td><td>Boolean</td><td>If <code>true</code>, Druid logs an error message when a parsing exception occurs, containing information about the row where the error occurred.</td><td>No</td><td><code>false</code></td></tr><tr><td><code>maxParseExceptions</code></td><td>Integer</td><td>The maximum number of parse exceptions that can occur before the task halts ingestion and fails. Overridden if <code>reportParseExceptions</code> is set.</td><td>No</td><td>unlimited</td></tr><tr><td><code>maxSavedParseExceptions</code></td><td>Integer</td><td>When a parse exception occurs, Druid keeps track of the most recent parse exceptions. <code>maxSavedParseExceptions</code> limits the number of saved exception instances. These saved exceptions are available after the task finishes in the <a href="/docs/28.0.0/ingestion/tasks#task-reports">task completion report</a>. Overridden if <code>reportParseExceptions</code> is set.</td><td>No</td><td>0</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="indexspec">IndexSpec<a href="#indexspec" class="hash-link" aria-label="Direct link to IndexSpec" title="Direct link to IndexSpec"></a></h3><p>The following table outlines the configuration options for <code>indexSpec</code>:</p><table><thead><tr><th>Property</th><th>Type</th><th>Description</th><th>Required</th><th>Default</th></tr></thead><tbody><tr><td><code>bitmap</code></td><td>Object</td><td>Compression format for bitmap indexes. Druid supports roaring and concise bitmap types.</td><td>No</td><td>Roaring</td></tr><tr><td><code>dimensionCompression</code></td><td>String</td><td>Compression format for dimension columns. Choose from <code>LZ4</code>, <code>LZF</code>, <code>ZSTD</code> or <code>uncompressed</code>.</td><td>No</td><td><code>LZ4</code></td></tr><tr><td><code>metricCompression</code></td><td>String</td><td>Compression format for primitive type metric columns. Choose from <code>LZ4</code>, <code>LZF</code>, <code>ZSTD</code>, <code>uncompressed</code> or <code>none</code>.</td><td>No</td><td><code>LZ4</code></td></tr><tr><td><code>longEncoding</code></td><td>String</td><td>Encoding format for metric and dimension columns with type long. Choose from <code>auto</code> or <code>longs</code>. <code>auto</code> encodes the values using offset or lookup table depending on column cardinality, and store them with variable size. <code>longs</code> stores the value as is with 8 bytes each.</td><td>No</td><td><code>longs</code></td></tr></tbody></table></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/28.0.0/development/extensions-core/kafka-ingestion"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Apache Kafka ingestion</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/docs/28.0.0/development/extensions-core/kafka-supervisor-operations"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Apache Kafka operations</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#supervisor-io-configuration" class="table-of-contents__link toc-highlight">Supervisor I/O configuration</a><ul><li><a href="#task-autoscaler-properties" class="table-of-contents__link toc-highlight">Task autoscaler properties</a></li><li><a href="#lag-based-autoscaler-strategy-related-properties" class="table-of-contents__link toc-highlight">Lag based autoscaler strategy related properties</a></li><li><a href="#ingesting-from-multiple-topics" class="table-of-contents__link toc-highlight">Ingesting from multiple topics</a></li></ul></li><li><a href="#idle-supervisor-configuration" class="table-of-contents__link toc-highlight">Idle supervisor configuration</a></li><li><a href="#consumer-properties" class="table-of-contents__link toc-highlight">Consumer properties</a></li><li><a href="#specifying-data-format" class="table-of-contents__link toc-highlight">Specifying data format</a></li><li><a href="#supervisor-tuning-configuration" class="table-of-contents__link toc-highlight">Supervisor tuning configuration</a><ul><li><a href="#indexspec" class="table-of-contents__link toc-highlight">IndexSpec</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer"><div class="container container-fluid"><div class="footer__bottom text--center"><div class="margin-bottom--sm"><img src="/img/favicon.png" class="themedImage_ToTc themedImage--light_HNdA footer__logo"><img src="/img/favicon.png" class="themedImage_ToTc themedImage--dark_i4oU footer__logo"></div><div class="footer__copyright">Copyright © 2023 Apache Software Foundation. Except where otherwise noted, licensed under CC BY-SA 4.0. Apache Druid, Druid, and the Druid logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries.</div></div></div></footer></div>
<script src="/assets/js/runtime~main.0dcbfdea.js"></script>
<script src="/assets/js/main.7f6fdf81.js"></script>
</body>
</html>