Application logs in pub-sub sample have empty payload {}
See original GitHub issueI was trying out the pub-sub sample.
Expected Behavior
In response to dapr publish --topic A --payload '{ "message": "This is a test" }'
, the pub-sub sample logs should be something like [0m?[94;1m== APP == Topic A: { id: '5780e2ca-f526-4839-92e5-a0a30aff829a', source: 'react-form', type: 'com.dapr.event.sent', specversion: '0.3',data: { message: 'this is a test' } }
(as per docs)
Actual Behavior
What I see is the following: APP == A: {}
Steps to Reproduce the Problem
- git clone https://github.com/dapr/samples
- cd node-subscriber
- npm install
- dapr run --app-id node-subscriber --app-port 3000 node app.js
- dapr publish --topic A --payload ‘{ “message”: “This is a test” }’
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Payload unwrapping for Pub/Sub push subscriptions
With payload unwrapping, the message data is delivered directly as the HTTP body. Without payload unwrapping, Pub/Sub delivers a JSON object that contains ......
Read more >Pub/Sub triggers | Cloud Functions for Firebase - Google
Google Cloud's Pub/Sub is a globally distributed message bus that automatically scales as you need it. You can trigger a function whenever a...
Read more >Pub/sub API reference
Dapr assumes that a JSON-encoded payload response without status field or an empty payload responses with HTTP 2xx is a SUCCESS . message...
Read more >Best Practices for Monitoring GCP Audit Logs
Learn how to monitor your Google Cloud audit logs for better visibility into GCP security with Datadog.
Read more >Using Cloud Pub/Sub as an endpoint for your app
To use Cloud Pub/Sub with your app, you need to create a Google Cloud Platform project ... Fill out the other fields as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes it’s fixed! This is what I see in the logs
@abhirockzz Great! Thanks for the reporting. This sample was broken by the change right after we announced v0.1.0 Dapr. We tag the version to sample to avoid this situation.