on page 209, i think there is problem of PublishSubject initialize
val sourceObservable = PublishSubject<String>() // correct : PublishSubject.create<String>()
sourceObservable.subscribe(buffer_1)
sourceObservable
.buffer(bufferTimeSpan,TimeUnit.SECONDS, bufferMaxCount)
.map { it.size }
.subscribe(buffer_2)