[{"data":1,"prerenderedAt":1296},["ShallowReactive",2],{"navigation":3,"\u002Fdocs\u002Fruntime\u002Fpause-unpause":314,"\u002Fdocs\u002Fruntime\u002Fpause-unpause-surround":1291},[4,38,86,149,176,219,257,273],{"title":5,"path":6,"stem":7,"children":8,"icon":37},"Getting Started","\u002Fdocs\u002Fgetting-started","1.docs\u002F1.getting-started\u002F1.index",[9,12,17,22,27,32],{"title":10,"path":6,"stem":7,"icon":11},"Getting started","i-lucide-flag",{"title":13,"path":14,"stem":15,"icon":16},"Modules overview","\u002Fdocs\u002Fgetting-started\u002Fmodules-overview","1.docs\u002F1.getting-started\u002F2.modules-overview","i-lucide-boxes",{"title":18,"path":19,"stem":20,"icon":21},"Installation","\u002Fdocs\u002Fgetting-started\u002Finstallation","1.docs\u002F1.getting-started\u002F3.installation","i-lucide-download",{"title":23,"path":24,"stem":25,"icon":26},"License configuration","\u002Fdocs\u002Fgetting-started\u002Flicense-configuration","1.docs\u002F1.getting-started\u002F4.license-configuration","i-lucide-key-round",{"title":28,"path":29,"stem":30,"icon":31},"Your first app","\u002Fdocs\u002Fgetting-started\u002Ffirst-app","1.docs\u002F1.getting-started\u002F5.first-app","i-lucide-square-play",{"title":33,"path":34,"stem":35,"icon":36},"Project setup","\u002Fdocs\u002Fgetting-started\u002Fproject-setup","1.docs\u002F1.getting-started\u002F6.project-setup","i-lucide-package",false,{"title":39,"path":40,"stem":41,"children":42,"icon":45},"Core Concepts","\u002Fdocs\u002Fconcepts","1.docs\u002F2.concepts\u002F1.index",[43,46,51,56,61,66,71,76,81],{"title":44,"path":40,"stem":41,"icon":45},"Core concepts","i-lucide-book-open",{"title":47,"path":48,"stem":49,"icon":50},"Architecture","\u002Fdocs\u002Fconcepts\u002Farchitecture","1.docs\u002F2.concepts\u002F2.architecture","i-lucide-layers",{"title":52,"path":53,"stem":54,"icon":55},"Exactly-once semantics","\u002Fdocs\u002Fconcepts\u002Fexactly-once","1.docs\u002F2.concepts\u002F3.exactly-once","i-lucide-shield-check",{"title":57,"path":58,"stem":59,"icon":60},"Lanes and parallelism","\u002Fdocs\u002Fconcepts\u002Flanes-and-parallelism","1.docs\u002F2.concepts\u002F4.lanes-and-parallelism","i-lucide-split",{"title":62,"path":63,"stem":64,"icon":65},"State and thread-safety","\u002Fdocs\u002Fconcepts\u002Fstate-and-thread-safety","1.docs\u002F2.concepts\u002F5.state-and-thread-safety","i-lucide-lock",{"title":67,"path":68,"stem":69,"icon":70},"Event time and watermarks","\u002Fdocs\u002Fconcepts\u002Fevent-time-and-watermarks","1.docs\u002F2.concepts\u002F6.event-time-and-watermarks","i-lucide-clock",{"title":72,"path":73,"stem":74,"icon":75},"The configuration model","\u002Fdocs\u002Fconcepts\u002Fconfiguration-model","1.docs\u002F2.concepts\u002F7.configuration-model","i-lucide-sliders-horizontal",{"title":77,"path":78,"stem":79,"icon":80},"The error-handling model","\u002Fdocs\u002Fconcepts\u002Ferror-handling-model","1.docs\u002F2.concepts\u002F8.error-handling-model","i-lucide-triangle-alert",{"title":82,"path":83,"stem":84,"icon":85},"How StoatFlow differs from Kafka Streams","\u002Fdocs\u002Fconcepts\u002Fhow-stoatflow-differs-from-ks","1.docs\u002F2.concepts\u002F9.how-stoatflow-differs-from-ks","i-lucide-arrow-left-right",{"title":87,"path":88,"stem":89,"children":90,"icon":93},"Building Topologies","\u002Fdocs\u002Fbuilding","1.docs\u002F3.building\u002F1.index",[91,94,99,104,109,114,119,124,129,134,139,144],{"title":92,"path":88,"stem":89,"icon":93},"Building topologies","i-lucide-blocks",{"title":95,"path":96,"stem":97,"icon":98},"Error handling and DLQ","\u002Fdocs\u002Fbuilding\u002Ferror-handling-dlq","1.docs\u002F3.building\u002F10.error-handling-dlq","i-lucide-circle-x",{"title":100,"path":101,"stem":102,"icon":103},"State stores","\u002Fdocs\u002Fbuilding\u002Fstate-stores","1.docs\u002F3.building\u002F11.state-stores","i-lucide-database",{"title":105,"path":106,"stem":107,"icon":108},"Testing topologies","\u002Fdocs\u002Fbuilding\u002Ftesting","1.docs\u002F3.building\u002F12.testing","i-lucide-flask-conical",{"title":110,"path":111,"stem":112,"icon":113},"Sources and sinks","\u002Fdocs\u002Fbuilding\u002Fstreams-builder","1.docs\u002F3.building\u002F2.streams-builder","i-lucide-import",{"title":115,"path":116,"stem":117,"icon":118},"KStream and KTable operations","\u002Fdocs\u002Fbuilding\u002Fkstream-ktable","1.docs\u002F3.building\u002F3.kstream-ktable","i-lucide-waypoints",{"title":120,"path":121,"stem":122,"icon":123},"Aggregations","\u002Fdocs\u002Fbuilding\u002Faggregations","1.docs\u002F3.building\u002F4.aggregations","i-lucide-sigma",{"title":125,"path":126,"stem":127,"icon":128},"Windowing","\u002Fdocs\u002Fbuilding\u002Fwindowing","1.docs\u002F3.building\u002F5.windowing","i-lucide-calendar-clock",{"title":130,"path":131,"stem":132,"icon":133},"Joins","\u002Fdocs\u002Fbuilding\u002Fjoins","1.docs\u002F3.building\u002F6.joins","i-lucide-git-merge",{"title":135,"path":136,"stem":137,"icon":138},"The Processor API","\u002Fdocs\u002Fbuilding\u002Fprocessor-api","1.docs\u002F3.building\u002F7.processor-api","i-lucide-cpu",{"title":140,"path":141,"stem":142,"icon":143},"Scheduled sources","\u002Fdocs\u002Fbuilding\u002Fscheduled-sources","1.docs\u002F3.building\u002F8.scheduled-sources","i-lucide-timer",{"title":145,"path":146,"stem":147,"icon":148},"Serdes and Avro","\u002Fdocs\u002Fbuilding\u002Fserdes","1.docs\u002F3.building\u002F9.serdes","i-lucide-binary",{"title":150,"path":151,"stem":152,"children":153,"icon":75},"Configuration","\u002Fdocs\u002Fconfiguration","1.docs\u002F4.configuration\u002F1.index",[154,156,161,166,171],{"title":155,"path":151,"stem":152,"icon":75},"How configuration works",{"title":157,"path":158,"stem":159,"icon":160},"Engine configuration (:core)","\u002Fdocs\u002Fconfiguration\u002Fcore-config","1.docs\u002F4.configuration\u002F2.core-config","i-lucide-settings-2",{"title":162,"path":163,"stem":164,"icon":165},"Runtime configuration (:runtime)","\u002Fdocs\u002Fconfiguration\u002Fruntime-config","1.docs\u002F4.configuration\u002F3.runtime-config","i-lucide-server-cog",{"title":167,"path":168,"stem":169,"icon":170},"Defaults, adaptivity, and presets","\u002Fdocs\u002Fconfiguration\u002Fdefaults-and-presets","1.docs\u002F4.configuration\u002F4.defaults-and-presets","i-lucide-gauge",{"title":172,"path":173,"stem":174,"icon":175},"Kafka client configuration","\u002Fdocs\u002Fconfiguration\u002Fkafka-client-config","1.docs\u002F4.configuration\u002F5.kafka-client-config","i-lucide-plug",{"title":177,"path":178,"stem":179,"children":180,"icon":183},"Running in Production","\u002Fdocs\u002Fruntime","1.docs\u002F5.runtime\u002F1.index",[181,184,189,194,199,204,209,214],{"title":182,"path":178,"stem":179,"icon":183},"The runtime","i-lucide-server",{"title":185,"path":186,"stem":187,"icon":188},"The REST API","\u002Fdocs\u002Fruntime\u002Frest-api","1.docs\u002F5.runtime\u002F2.rest-api","i-lucide-globe",{"title":190,"path":191,"stem":192,"icon":193},"Health checks","\u002Fdocs\u002Fruntime\u002Fhealth-checks","1.docs\u002F5.runtime\u002F3.health-checks","i-lucide-heart-pulse",{"title":195,"path":196,"stem":197,"icon":198},"Metrics","\u002Fdocs\u002Fruntime\u002Fmetrics","1.docs\u002F5.runtime\u002F4.metrics","i-lucide-activity",{"title":200,"path":201,"stem":202,"icon":203},"Pause and resume","\u002Fdocs\u002Fruntime\u002Fpause-unpause","1.docs\u002F5.runtime\u002F5.pause-unpause","i-lucide-pause",{"title":205,"path":206,"stem":207,"icon":208},"Plugins and lifecycle hooks","\u002Fdocs\u002Fruntime\u002Fplugins","1.docs\u002F5.runtime\u002F6.plugins","i-lucide-puzzle",{"title":210,"path":211,"stem":212,"icon":213},"Docker images","\u002Fdocs\u002Fruntime\u002Fdocker","1.docs\u002F5.runtime\u002F7.docker","i-lucide-container",{"title":215,"path":216,"stem":217,"icon":218},"GraalVM native image","\u002Fdocs\u002Fruntime\u002Fnative-image","1.docs\u002F5.runtime\u002F8.native-image","i-lucide-zap",{"title":220,"path":221,"stem":222,"children":223,"icon":226},"Deploying & Operating","\u002Fdocs\u002Foperating","1.docs\u002F6.operating\u002F1.index",[224,227,232,237,242,247,252],{"title":225,"path":221,"stem":222,"icon":226},"Deploying and operating","i-lucide-life-buoy",{"title":228,"path":229,"stem":230,"icon":231},"Running on Kubernetes","\u002Fdocs\u002Foperating\u002Fkubernetes","1.docs\u002F6.operating\u002F2.kubernetes","i-lucide-ship",{"title":233,"path":234,"stem":235,"icon":236},"High availability","\u002Fdocs\u002Foperating\u002Fhigh-availability","1.docs\u002F6.operating\u002F3.high-availability","i-lucide-copy",{"title":238,"path":239,"stem":240,"icon":241},"Liveness and readiness probes","\u002Fdocs\u002Foperating\u002Fprobes","1.docs\u002F6.operating\u002F4.probes","i-lucide-stethoscope",{"title":243,"path":244,"stem":245,"icon":246},"Observability","\u002Fdocs\u002Foperating\u002Fobservability","1.docs\u002F6.operating\u002F5.observability","i-lucide-telescope",{"title":248,"path":249,"stem":250,"icon":251},"Tuning under load","\u002Fdocs\u002Foperating\u002Ftuning","1.docs\u002F6.operating\u002F6.tuning","i-lucide-sliders",{"title":253,"path":254,"stem":255,"icon":256},"Production checklist","\u002Fdocs\u002Foperating\u002Fproduction-checklist","1.docs\u002F6.operating\u002F7.production-checklist","i-lucide-clipboard-check",{"title":258,"path":259,"stem":260,"children":261,"icon":85},"Migrating from Kafka Streams","\u002Fdocs\u002Fmigration","1.docs\u002F7.migration\u002F1.index",[262,263,268],{"title":258,"path":259,"stem":260,"icon":85},{"title":264,"path":265,"stem":266,"icon":267},"Migration without carrying state","\u002Fdocs\u002Fmigration\u002Fwithout-data-migration","1.docs\u002F7.migration\u002F2.without-data-migration","i-lucide-sparkles",{"title":269,"path":270,"stem":271,"icon":272},"Migration carrying state","\u002Fdocs\u002Fmigration\u002Fwith-data-migration","1.docs\u002F7.migration\u002F3.with-data-migration","i-lucide-database-backup",{"title":274,"path":275,"stem":276,"children":277,"icon":279},"Reference","\u002Fdocs\u002Freference","1.docs\u002F8.reference\u002F1.index",[278,280,285,290,295,300,305,309],{"title":274,"path":275,"stem":276,"icon":279},"i-lucide-list",{"title":281,"path":282,"stem":283,"icon":284},"Configuration reference","\u002Fdocs\u002Freference\u002Fconfiguration-reference","1.docs\u002F8.reference\u002F2.configuration-reference","i-lucide-table",{"title":286,"path":287,"stem":288,"icon":289},"REST API reference","\u002Fdocs\u002Freference\u002Frest-api-reference","1.docs\u002F8.reference\u002F3.rest-api-reference","i-lucide-network",{"title":291,"path":292,"stem":293,"icon":294},"Gradle plugin reference","\u002Fdocs\u002Freference\u002Fgradle-plugin-reference","1.docs\u002F8.reference\u002F4.gradle-plugin-reference","i-lucide-box",{"title":296,"path":297,"stem":298,"icon":299},"Maven reference","\u002Fdocs\u002Freference\u002Fmaven-reference","1.docs\u002F8.reference\u002F5.maven-reference","i-simple-icons-apachemaven",{"title":301,"path":302,"stem":303,"icon":304},"Kafka Streams compatibility matrix","\u002Fdocs\u002Freference\u002Fks-compatibility-matrix","1.docs\u002F8.reference\u002F6.ks-compatibility-matrix","i-lucide-table-2",{"title":306,"path":307,"stem":308,"icon":170},"Metrics reference","\u002Fdocs\u002Freference\u002Fmetrics-reference","1.docs\u002F8.reference\u002F7.metrics-reference",{"title":310,"path":311,"stem":312,"icon":313},"Glossary","\u002Fdocs\u002Freference\u002Fglossary","1.docs\u002F8.reference\u002F8.glossary","i-lucide-book-a",{"id":315,"title":200,"body":316,"description":1284,"extension":1285,"meta":1286,"navigation":1287,"pageType":1288,"path":201,"seo":1289,"stem":202,"__hash__":1290},"docs\u002F1.docs\u002F5.runtime\u002F5.pause-unpause.md",{"type":317,"value":318,"toc":1271},"minimark",[319,323,363,368,371,390,400,412,416,422,430,439,443,451,504,515,529,533,548,555,584,646,670,676,692,745,759,763,766,901,908,912,936,1149,1173,1208,1212,1226,1232,1236,1267],[320,321,322],"p",{},"Pause stops the instance from dispatching new records and tracking new offsets, while keeping the consumer session alive and the lane threads warm — so you can resume instantly. It's a runtime control for short operational gaps (a maintenance window on a downstream system, transient backpressure), not a substitute for shutting the instance down.",[324,325,326],"tldr-panel",{},[327,328,329,342,351,357],"ul",{},[330,331,332,336,337,341],"li",{},[333,334,335],"strong",{},"Pause:"," ",[338,339,340],"code",{},"curl -X POST localhost:8080\u002Fpause"," — drains in-flight work, commits it, then sits idle without consuming new records.",[330,343,344,336,347,350],{},[333,345,346],{},"Resume:",[338,348,349],{},"curl -X POST localhost:8080\u002Funpause"," — picks up exactly where it left off.",[330,352,353,356],{},[333,354,355],{},"While paused:"," liveness stays UP, readiness goes DOWN. The Kafka consumer keeps heartbeating, so no rebalance and no restart.",[330,358,359,362],{},[333,360,361],{},"Use it for:"," a downstream system that's temporarily unavailable, or a quick maintenance task — anything where a full stop\u002Fstart is heavier than you want.",[364,365,367],"h2",{"id":366},"what-pause-does","What pause does",[320,369,370],{},"Calling pause moves the instance through two states:",[372,373,374,382],"ol",{},[330,375,376,381],{},[333,377,378],{},[338,379,380],{},"DRAINING"," — record dispatch stops immediately. No new records are handed to processing; timers and punctuators are paused; records already consumed but not yet dispatched are held, not dropped. Work already in flight finishes, and a final commit flushes that work and its offsets. This is a graceful drain — nothing in flight is dropped.",[330,383,384,389],{},[333,385,386],{},[338,387,388],{},"PAUSED"," — reached automatically once the in-flight work has drained and committed. The instance now sits idle: the Kafka consumer keeps polling for heartbeats (so the group membership and session stay alive), processing threads stay warm and ready, but no new records are consumed and no new offsets are tracked.",[320,391,392,393,396,397,399],{},"Because the consumer keeps heartbeating, pausing does ",[333,394,395],{},"not"," trigger a consumer-group rebalance and does ",[333,398,395],{}," require a restart. Resume is near-instant — the threads never went cold.",[401,402,405],"callout",{"color":403,"icon":404},"info","i-lucide-info",[320,406,407,408,411],{},"Pause is in-memory state, not persisted. If the process restarts while paused, it comes back up in the normal ",[338,409,410],{},"RUNNING"," flow and resumes processing — there is no \"stays paused across restarts\" behaviour.",[364,413,415],{"id":414},"what-unpause-does","What unpause does",[320,417,418,419,421],{},"Unpause returns the instance to ",[338,420,410],{},":",[327,423,424,427],{},[330,425,426],{},"Record dispatch resumes — any held records drain back into processing and consumption continues.",[330,428,429],{},"Timers and punctuators resume.",[320,431,432,433,435,436,438],{},"You can call unpause from either ",[338,434,388],{}," (resume after the drain finished) or ",[338,437,380],{}," (cancel the drain that's still in progress and resume immediately).",[364,440,442],{"id":441},"pause-and-readiness","Pause and readiness",[320,444,445,446,448,449,421],{},"This is the key operational interaction. While the instance is ",[338,447,380],{}," or ",[338,450,388],{},[452,453,454,470],"table",{},[455,456,457],"thead",{},[458,459,460,464,467],"tr",{},[461,462,463],"th",{},"Probe",[461,465,466],{},"State",[461,468,469],{},"Meaning",[471,472,473,489],"tbody",{},[458,474,475,481,486],{},[476,477,478],"td",{},[338,479,480],{},"\u002Fhealth\u002Flive",[476,482,483],{},[333,484,485],{},"UP",[476,487,488],{},"The process is healthy — do not restart it.",[458,490,491,496,501],{},[476,492,493],{},[338,494,495],{},"\u002Fhealth\u002Fready",[476,497,498],{},[333,499,500],{},"DOWN",[476,502,503],{},"The instance is intentionally not taking traffic.",[320,505,506,507,510,511,514],{},"Liveness staying UP is deliberate: a paused instance is working as intended, so an orchestrator must not kill and restart it. Readiness going DOWN reflects that it isn't processing. See ",[508,509,190],"a",{"href":191}," and ",[508,512,513],{"href":239},"Probes"," for how Kubernetes consumes these.",[401,516,518],{"color":517,"icon":80},"warning",[320,519,520,521,524,525,528],{},"StoatFlow runs as a ",[333,522,523],{},"single active instance"," — there is no second replica to pick up traffic while this one is paused. Pausing halts the pipeline; consumer lag will grow on the source topics for as long as you stay paused. Pause is for short, deliberate gaps, not load shedding. (Even with ",[508,526,527],{"href":234},"hot standby"," enabled, pausing the active does not promote the standby — pause is a deliberate stop, not a failover.)",[364,530,532],{"id":531},"the-endpoints","The endpoints",[320,534,535,536,539,540,543,544,547],{},"Both endpoints are ",[338,537,538],{},"POST"," and take no body. They're served by the runtime's HTTP server (",[338,541,542],{},"runtime.http.enabled",", default port ",[338,545,546],{},"8080",").",[549,550,552],"h3",{"id":551},"post-pause",[338,553,554],{},"POST \u002Fpause",[556,557,562],"pre",{"className":558,"code":559,"language":560,"meta":561,"style":561},"language-bash shiki shiki-themes vitesse-light","curl -X POST localhost:8080\u002Fpause\n","bash","",[338,563,564],{"__ignoreMap":561},[565,566,569,573,577,581],"span",{"class":567,"line":568},"line",1,[565,570,572],{"class":571},"sySUi","curl",[565,574,576],{"class":575},"sEi1f"," -X",[565,578,580],{"class":579},"spphp"," POST",[565,582,583],{"class":579}," localhost:8080\u002Fpause\n",[452,585,586,599],{},[455,587,588],{},[458,589,590,593,596],{},[461,591,592],{},"Response",[461,594,595],{},"Code",[461,597,598],{},"Body",[471,600,601,616,631],{},[458,602,603,606,611],{},[476,604,605],{},"Pause initiated",[476,607,608],{},[338,609,610],{},"200",[476,612,613],{},[338,614,615],{},"{\"status\":\"pausing\",\"state\":\"DRAINING\"}",[458,617,618,621,626],{},[476,619,620],{},"Wrong state",[476,622,623],{},[338,624,625],{},"400",[476,627,628],{},[338,629,630],{},"{\"error\":\"Cannot pause from state ...\"}",[458,632,633,636,641],{},[476,634,635],{},"Not initialized yet",[476,637,638],{},[338,639,640],{},"503",[476,642,643],{},[338,644,645],{},"{\"error\":\"StoatFlow not initialized\"}",[320,647,648,649,651,652,654,655,657,658,660,661,663,664,669],{},"Pause is only valid from ",[338,650,410],{},". Calling it during startup, while already paused, or while shutting down returns ",[338,653,625],{},". The ",[338,656,610],{}," response reports ",[338,659,380],{}," — the instance reaches ",[338,662,388],{}," a moment later once the drain completes; poll ",[508,665,666],{"href":186},[338,667,668],{},"\u002Fstate"," to confirm.",[549,671,673],{"id":672},"post-unpause",[338,674,675],{},"POST \u002Funpause",[556,677,679],{"className":558,"code":678,"language":560,"meta":561,"style":561},"curl -X POST localhost:8080\u002Funpause\n",[338,680,681],{"__ignoreMap":561},[565,682,683,685,687,689],{"class":567,"line":568},[565,684,572],{"class":571},[565,686,576],{"class":575},[565,688,580],{"class":579},[565,690,691],{"class":579}," localhost:8080\u002Funpause\n",[452,693,694,704],{},[455,695,696],{},[458,697,698,700,702],{},[461,699,592],{},[461,701,595],{},[461,703,598],{},[471,705,706,720,733],{},[458,707,708,711,715],{},[476,709,710],{},"Resumed",[476,712,713],{},[338,714,610],{},[476,716,717],{},[338,718,719],{},"{\"status\":\"resumed\",\"state\":\"RUNNING\"}",[458,721,722,724,728],{},[476,723,620],{},[476,725,726],{},[338,727,625],{},[476,729,730],{},[338,731,732],{},"{\"error\":\"Cannot unpause from state ...\"}",[458,734,735,737,741],{},[476,736,635],{},[476,738,739],{},[338,740,640],{},[476,742,743],{},[338,744,645],{},[320,746,747,748,448,750,752,753,755,756,758],{},"Unpause is valid from ",[338,749,388],{},[338,751,380],{},". Calling it from ",[338,754,410],{}," (or any other state) returns ",[338,757,625],{},".",[364,760,762],{"id":761},"a-maintenance-sequence","A maintenance sequence",[320,764,765],{},"A typical \"pause, do something, resume\" loop using the HTTP API:",[556,767,769],{"className":558,"code":768,"language":560,"meta":561,"style":561},"# 1. Pause and watch it settle into PAUSED\ncurl -X POST localhost:8080\u002Fpause\n#    -> {\"status\":\"pausing\",\"state\":\"DRAINING\"}\n\n# 2. Wait until it's fully drained (readiness flips DOWN; \u002Fstate shows PAUSED)\nuntil curl -s localhost:8080\u002Fstate | grep -q '\"PAUSED\"'; do sleep 1; done\n\n# ... perform maintenance on the downstream system ...\n\n# 3. Resume\ncurl -X POST localhost:8080\u002Funpause\n#    -> {\"status\":\"resumed\",\"state\":\"RUNNING\"}\n",[338,770,771,777,788,794,801,807,862,867,873,878,884,895],{"__ignoreMap":561},[565,772,773],{"class":567,"line":568},[565,774,776],{"class":775},"s8zF2","# 1. Pause and watch it settle into PAUSED\n",[565,778,780,782,784,786],{"class":567,"line":779},2,[565,781,572],{"class":571},[565,783,576],{"class":575},[565,785,580],{"class":579},[565,787,583],{"class":579},[565,789,791],{"class":567,"line":790},3,[565,792,793],{"class":775},"#    -> {\"status\":\"pausing\",\"state\":\"DRAINING\"}\n",[565,795,797],{"class":567,"line":796},4,[565,798,800],{"emptyLinePlaceholder":799},true,"\n",[565,802,804],{"class":567,"line":803},5,[565,805,806],{"class":775},"# 2. Wait until it's fully drained (readiness flips DOWN; \u002Fstate shows PAUSED)\n",[565,808,810,814,817,820,823,827,830,833,837,840,843,847,850,853,857,859],{"class":567,"line":809},6,[565,811,813],{"class":812},"sbBg2","until",[565,815,816],{"class":571}," curl",[565,818,819],{"class":575}," -s",[565,821,822],{"class":579}," localhost:8080\u002Fstate",[565,824,826],{"class":825},"si04Y"," |",[565,828,829],{"class":571}," grep",[565,831,832],{"class":575}," -q",[565,834,836],{"class":835},"sSP4y"," '",[565,838,839],{"class":579},"\"PAUSED\"",[565,841,842],{"class":835},"'",[565,844,846],{"class":845},"sYZai",";",[565,848,849],{"class":812}," do",[565,851,852],{"class":571}," sleep",[565,854,856],{"class":855},"s-TwI"," 1",[565,858,846],{"class":845},[565,860,861],{"class":812}," done\n",[565,863,865],{"class":567,"line":864},7,[565,866,800],{"emptyLinePlaceholder":799},[565,868,870],{"class":567,"line":869},8,[565,871,872],{"class":775},"# ... perform maintenance on the downstream system ...\n",[565,874,876],{"class":567,"line":875},9,[565,877,800],{"emptyLinePlaceholder":799},[565,879,881],{"class":567,"line":880},10,[565,882,883],{"class":775},"# 3. Resume\n",[565,885,887,889,891,893],{"class":567,"line":886},11,[565,888,572],{"class":571},[565,890,576],{"class":575},[565,892,580],{"class":579},[565,894,691],{"class":579},[565,896,898],{"class":567,"line":897},12,[565,899,900],{"class":775},"#    -> {\"status\":\"resumed\",\"state\":\"RUNNING\"}\n",[320,902,903,904,758],{},"The current lifecycle state is always available at ",[508,905,906],{"href":186},[338,907,668],{},[364,909,911],{"id":910},"programmatic-control-core","Programmatic control (core)",[320,913,914,915,918,919,922,923,926,927,929,930,933,934,758],{},"The same pause\u002Fdrain semantics are exposed as methods on the core ",[338,916,917],{},"StoatFlow"," handle — useful when you embed the engine via ",[338,920,921],{},":core"," directly rather than driving it over HTTP. ",[338,924,925],{},"pause()"," returns once the drain has been initiated (state ",[338,928,380],{},"); use ",[338,931,932],{},"awaitState(...)"," to block until ",[338,935,388],{},[937,938,940,1023],"code-tabs",{"group":939},"lang",[556,941,946],{"className":942,"code":943,"filename":944,"language":945,"meta":561,"style":561},"language-kotlin shiki shiki-themes vitesse-light","import io.stoatflow.core.StoatFlow\nimport java.time.Duration\n\nstoatflow.pause()\nstoatflow.awaitState(StoatFlow.State.PAUSED, Duration.ofSeconds(30))\n\n\u002F\u002F ... perform maintenance ...\n\nstoatflow.unpause()\n","Kotlin","kotlin",[338,947,948,956,963,967,979,1001,1005,1010,1014],{"__ignoreMap":561},[565,949,950,953],{"class":567,"line":568},[565,951,952],{"class":812},"import",[565,954,955],{"class":571}," io.stoatflow.core.StoatFlow\n",[565,957,958,960],{"class":567,"line":779},[565,959,952],{"class":812},[565,961,962],{"class":571}," java.time.Duration\n",[565,964,965],{"class":567,"line":790},[565,966,800],{"emptyLinePlaceholder":799},[565,968,969,973,976],{"class":567,"line":796},[565,970,972],{"class":971},"suHK_","stoatflow.",[565,974,975],{"class":571},"pause",[565,977,978],{"class":971},"()\n",[565,980,981,983,986,989,992,995,998],{"class":567,"line":803},[565,982,972],{"class":971},[565,984,985],{"class":571},"awaitState",[565,987,988],{"class":971},"(StoatFlow.State.PAUSED, Duration.",[565,990,991],{"class":571},"ofSeconds",[565,993,994],{"class":971},"(",[565,996,997],{"class":855},"30",[565,999,1000],{"class":971},"))\n",[565,1002,1003],{"class":567,"line":809},[565,1004,800],{"emptyLinePlaceholder":799},[565,1006,1007],{"class":567,"line":864},[565,1008,1009],{"class":775},"\u002F\u002F ... perform maintenance ...\n",[565,1011,1012],{"class":567,"line":869},[565,1013,800],{"emptyLinePlaceholder":799},[565,1015,1016,1018,1021],{"class":567,"line":875},[565,1017,972],{"class":971},[565,1019,1020],{"class":571},"unpause",[565,1022,978],{"class":971},[556,1024,1029],{"className":1025,"code":1026,"filename":1027,"language":1028,"meta":561,"style":561},"language-java shiki shiki-themes vitesse-light","import io.stoatflow.core.StoatFlow;\nimport java.time.Duration;\n\nstoatflow.pause();\nstoatflow.awaitState(StoatFlow.State.PAUSED, Duration.ofSeconds(30));\n\n\u002F\u002F ... perform maintenance ...\n\nstoatflow.unpause();\n","Java","java",[338,1030,1031,1055,1074,1078,1090,1127,1131,1135,1139],{"__ignoreMap":561},[565,1032,1033,1035,1038,1040,1043,1045,1048,1050,1052],{"class":567,"line":568},[565,1034,952],{"class":812},[565,1036,1037],{"class":971}," io",[565,1039,758],{"class":845},[565,1041,1042],{"class":971},"stoatflow",[565,1044,758],{"class":845},[565,1046,1047],{"class":971},"core",[565,1049,758],{"class":845},[565,1051,917],{"class":971},[565,1053,1054],{"class":845},";\n",[565,1056,1057,1059,1062,1064,1067,1069,1072],{"class":567,"line":779},[565,1058,952],{"class":812},[565,1060,1061],{"class":971}," java",[565,1063,758],{"class":845},[565,1065,1066],{"class":971},"time",[565,1068,758],{"class":845},[565,1070,1071],{"class":971},"Duration",[565,1073,1054],{"class":845},[565,1075,1076],{"class":567,"line":790},[565,1077,800],{"emptyLinePlaceholder":799},[565,1079,1080,1083,1085,1087],{"class":567,"line":796},[565,1081,1042],{"class":1082},"svycV",[565,1084,758],{"class":845},[565,1086,975],{"class":571},[565,1088,1089],{"class":845},"();\n",[565,1091,1092,1094,1096,1098,1100,1102,1104,1106,1108,1110,1113,1116,1118,1120,1122,1124],{"class":567,"line":803},[565,1093,1042],{"class":1082},[565,1095,758],{"class":845},[565,1097,985],{"class":571},[565,1099,994],{"class":845},[565,1101,917],{"class":1082},[565,1103,758],{"class":845},[565,1105,466],{"class":1082},[565,1107,758],{"class":845},[565,1109,388],{"class":1082},[565,1111,1112],{"class":845},",",[565,1114,1115],{"class":1082}," Duration",[565,1117,758],{"class":845},[565,1119,991],{"class":571},[565,1121,994],{"class":845},[565,1123,997],{"class":855},[565,1125,1126],{"class":845},"));\n",[565,1128,1129],{"class":567,"line":809},[565,1130,800],{"emptyLinePlaceholder":799},[565,1132,1133],{"class":567,"line":864},[565,1134,1009],{"class":775},[565,1136,1137],{"class":567,"line":869},[565,1138,800],{"emptyLinePlaceholder":799},[565,1140,1141,1143,1145,1147],{"class":567,"line":875},[565,1142,1042],{"class":1082},[565,1144,758],{"class":845},[565,1146,1020],{"class":571},[565,1148,1089],{"class":845},[320,1150,1151,1153,1154,1157,1158,1160,1161,1164,1165,448,1167,1169,1170,1172],{},[338,1152,925],{}," throws ",[338,1155,1156],{},"IllegalStateException"," if the instance is not ",[338,1159,410],{},"; ",[338,1162,1163],{},"unpause()"," throws if it is not ",[338,1166,388],{},[338,1168,380],{}," — the same state rules the HTTP handlers turn into ",[338,1171,625],{}," responses.",[401,1174,1175],{"color":403,"icon":404},[320,1176,1177,1178,1181,1182,1185,1186,510,1189,1192,1193,1195,1196,1195,1198,1201,1202,1204,1205,1207],{},"When you run on the batteries-included ",[338,1179,1180],{},":runtime"," (",[338,1183,1184],{},"StoatFlowRuntime","), pause and resume are driven over HTTP via ",[338,1187,1188],{},"\u002Fpause",[338,1190,1191],{},"\u002Funpause",". The programmatic ",[338,1194,925],{}," \u002F ",[338,1197,1163],{},[338,1199,1200],{},"awaitState()"," methods above are on the underlying ",[338,1203,917],{}," engine handle, which you hold directly when using the ",[338,1206,921],{}," module.",[364,1209,1211],{"id":1210},"when-to-use-it","When to use it",[327,1213,1214,1220],{},[330,1215,1216,1219],{},[333,1217,1218],{},"Downstream backpressure."," A sink the topology writes to (a database, an external API, another topic's consumer) goes unavailable or slows down. Rather than letting failures pile up, pause, let the downstream recover, then unpause — the consumer session stays alive throughout, so you avoid a rebalance and a cold restart.",[330,1221,1222,1225],{},[333,1223,1224],{},"Short maintenance windows."," You need to touch the broker, the downstream store, or the host briefly and want a clean, committed boundary. Pause drains and commits in-flight work first, so you resume from a consistent point with no partial in-flight state.",[320,1227,1228,1229,1231],{},"For anything longer-lived or anything that changes the topology or configuration, stop the instance and start it again — pause is for keeping a single instance warm across a brief, deliberate gap, not for long outages. See ",[508,1230,253],{"href":254}," for operational guidance.",[364,1233,1235],{"id":1234},"next-steps","Next steps",[327,1237,1238,1248,1260],{},[330,1239,1240,1245,1246,758],{},[333,1241,1242],{},[508,1243,1244],{"href":186},"REST API"," — the full endpoint reference, including ",[338,1247,668],{},[330,1249,1250,1254,1255,1195,1257,1259],{},[333,1251,1252],{},[508,1253,190],{"href":191}," — how ",[338,1256,380],{},[338,1258,388],{}," map to liveness and readiness.",[330,1261,1262,1266],{},[333,1263,1264],{},[508,1265,513],{"href":239}," — wiring the probes into Kubernetes so a paused instance isn't restarted.",[1268,1269,1270],"style",{},"html pre.shiki code .sySUi, html code.shiki .sySUi{--shiki-default:#59873A}html pre.shiki code .sEi1f, html code.shiki .sEi1f{--shiki-default:#A65E2B}html pre.shiki code .spphp, html code.shiki .spphp{--shiki-default:#B56959}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .s8zF2, html code.shiki .s8zF2{--shiki-default:#A0ADA0}html pre.shiki code .sbBg2, html code.shiki .sbBg2{--shiki-default:#1E754F}html pre.shiki code .si04Y, html code.shiki .si04Y{--shiki-default:#AB5959}html pre.shiki code .sSP4y, html code.shiki .sSP4y{--shiki-default:#B5695977}html pre.shiki code .sYZai, html code.shiki .sYZai{--shiki-default:#999999}html pre.shiki code .s-TwI, html code.shiki .s-TwI{--shiki-default:#2F798A}html pre.shiki code .suHK_, html code.shiki .suHK_{--shiki-default:#393A34}html pre.shiki code .svycV, html code.shiki .svycV{--shiki-default:#B07D48}",{"title":561,"searchDepth":779,"depth":779,"links":1272},[1273,1274,1275,1276,1280,1281,1282,1283],{"id":366,"depth":779,"text":367},{"id":414,"depth":779,"text":415},{"id":441,"depth":779,"text":442},{"id":531,"depth":779,"text":532,"children":1277},[1278,1279],{"id":551,"depth":790,"text":554},{"id":672,"depth":790,"text":675},{"id":761,"depth":779,"text":762},{"id":910,"depth":779,"text":911},{"id":1210,"depth":779,"text":1211},{"id":1234,"depth":779,"text":1235},"Pause and resume record processing at runtime with POST \u002Fpause and \u002Funpause — for maintenance windows and downstream backpressure, without restarting the instance.","md",{},{"icon":203},"how-to",{"title":200,"description":1284},"-COSV_s3grimbjvuouYjivGPc9VZ_ldK2eqPxXkcIoM",[1292,1294],{"title":195,"path":196,"stem":197,"description":1293,"icon":198,"children":-1},"Scrape StoatFlow's Prometheus \u002Fmetrics endpoint — Micrometer integration, the key meters the engine emits, license metrics, and common tags.",{"title":205,"path":206,"stem":207,"description":1295,"icon":208,"children":-1},"Extend the StoatFlow runtime with custom metrics, HTTP endpoints, and health indicators via the RuntimePlugin interface and lifecycle listeners.",1783713361565]