Class PubsubExtensions (3.1.0)

public static 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
NameDescription
msgPubsubMessage
Returns
TypeDescription
Nullable<Int32>

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.