# From RxJava to Kotlin Flow: Throttling

DevFeed: [From RxJava to Kotlin Flow: Throttling](<https://devfeed.tech/articles/from-rxjava-to-kotlin-flow-throttling-38630.md>)

Original publisher: [Read original article](<https://krossovochkin.com/posts/2020_03_02_from_rxjava_to_kotlin_flow_throttling/>)

Published: 2020-03-02T00:00:00Z

Content type: tutorial

Language: en

Sources: [Vasya Drobushkov](<https://devfeed.tech/sources/vasya-drobushkov.md>)

Topics: [reactive](<https://devfeed.tech/topics/reactive.md>), [kotlin-flow](<https://devfeed.tech/topics/kotlin-flow.md>), [RxJava](<https://devfeed.tech/topics/rxjava.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [backpressure](<https://devfeed.tech/tags/backpressure.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-flow](<https://devfeed.tech/tags/kotlin-flow.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [reactive-programming](<https://devfeed.tech/tags/reactive-programming.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>)

## AI overview

A comparison of throttling operators in RxJava and Kotlin Flow, explaining how debounce, throttleLast or sample, and throttleFirst limit events in reactive streams. The article uses UI interactions such as search input and button clicks as examples.

## Source excerpt

Source This post is part of series of comparing RxJava to Kotlin Flow. Previous articles were about Threading, Backpressure, Error Handling, Stream Types It is advised to take a look at the overview of Throttling operators in RxJava before reading this article: Throttling in RxJava 2 Introduction Throttling is also one of the essential features of reactive programming. Streams might emit more values than we're expecting to receive, so ability to limit number of events in a stream is very important. Most common place where it applies is handling UI events. Examples of usage might be handling button clicks (to not allow double clicks), usage with search view when we'd like to wait for user to stop typing before querying some data and so on. In this article we'll try to compare throttling operators in RxJava and Kotlin Flow.