package eventbus.v1

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

service PubSub

pubsub_api.proto:242

The Pub/Sub API provides a single interface for publishing and subscribing to platform events, including real-time event monitoring events, and change data capture events. The Pub/Sub API is a gRPC API that is based on HTTP/2. A session token is needed to authenticate. Any of the Salesforce supported OAuth flows can be used to obtain a session token: https://help.salesforce.com/articleView?id=sf.remoteaccess_oauth_flows.htm&type=5 For each RPC, a client needs to pass authentication information as metadata headers (https://www.grpc.io/docs/guides/concepts/#metadata) with their method call. For Salesforce session token authentication, use: accesstoken : access token instanceurl : Salesforce instance URL tenantid : tenant/org id of the client StatusException is thrown in case of response failure for any request.

message ConsumerEvent

pubsub_api.proto:72

Represents an event that is consumed in a subscriber client. In addition to the fields in ProducerEvent, ConsumerEvent has the replay_id field.

Used in: FetchResponse

message Error

pubsub_api.proto:95

Contains error information for an error that an RPC method returns.

Used in: PublishResult

enum ErrorCode

pubsub_api.proto:103

Supported error codes

Used in: Error

message EventHeader

pubsub_api.proto:49

Reserved for future use. Header that contains information for distributed tracing, filtering, routing, etc. For example, X-B3-* headers assigned by a publisher are stored with the event and can provide a full distributed trace of the event across its entire lifecycle.

Used in: ProducerEvent

message ProducerEvent

pubsub_api.proto:57

Represents an event that an event publishing app creates.

Used in: ConsumerEvent, PublishRequest

message PublishRequest

pubsub_api.proto:199

Request for the Publish and PublishStream RPC method.

Used as request type in: PubSub.Publish, PubSub.PublishStream

message PublishResponse

pubsub_api.proto:215

Response for the Publish and PublishStream RPC methods. This returns a list of PublishResults for each event that the client attempted to publish. PublishResult indicates if publish succeeded or not for each event. It also returns the schema ID that was used to create the ProducerEvents in the PublishRequest.

Used as response type in: PubSub.Publish, PubSub.PublishStream

message PublishResult

pubsub_api.proto:85

Event publish result that the Publish RPC method returns. The result contains replay_id or a publish error.

Used in: PublishResponse

enum ReplayPreset

pubsub_api.proto:112

Supported subscription replay start values. By default, the subscription will start at the tip of the stream if ReplayPreset is not specified.

Used in: FetchRequest