You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update pubsub-raw.md
Updating Raw PubSub doc to be more specific about content type and delivery details.
Signed-off-by: Alice Gibbons <[email protected]>
* Update daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-raw.md
Signed-off-by: Mark Fussell <[email protected]>
---------
Signed-off-by: Alice Gibbons <[email protected]>
Signed-off-by: Mark Fussell <[email protected]>
Co-authored-by: Mark Fussell <[email protected]>
Copy file name to clipboardExpand all lines: daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-raw.md
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ weight: 2200
6
6
description: "Learn when you might not use CloudEvents and how to disable them."
7
7
---
8
8
9
-
When adding Dapr to your application, some services may still need to communicate via pub/sub messages not encapsulated in CloudEvents, due to either compatibility reasons or some apps not using Dapr. These are referred to as "raw" pub/sub messages. Dapr enables apps to [publish and subscribe to raw events]({{< ref "pubsub-cloudevents.md#publishing-raw-messages" >}}) not wrapped in a CloudEvent for compatibility.
9
+
When adding Dapr to your application, some services may still need to communicate via pub/sub messages not encapsulated in CloudEvents, due to either compatibility reasons or some apps not using Dapr. These are referred to as "raw" pub/sub messages. Dapr enables apps to [publish and subscribe to raw events]({{< ref "pubsub-cloudevents.md#publishing-raw-messages" >}}) not wrapped in a CloudEvent for compatibility and to send data that is not JSON serializable.
Dapr apps are also able to subscribe to raw events coming from existing pub/sub topics that do not use CloudEvent encapsulation.
108
+
Dapr apps can subscribe to raw messages from pub/sub topics, even if they weren’t published as CloudEvents. However, the subscribing Dapr process still wraps these raw messages in a CloudEvent before delivering them to the subscribing application.
109
109
110
110
<imgsrc="/images/pubsub_subscribe_raw.png"alt="Diagram showing how to subscribe with Dapr when publisher does not use Dapr or CloudEvent"width=1000>
111
111
112
112
### Programmatically subscribe to raw events
113
113
114
-
When subscribing programmatically, add the additional metadata entry for `rawPayload` to allow the subscriber to receive a message that is not wrapped by a CloudEvent. For .NET, this metadata entry is called `isRawPayload`.
114
+
When subscribing programmatically, add the additional metadata entry for `rawPayload` to allow the subscriber to receive a message that is not wrapped by a CloudEvent. For .NET, this metadata entry is called `isRawPayload`.
115
+
116
+
When using raw payloads the message is always base64 encoded with content type `application/octet-stream`.
115
117
116
118
{{< tabs ".NET" "Python" "PHP" >}}
117
119
@@ -242,4 +244,4 @@ scopes:
242
244
- Learn more about [publishing and subscribing messages]({{< ref pubsub-overview.md >}})
243
245
- List of [pub/sub components]({{< ref supported-pubsub >}})
244
246
- Read the [API reference]({{< ref pubsub_api.md >}})
245
-
- Read the .NET sample on how to [consume Kafka messages without CloudEvents](https://github.com/dapr/samples/pubsub-raw-payload)
247
+
- Read the .NET sample on how to [consume Kafka messages without CloudEvents](https://github.com/dapr/samples/pubsub-raw-payload)
0 commit comments