Each language-specific implementation of ReactiveX implements a set of operators. Although there is much overlap between implementations, there are also some operators that are only implemented in certain implementations. Also, each implementation tends to name its operators to resemble those of similar methods that are already familiar from other contexts in that language.
Most operators operate on an Observable and return an Observable. This allows you to apply these operators one after the other, in a chain. Each operator in the chain modifies the Observable that results from the operation of the previous operator.
There are other patterns, like the Builder Pattern, in which a variety of methods of a particular class operate on an item of that same class by modifying that object through the operation of the method. These patterns also allow you to chain the methods in a similar way. But while in the Builder Pattern, the order in which the methods appear in the chain does not usually matter, with the Observable operators order matters.
A chain of Observable operators do not operate independently on the original Observable that originates the chain, but they operate in turn, each one operating on the Observable generated by the operator immediately previous in the chain.
This page first lists what could be considered the “core” operators in ReactiveX, and links to pages that have more in-depth information on how these operators work and how particular language-specific ReactiveX versions have implemented these operators.
Next is a “decision tree” that may help you choose the operator that is most appropriate to your use case.
Finally, there is an alphabetical list of most of the operators available in the many language-specific implementations of ReactiveX. These link to the page that documents the core operator that most closely resembles the language-specific operator (so, for instance, the Rx.NET “SelectMany” operator links to the documentation of the FlatMap ReactiveX operator, of which “SelectMany” is the Rx.NET implementation).
If you want to implement your own operator, see Implementing Your Own Operators.
Operators that originate new Observables.
Create
— create an Observable from scratch by calling observer methods programmaticallyDefer
— do not create the Observable until the observer subscribes, and create a fresh Observable for each observerEmpty
/Never
/Throw
— create Observables that have very precise and limited behaviorFrom
— convert some other object or data structure into an ObservableInterval
— create an Observable that emits a sequence of integers spaced by a particular time intervalJust
— convert an object or a set of objects into an Observable that emits that or those objectsRange
— create an Observable that emits a range of sequential integersRepeat
— create an Observable that emits a particular item or sequence of items repeatedlyStart
— create an Observable that emits the return value of a functionTimer
— create an Observable that emits a single item after a given delayOperators that transform items that are emitted by an Observable.
Buffer
— periodically gather items from an Observable into bundles and emit these bundles rather than emitting the items one at a timeFlatMap
— transform the items emitted by an Observable into Observables, then flatten the emissions from those into a single ObservableGroupBy
— divide an Observable into a set of Observables that each emit a different group of items from the original Observable, organized by keyMap
— transform the items emitted by an Observable by applying a function to each itemScan
— apply a function to each item emitted by an Observable, sequentially, and emit each successive valueWindow
— periodically subdivide items from an Observable into Observable windows and emit these windows rather than emitting the items one at a timeOperators that selectively emit items from a source Observable.
Debounce
— only emit an item from an Observable if a particular timespan has passed without it emitting another itemDistinct
— suppress duplicate items emitted by an ObservableElementAt
— emit only item n emitted by an ObservableFilter
— emit only those items from an Observable that pass a predicate testFirst
— emit only the first item, or the first item that meets a condition, from an ObservableIgnoreElements
— do not emit any items from an Observable but mirror its termination notificationLast
— emit only the last item emitted by an ObservableSample
— emit the most recent item emitted by an Observable within periodic time intervalsSkip
— suppress the first n items emitted by an ObservableSkipLast
— suppress the last n items emitted by an ObservableTake
— emit only the first n items emitted by an ObservableTakeLast
— emit only the last n items emitted by an ObservableOperators that work with multiple source Observables to create a single Observable
And
/Then
/When
— combine sets of items emitted by two or more Observables by means of Pattern
and Plan
intermediariesCombineLatest
— when an item is emitted by either of two Observables, combine the latest item emitted by each Observable via a specified function and emit items based on the results of this functionJoin
— combine items emitted by two Observables whenever an item from one Observable is emitted during a time window defined according to an item emitted by the other ObservableMerge
— combine multiple Observables into one by merging their emissionsStartWith
— emit a specified sequence of items before beginning to emit the items from the source ObservableSwitch
— convert an Observable that emits Observables into a single Observable that emits the items emitted by the most-recently-emitted of those ObservablesZip
— combine the emissions of multiple Observables together via a specified function and emit single items for each combination based on the results of this functionOperators that help to recover from error notifications from an Observable
Catch
— recover from an onError
notification by continuing the sequence without errorRetry
— if a source Observable sends an onError
notification, resubscribe to it in the hopes that it will complete without errorA toolbox of useful Operators for working with Observables
Delay
— shift the emissions from an Observable forward in time by a particular amountDo
— register an action to take upon a variety of Observable lifecycle eventsMaterialize
/Dematerialize
— represent both the items emitted and the notifications sent as emitted items, or reverse this processObserveOn
— specify the scheduler on which an observer will observe this ObservableSerialize
— force an Observable to make serialized calls and to be well-behavedSubscribe
— operate upon the emissions and notifications from an ObservableSubscribeOn
— specify the scheduler an Observable should use when it is subscribed toTimeInterval
— convert an Observable that emits items into one that emits indications of the amount of time elapsed between those emissionsTimeout
— mirror the source Observable, but issue an error notification if a particular period of time elapses without any emitted itemsTimestamp
— attach a timestamp to each item emitted by an ObservableUsing
— create a disposable resource that has the same lifespan as the ObservableOperators that evaluate one or more Observables or items emitted by Observables
All
— determine whether all items emitted by an Observable meet some criteriaAmb
— given two or more source Observables, emit all of the items from only the first of these Observables to emit an itemContains
— determine whether an Observable emits a particular item or notDefaultIfEmpty
— emit items from the source Observable, or a default item if the source Observable emits nothingSequenceEqual
— determine whether two Observables emit the same sequence of itemsSkipUntil
— discard items emitted by an Observable until a second Observable emits an itemSkipWhile
— discard items emitted by an Observable until a specified condition becomes falseTakeUntil
— discard items emitted by an Observable after a second Observable emits an item or terminatesTakeWhile
— discard items emitted by an Observable after a specified condition becomes falseOperators that operate on the entire sequence of items emitted by an Observable
Average
— calculates the average of numbers emitted by an Observable and emits this averageConcat
— emit the emissions from two or more Observables without interleaving themCount
— count the number of items emitted by the source Observable and emit only this valueMax
— determine, and emit, the maximum-valued item emitted by an ObservableMin
— determine, and emit, the minimum-valued item emitted by an ObservableReduce
— apply a function to each item emitted by an Observable, sequentially, and emit the final valueSum
— calculate the sum of numbers emitted by an Observable and emit this sumSpecialty Observables that have more precisely-controlled subscription dynamics
Connect
— instruct a connectable Observable to begin emitting items to its subscribersPublish
— convert an ordinary Observable into a connectable ObservableRefCount
— make a Connectable Observable behave like an ordinary ObservableReplay
— ensure that all observers see the same sequence of emitted items, even if they subscribe after the Observable has begun emitting itemsTo
— convert an Observable into another object or data structureThis tree can help you find the ReactiveX Observable operator you’re looking for.
Array
, Iterable
, or something like thatPattern
and Plan
intermediariesNotification
objectsFuture
that blocks until the Observable completesCanonical, core operator names are in boldface. Other entries represent language-specific variants of these operators or specialty operators outside of the main ReactiveX core set of operators.
Aggregate
All
Amb
ambArray
ambWith
and_
And
Any
apply
as_blocking
asObservable
AssertEqual
asyncAction
asyncFunc
Average
averageDouble
averageFloat
averageInteger
averageLong
blocking
blockingFirst
blockingForEach
blockingIterable
blockingLast
blockingLatest
blockingMostRecent
blockingNext
blockingSingle
blockingSubscribe
Buffer
bufferWithCount
bufferWithTime
bufferWithTimeOrCount
byLine
cache
cacheWithInitialCapacity
case
Cast
Catch
catchError
catchException
collect
collect
(RxScala version of Filter
)collectInto
CombineLatest
combineLatestDelayError
combineLatestWith
Concat
concat_all
concatAll
concatArray
concatArrayDelayError
concatArrayEager
concatDelayError
concatEager
concatMap
concatMapDelayError
concatMapEager
concatMapEagerDelayError
concatMapIterable
concatMapObserver
concatMapTo
concatWith
Connect
connect_forever
cons
Contains
controlled
Count
countLong
Create
cycle
Debounce
decode
DefaultIfEmpty
Defer
deferFuture
Delay
delaySubscription
delayWithSelector
Dematerialize
Distinct
distinctKey
distinctUntilChanged
distinctUntilKeyChanged
Do
doAction
doAfterTerminate
doOnComplete
doOnCompleted
doOnDispose
doOnEach
doOnError
doOnLifecycle
doOnNext
doOnRequest
doOnSubscribe
doOnTerminate
doOnUnsubscribe
doseq
doWhile
drop
dropRight
dropUntil
dropWhile
ElementAt
ElementAtOrDefault
Empty
emptyObservable
empty?
encode
ensures
error
every
exclusive
exists
expand
failWith
Filter
filterNot
Finally
finallyAction
finallyDo
find
findIndex
First
firstElement
FirstOrDefault
firstOrElse
FlatMap
flatMapFirst
flatMapIterable
flatMapIterableWith
flatMapLatest
flatMapObserver
flatMapWith
flatMapWithMaxConcurrent
flat_map_with_index
flatten
flattenDelayError
foldl
foldLeft
for
forall
ForEach
forEachFuture
forEachWhile
forIn
forkJoin
From
fromAction
fromArray
FromAsyncPattern
fromCallable
fromCallback
FromEvent
FromEventPattern
fromFunc0
fromFuture
fromIterable
fromIterator
from_list
fromNodeCallback
fromPromise
fromPublisher
fromRunnable
Generate
generateWithAbsoluteTime
generateWithRelativeTime
generator
GetEnumerator
getIterator
GroupBy
GroupByUntil
GroupJoin
head
headOption
headOrElse
if
ifThen
IgnoreElements
indexOf
interleave
interpose
Interval
intervalRange
into
isEmpty
items
Join
join
(string)jortSort
jortSortUntil
Just
keep
keep-indexed
Last
lastElement
lastOption
LastOrDefault
lastOrElse
Latest
latest
(Rx.rb version of Switch
)length
let
letBind
lift
limit
LongCount
ManySelect
Map
map
(RxClojure version of Zip
)MapCat
mapCat
(RxClojure version of Zip
)map-indexed
mapTo
mapWithIndex
Materialize
Max
MaxBy
Merge
mergeAll
mergeArray
mergeArrayDelayError
merge_concurrent
mergeDelayError
mergeObservable
mergeWith
Min
MinBy
MostRecent
Multicast
multicastWithSelector
nest
Never
Next
Next
(BlockingObservable version)none
nonEmpty
nth
ObserveOn
ObserveOnDispatcher
observeSingleOn
of
of_array
ofArrayChanges
of_enumerable
of_enumerator
ofObjectChanges
OfType
ofWithScheduler
onBackpressureBlock
onBackpressureBuffer
onBackpressureDrop
OnErrorResumeNext
onErrorReturn
onErrorReturnItem
onExceptionResumeNext
onTerminateDetach
orElse
pairs
pairwise
partition
partition-all
pausable
pausableBuffered
pluck
product
Publish
PublishLast
publish_synchronized
publishValue
raise_error
Range
Reduce
reduceWith
reductions
RefCount
Repeat
repeat_infinitely
repeatUntil
repeatWhen
Replay
rescue_error
rest
Retry
retry_infinitely
retryUntil
retryWhen
Return
returnElement
returnValue
runAsync
safeSubscribe
Sample
Scan
scanWith
scope
Select
(alternate name of Map
)select
(alternate name of Filter
)selectConcat
selectConcatObserver
SelectMany
selectManyObserver
select_switch
selectSwitch
selectSwitchFirst
selectWithMaxConcurrent
select_with_index
seq
SequenceEqual
sequence_eql?
SequenceEqualWith
Serialize
share
shareReplay
shareValue
Single
singleElement
SingleOrDefault
singleOption
singleOrElse
size
Skip
SkipLast
skipLastWithTime
SkipUntil
skipUntilWithTime
SkipWhile
skipWhileWithIndex
skip_with_time
slice
sliding
slidingBuffer
some
sort
sorted
sort-by
sorted-list-by
split
split-with
Start
startAsync
startFuture
StartWith
startWithArray
stringConcat
stopAndWait
subscribe
subscribeActual
SubscribeOn
SubscribeOnDispatcher
subscribeOnCompleted
subscribeOnError
subscribeOnNext
subscribeWith
Sum
sumDouble
sumFloat
sumInteger
sumLong
Switch
switchCase
switchIfEmpty
switchLatest
switchMap
switchMapDelayError
switchOnNext
switchOnNextDelayError
Synchronize
Take
take_with_time
takeFirst
TakeLast
takeLastBuffer
takeLastBufferWithTime
takeLastWithTime
takeRight
(see also: TakeLast
)TakeUntil
takeUntilWithTime
TakeWhile
takeWhileWithIndex
tail
tap
tapOnCompleted
tapOnError
tapOnNext
Then
thenDo
Throttle
throttleFirst
throttleLast
throttleLatest
throttleWithSelector
throttleWithTimeout
Throw
throwError
throwException
TimeInterval
Timeout
timeoutWithSelector
Timer
Timestamp
To
to_a
ToArray
ToAsync
toBlocking
toBuffer
to_dict
ToDictionary
ToEnumerable
ToEvent
ToEventPattern
ToFlowable
ToFuture
to_h
toIndexedSeq
toIterable
toIterator
ToList
ToLookup
toMap
toMultiMap
ToObservable
toSet
toSortedList
toStream
ToTask
toTraversable
toVector
tumbling
tumblingBuffer
unsafeCreate
unsubscribeOn
Using
When
Where
while
whileDo
Window
windowWithCount
windowWithTime
windowWithTimeOrCount
windowed
withFilter
withLatestFrom
Zip
zipArray
zipIterable
zipWith
zipWithIndex
++
+:
:+