Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.pubsub/Observables/replaySubject

replaySubject

@JvmStatic
fun <T> replaySubject(cacheSize: Int): ReplaySubject<T>

Returns an observable subject that emits values to any subscribers at the time of the emission.

When subscribing, new subscribers will receive up to cacheSize past emissions, in sequential order.

Parameters

cacheSize

The maximum number of entries to replay to subscribers. Negative values will be treated as an unbounded cache.


@JvmStatic
fun <T> replaySubject(): ReplaySubject<T>

Returns an observable subject that emits values to any subscribers at the time of the emission.

When subscribing, new subscribers will receive all past emissions, in sequential order. The cache size is unbounded.

Generated by Dokka
(c) Tealium 2026