diff --git a/tutorials/pub-sub/README.md b/tutorials/pub-sub/README.md index 9fb832b3..11b60a3d 100644 --- a/tutorials/pub-sub/README.md +++ b/tutorials/pub-sub/README.md @@ -163,10 +163,28 @@ dotnet build 3. Run the C# subscriber app with Dapr: + + ```bash dapr run --app-id csharp-subscriber --app-port 5009 dotnet run csharp-subscriber.csproj ``` + + ### Run the React front end with Dapr Now, run the React front end with Dapr. The front end will publish different kinds of messages that subscribers will pick up. @@ -482,10 +500,20 @@ kubectl logs --selector app=python-subscriber -c python-subscriber + + ```bash kubectl logs --selector app=csharp-subscriber -c csharp-subscriber ``` + + 4. Note that the Node.js subscriber receives messages of type "A" and "B", while the Python subscriber receives messages of type "A" and "C" and the C# subscriber receives messages of type "A" and "B" and "C". ### Cleanup diff --git a/tutorials/pub-sub/csharp-subscriber/Program.cs b/tutorials/pub-sub/csharp-subscriber/Program.cs index 91df0023..34589c02 100644 --- a/tutorials/pub-sub/csharp-subscriber/Program.cs +++ b/tutorials/pub-sub/csharp-subscriber/Program.cs @@ -2,19 +2,12 @@ using Dapr; var builder = WebApplication.CreateBuilder(args); -// Add services to the container. -// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(); - var app = builder.Build(); // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { app.UseDeveloperExceptionPage(); - app.UseSwagger(); - app.UseSwaggerUI(); } // Dapr configurations diff --git a/tutorials/pub-sub/csharp-subscriber/csharp-subscriber.csproj b/tutorials/pub-sub/csharp-subscriber/csharp-subscriber.csproj index be882227..ebcf153c 100644 --- a/tutorials/pub-sub/csharp-subscriber/csharp-subscriber.csproj +++ b/tutorials/pub-sub/csharp-subscriber/csharp-subscriber.csproj @@ -1,16 +1,15 @@ - - net6.0 - enable - enable - Linux - + + net6.0 + enable + enable + Linux + - - - - - + + + +