Created
November 7, 2017 17:13
-
-
Save jmarmolejos/af13aab68f07cd227fdaf7b9a0119bc2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connectionString = "<your connectionstring that you won't be hardcoding like this>"; | |
var queueName = "ProductsUpdate"; | |
var deadLetterQueueName = QueueClient.FormatDeadLetterPath(queueName); // We'll get back to this in a bit | |
var client = QueueClient.CreateFromConnectionString(connectionString, queueName); | |
client.OnMessage(message => | |
{ | |
var updateRequest = message.GetBody<UpdateProductsRequest>(); | |
productsService.updateInventoryProducts(updateRequest); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment