You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by ab...@post.sk on 2018/11/07 19:10:25 UTC

Observer

Addition to my previous e-mail ...
 
I think, that there should be Observer pattern. I think, that Consumer interface is Observer interface with method update (i do not know how this method is called in Consumer). I have two ideas, which classes could be concrete observers. First idea is, that concrete observers are classes KafkaConsumer and MockConsumer (both implement interface Consumer). Second idea: I read, that object of KafkaConsumer is created when application wants to be consumer. So my idea is, that concrete observers are all that objects. But i think more, that concrete observers are KafkaConsumer and MockConsumer.
 
Observers must observe some subject. I think that this subject is some Topic. I think, that there could be interface of Topic with methods attachObserver, dettachObserver and notifiyObserver. Also there could be class of concrete subject which implements interface Topic. But I can not find classes of Topics. I read, that topics are managed by zookeeper. I am worry, that part of observer is in zookeeper. I am worry, that subject is created in command line and therefore I can not find part of observer pattern - subject.
 
Can you help me please with that?
 
Thank you very much