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

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

Google.Cloud.PubSub.V1

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
Name Description
msg PubsubMessage
Returns
Type Description
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.