---
schema_version: "1"
id: 8d740377dc85183052002556a02e302451136579bf26aea66f8118935f4a81fb
title: Set a Deadline on the GetSchema, GetTopic, and Publish Unary RPC Methods
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/event-bus/pub-sub-api/guides/set-a-deadline.md
canonical_url: https://developer.salesforce.com/docs/platform/pub-sub-api/guide/set-a-deadline.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 70c107daca0567ac9be44771104641ba493e5f98dde346b7d86d5d80b9cb3f09
products:
  - Pub/Sub API
  - Event Bus Docs
---
# Set a Deadline on the `GetSchema`, `GetTopic`, and `Publish` Unary RPC Methods

Set a deadline of 10 minutes or less on the `GetSchema`, `GetTopic`, and `Publish` unary RPC methods so that you can retry a request that takes too long. When you set a deadline, a `DEADLINE_EXCEEDED` status code is returned if you don't receive a response within the allotted time.

Without a deadline, it is difficult for you to know if a request should be retried.

For more information and sample code, see [the gRPC deadlines documentation](https://grpc.io/docs/guides/deadlines/).
