Exemple #1
0
        static void Main(string[] args)
        {
            var aggregatedRepository = new AggregatedRepository();

            var facebookProducer = new FacebookProducer();
            var twitterProducer  = new TwitterProducer();

            facebookProducer.SubscribeToUpdates(aggregatedRepository);
            twitterProducer.SubscribeToUpdates(aggregatedRepository);

            var client = new ClientConsumer();

            aggregatedRepository.SubscribeToAggregatedUpdates(client);

            Thread.Sleep(3000);
            aggregatedRepository.StopConsuming();

            Console.Read();
        }
Exemple #2
0
 public FacebookConsumerActor(IActorRef repositoryActor, FacebookProducer producer)
 {
     _repositoryActor = repositoryActor;
     producer.SubscribeToUpdates(this);
 }