Cloud Pub/Sub v1 API - Class PubsubExtensions (3.4.0)

Stay organized with collections Save and categorize content based on your preferences.
public static class PubsubExtensions

Reference documentation and code samples for the Cloud Pub/Sub v1 API class PubsubExtensions.

Extensions to pubsub messages.

Inheritance

object > PubsubExtensions

Namespace

GoogleGoogle.CloudGoogle.Cloud.PubSubV1

Assembly

Google.Cloud.PubSub.V1.dll

Methods

GetDeliveryAttempt(PubsubMessage)

public static int? GetDeliveryAttempt(this PubsubMessage msg)

Get the delivery attempt of this message, if it comes from a subscription that has dead-letter queues enabled.

Parameter
NameDescription
msgPubsubMessage
Returns
TypeDescription
int

The delivery attempt; or null if the subscription does not have dead-letter queues enabled.

Remarks

Delivery attempt counter is 1 + (the sum of number of NACKs and number of ack_deadline exceeds) for this message.