Class DaprPublish
How the gateway puts a CloudEvent on a Dapr topic: as a raw payload, so the stream holds the protobuf CloudEvent exactly as encoded (ToStreamBytes(CloudEvent)) and subscriptions read it back verbatim.
public static class DaprPublish
- Inheritance
-
DaprPublish
- Inherited Members
Fields
ProtobufCloudEventContentType
Content type of a stream entry: a CloudEvent as protobuf.
public const string ProtobufCloudEventContentType = "application/cloudevents+protobuf"
Field Value
RawPayloadKey
The Dapr metadata key that turns off Dapr's own CloudEvent wrapping.
public const string RawPayloadKey = "rawPayload"
Field Value
RawPayloadValue
The value of RawPayloadKey.
public const string RawPayloadValue = "true"
Field Value
Methods
PublishCloudEventAsync(DaprClient, string, string, byte[], CancellationToken)
Publishes a protobuf CloudEvent, encoded for the stream, as a raw payload.
public static Task PublishCloudEventAsync(this DaprClient dapr, string pubsubName, string topic, byte[] cloudEvent, CancellationToken cancellationToken = default)
Parameters
daprDaprClientpubsubNamestringtopicstringcloudEventbyte[]cancellationTokenCancellationToken
Returns
RawPayloadMetadata()
The raw-payload metadata, for publishing and subscribing alike.
public static Dictionary<string, string> RawPayloadMetadata()