Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
themeEmacs
//router2 설정
		/workers/router2 {
			router = random-pool
			nr-of-instances = 5
		}
// 랜덤풀 생성
randomPool = getContext().actorOf( FromConfig.getInstance().props( ext.props("testActor") ) , "router2");


//hi1을 받으면 라우드로빈라운드로빈, hi2를 받으면 랜덤풀로 작동된다.
		.matchEquals("hi1",s->{
			log.info("Workers::Received String message: {}", s);
			roundrobinpool.tell(s, getSender() );					
		})
		.matchEquals("hi2",s->{
			log.info("Workers::Received String message: {}", s);
			randomPool.tell(s, getSender() );					
		})

...