Skip to content

Instantly share code, notes, and snippets.

DaprAdventures.SubscriberService.Controllers.WeatherForecastController: Information: Received Weather: DaprAdventures.SubscriberService.Models.WeatherChange
info: DaprAdventures.SubscriberService.Controllers.WeatherForecastController[0]
Received Weather: DaprAdventures.SubscriberService.Models.WeatherChange
@kshitijcode
kshitijcode / pulisherServiceReceiveEvent
Created July 8, 2021 03:09
Dapr Subscriber Service Receives Event
DaprAdventures.SubscriberService.Controllers.WeatherForecastController: Information: Received Weather: DaprAdventures.SubscriberService.Models.WeatherChange
info: DaprAdventures.SubscriberService.Controllers.WeatherForecastController[0]
Received Weather: DaprAdventures.SubscriberService.Models.WeatherChange
@kshitijcode
kshitijcode / daprlogsSubscriberPostServiceApp
Created July 7, 2021 12:35
Dapr logs after the Subscriber service comes up
✅ You're up and running! Dapr logs will appear here.
INFO[1851] application discovered on port 5200 app_id=subscriber-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2
INFO[1851] application configuration loaded app_id=subscriber-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2
INFO[1851] actor runtime started. actor idle timeout: 1h0m0s. actor scan interval: 30s app_id=subscriber-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime.actor type=log ver=1.2.2
INFO[1851] app is subscribed to the following topics: [dapreventhub] through pubsub=pubsub app_id=subscriber-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2
INFO[1851] placement tables updated, version: 0 app_id=subscriber-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime.actor.internal.placement type=log ver=1.2.2
INFO[1856] dapr initialized. Status: Running. Init Elapsed 1.856553631e+06ms app_id=su
[Topic("pubsub", "dapreventhub")]
[HttpPost("/receiver")]
public async Task<IActionResult> Subscriber(WeatherChange weatherChange)
{
_logger.LogInformation("Received Weather: {@WeatherChange}", weatherChange);
return Ok();
}
@kshitijcode
kshitijcode / daprmapSubscribeHandler
Created July 7, 2021 12:28
MapSubscribeHandlerSnippet
app.UseEndpoints(endpoints =>
{
endpoints.MapSubscribeHandler();
endpoints.MapControllers();
});
app.UseEndpoints(endpoints =>
{
endpoints.MapSubscribeHandler();
endpoints.MapControllers();
});
[Topic("pubsub", "dapreventhub")]
[HttpPost("/receiver")]
public async Task<IActionResult> Subscriber(WeatherChange weatherChange)
{
// Deserialize incoming order summary
_logger.LogInformation("Received Weather: {@WeatherChange}", weatherChange);
return Ok();
}
[Topic("pubsub", "dapreventhub")]
[HttpPost("/receiver")]
public async Task<IActionResult> Subscriber(WeatherChange weatherChange)
{
// Deserialize incoming order summary
_logger.LogInformation("Received Weather: {@WeatherChange}", weatherChange);
return Ok();
}
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
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