[SDK reference](../../index.md) / [Models](../index.md) / [Events](index.md)

# TopicSubscription

**Kind:** class  
**Namespace:** `Egulu.Sdk.Models.Events`  

A pull subscription to a topic (MSG-4): consumers lease events with `:pull`, then `:acknowledge`, `:nack` or `:extendLease`.

## Properties

| Name | Type | JSON name | Description |
|---|---|---|---|
| `AckDeadlineSeconds` | `int?` | `ackDeadlineSeconds` | Seconds a leased event stays invisible to other consumers (1..600, default 30; for a push subscription, the time a delivery may stay in flight is the webhook engine's). |
| `AcknowledgedCount` | `long?` | `acknowledgedCount` | Events acknowledged in total. |
| `Annotations` | `Models.Events.TopicSubscription_annotations?` | `annotations` | At most 256 KiB in all; never policy input. |
| `BacklogCount` | `long?` | `backlogCount` | Events waiting for a consumer. |
| `CreateTime` | `DateTimeOffset?` | `createTime` | The createTime property |
| `DeadLetterCount` | `long?` | `deadLetterCount` | Events parked after maxDeliveryAttempts. |
| `DeadLetterTopic` | `string?` | `deadLetterTopic` | A topic in the same project and location that receives an event when this subscription gives up on a delivery (aftermaxDeliveryAttempts of a pull, or when the push retries are exhausted). The event is `plat.topic.delivery-failed.v1`; its data namesthis subscription, the reason and the original event. |
| `DeleteTime` | `DateTimeOffset?` | `deleteTime` | The deleteTime property |
| `Description` | `string?` | `description` | Human-readable description. |
| `DisplayName` | `string?` | `displayName` | Up to 63 characters. |
| `Etag` | `string?` | `etag` | "{generation}"; send it back in If-Match. |
| `Filter` | `string?` | `filter` | Optional filter on the event's CloudEvents attributes and data fields, for example`type = "com.example.order.created" AND data.total >= 100`. An event the filter does not take is stored but not delivered to thissubscription. See `:testFilter` and the filter language of the console's filter tester. At most 1,024 characters. |
| `InFlightCount` | `long?` | `inFlightCount` | Events currently leased. |
| `Labels` | `Models.Events.TopicSubscription_labels?` | `labels` | At most 64. |
| `Location` | `string?` | `location` | Location ID where the subscription is homed. |
| `MaxDeliveryAttempts` | `int?` | `maxDeliveryAttempts` | Delivery attempts before an event is parked as a dead letter (1..100, default 10). |
| `Name` | `string?` | `name` | The resource name, for example projects/p/locations/l/instances/i. |
| `PurgeTime` | `DateTimeOffset?` | `purgeTime` | The purgeTime property |
| `PushWebhookEndpoint` | `string?` | `pushWebhookEndpoint` | Makes this a push subscription: matching events are delivered to this WebhookEndpoint (ID or resource name, same project andlocation) as signed Standard Webhooks requests through the egress path, with the endpoint's retry ladder and circuit breaker. A pushsubscription is not pulled. One push subscription per endpoint. |
| `Reconciling` | `bool?` | `reconciling` | True while the platform works toward the spec. |
| `State` | `Models.Events.TopicSubscriptionState?` | `state` | Topic subscription lifecycle states (MSG-4). |
| `Topic` | `string?` | `topic` | The topic's ID or resource name in the same project and location. |
| `Uid` | `string?` | `uid` | UUIDv7, never reused. |
| `UpdateTime` | `DateTimeOffset?` | `updateTime` | The updateTime property |
