.net - Reactive extension and parallel execution of observer code -


i new rx.net , struggling on simple problem. want process subscribe part parallel in 3 or n threads. reading message kafka bus. on pull of message, want hand on message child process/threads process them. example code processing sequentially , slows down process reads messages bus..example code

    // create subject of custom object , make observable      private readonly subject<mymessage> messagesubject = new subject<mymessage>();      messagesubject.asobservable();     // add observer subject _onmessageobservable.observeon(newthreadscheduler.default).subscribe(observer);  // on receive of message, notify observer     messagesubject.onnext(msg.value); 


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -