This file contains hidden or 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
info: Microsoft.Hosting.Lifetime[0] | |
Now listening on: http://127.0.0.1:5100 | |
Microsoft.Hosting.Lifetime: Information: Now listening on: http://127.0.0.1:5100 | |
info: Microsoft.Hosting.Lifetime[0] | |
Now listening on: https://127.0.0.1:5102 | |
Microsoft.Hosting.Lifetime: Information: Now listening on: https://127.0.0.1:5102 | |
info: Microsoft.Hosting.Lifetime[0] | |
Application started. Press Ctrl+C to shut down. | |
Microsoft.Hosting.Lifetime: Information: Application started. Press Ctrl+C to shut down. |
This file contains hidden or 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
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddControllers(); | |
services.AddControllers().AddDapr(builder => builder.UseHttpEndpoint(Configuration.GetValue<string>("DAPR_HTTP_ENDPOINT")) | |
.UseGrpcEndpoint(Configuration.GetValue<string>("DAPR_GRPC_ENDPOINT"))); | |
services.AddSwaggerGen(c => | |
{ | |
c.SwaggerDoc("v1", new OpenApiInfo { Title = "DaprAdventures.PublisherService", Version = "v1" }); | |
}); |
This file contains hidden or 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
{ | |
"Logging": { | |
"LogLevel": { | |
"Default": "Information", | |
"Microsoft": "Warning", | |
"Microsoft.Hosting.Lifetime": "Information" | |
} | |
}, | |
"AllowedHosts": "*", | |
"DAPR_HTTP_ENDPOINT": "http://localhost:5180", |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Logging; | |
using DaprAdventures.PublisherService.Models; | |
using Dapr.Client; | |
namespace DaprAdventures.PublisherService.Controllers |
This file contains hidden or 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
INFO[1085] actor runtime started. actor idle timeout: 1h0m0s. actor scan interval: 30s app_id=publisher-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime.actor type=log ver=1.2.2 | |
DEBU[1085] try to connect to placement service: dns:///localhost:50005 app_id=publisher-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime.actor.internal.placement type=log ver=1.2.2 | |
DEBU[1085] user app did not subscribe to any topic app_id=publisher-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2 | |
DEBU[1085] app responded with subscriptions [] app_id=publisher-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2 | |
INFO[1085] dapr initialized. Status: Running. Init Elapsed 1.085427493e+06ms app_id=publisher-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2 | |
DEBU[1085] established connection to placement service at dns:///localhost:50005 app_id=publisher-service instance=Kshitijs-MacBook-Pro.local sco |
This file contains hidden or 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
INFO[0000] local service entry announced: subscriber-service -> 192.168.29.185:63682 app_id=subscriber-service instance=Kshitijs-MacBook-Pro.local scope=dapr.contrib type=log ver=1.2.2 | |
INFO[0000] Initialized name resolution to mdns app_id=subscriber-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2 | |
INFO[0000] component loaded. name: envvar-secret-store, type: secretstores.local.env/v1 app_id=subscriber-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2 | |
INFO[0000] waiting for all outstanding components to be processed app_id=subscriber-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2 | |
INFO[0000] component loaded. name: pubsub, type: pubsub.azure.eventhubs/v1 app_id=subscriber-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2 | |
INFO[0000] all outstanding components processed app_id=subscriber-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ve |
This file contains hidden or 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
[Topic("pubsub", "dapreventhub")] | |
[HttpPost("/receiver")] | |
public async Task<IActionResult> Subscriber(WeatherChange weatherChange) | |
{ | |
// Deserialize incoming order summary | |
_logger.LogInformation("Received Weather: {@WeatherChange}", weatherChange); | |
return Ok(); | |
} |
This file contains hidden or 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
[Topic("pubsub", "dapreventhub")] | |
[HttpPost("/receiver")] | |
public async Task<IActionResult> Subscriber(WeatherChange weatherChange) | |
{ | |
// Deserialize incoming order summary | |
_logger.LogInformation("Received Weather: {@WeatherChange}", weatherChange); | |
return Ok(); | |
} |
This file contains hidden or 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
app.UseEndpoints(endpoints => | |
{ | |
endpoints.MapSubscribeHandler(); | |
endpoints.MapControllers(); | |
}); |
This file contains hidden or 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
app.UseEndpoints(endpoints => | |
{ | |
endpoints.MapSubscribeHandler(); | |
endpoints.MapControllers(); | |
}); |