Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
houseofcat committed Apr 23, 2024
1 parent 6dece61 commit 01db50a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/RabbitMQ.ConsumerDataflowService/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
var dataflowService = new ConsumerDataflowService<CustomWorkState>(rabbitService, "TestConsumer");

dataflowService.AddStep(
"write_message_to_console",
"write_message_to_log",
(state) =>
{
var message = Encoding.UTF8.GetString(state.ReceivedMessage.Body.Span);
if (message == "throw")
{
throw new Exception("Throwing an exception!");
}
Console.WriteLine(message);
logger.LogInformation(message);
return state;
});

Expand Down Expand Up @@ -99,4 +99,4 @@
logger.LogInformation("All stopped! Press return to exit...");
});

await app.RunAsync();
await app.RunAsync();

0 comments on commit 01db50a

Please sign in to comment.