Samples/Stream/Basic
Hananiel Sarella eee2dabbe8
Update Basic Sample to use WebApplicationBuilder (#252)
* Update Basic Sample to use WebApplicationBuilder

* Apply suggestions from code review

* PR changes

Co-authored-by: Tim Hess <thess@vmware.com>
2022-10-12 22:55:19 -04:00
..
Properties Streams sample (#195) 2021-05-12 10:38:40 -04:00
Basic.csproj Update Basic Sample to use WebApplicationBuilder (#252) 2022-10-12 22:55:19 -04:00
Dockerfile Streams sample (#195) 2021-05-12 10:38:40 -04:00
MyStreamProcessor.cs Update Basic Sample to use WebApplicationBuilder (#252) 2022-10-12 22:55:19 -04:00
Program.cs Update Basic Sample to use WebApplicationBuilder (#252) 2022-10-12 22:55:19 -04:00
Readme.md Update Basic Sample to use WebApplicationBuilder (#252) 2022-10-12 22:55:19 -04:00
appsettings.json Update Basic Sample to use WebApplicationBuilder (#252) 2022-10-12 22:55:19 -04:00

Readme.md

Basic Stream Sample using WebApplication Builder

This sample assumes you have RabbitMQ broker running with default credentials.

Running the sample

In a command line console, change into the project root directory. Run the project.

cd Basic
dotnet run 


info: Steeltoe.Messaging.RabbitMQ.Connection.CachingConnectionFactory[0]
      Attempting to connect to: amqp://127.0.0.1:5672
info: Steeltoe.Messaging.RabbitMQ.Connection.CachingConnectionFactory[0]
      Created new connection: ccFactory:1.publisher/Steeltoe.Messaging.RabbitMQ.Connection.SimpleConnection
info: Steeltoe.Stream.Binder.Rabbit.RabbitMessageChannelBinder[0]
      Channel 'BasicSample.Basic.errors' has 1 subscriber(s).
info: Steeltoe.Stream.Binder.Rabbit.RabbitMessageChannelBinder[0]
      Channel 'BasicSample.Basic.errors' has 2 subscriber(s).
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: https://localhost:5001
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
      ...

Go to your RabbitMQ broker queues: You should see a queue named: BasicSample.Basic. This name is controlled by settings in the appsettings.json.

Type a string into the Publish Message section of the UI, and hit Publish Message

You will see a log message similar to this:

MyStreamProcssor changed input:test into output:TEST