static void Main(string[] args) { var config = Configure.With() .AmazonPublisher() .AwsAccessKeyId("AKIAIN2KJH4QJIUV7CGQ") .AwsSecretKey("18ypN0y7SGA+L0XDVMHm9lBVmQ2oF2bdm7CGIijA") .QueueName("Ellemy_CQRS_Example"); config.CreatePublisher(); var subscriber = new AmazonSqsSubscriber(config); subscriber.Start(); }
public void the_message_is_proccessed() { var subscriber = new AmazonSqsSubscriber(_config); var @event = new TestEvent { SomeGuid = Guid.NewGuid(), SomeInt = 1, SomeString = "Some String" }; _publisher.Publish(@event); subscriber.Start(); //Ugly, but I wanna make sure the message arrives while (subscriber.MessagesProcessed == 0) { } subscriber.Stop(); Assert.AreEqual(@event.SomeGuid, ConsoleWriter.LastSomeGuid); }