< Back

Set-GcpsAckDeadline

Mon Jan 13, 2020 11:52 pm

NAME Set-GcpsAckDeadline



SYNOPSIS

Setting acknowledgement deadline in seconds for one or more PubSub messages.





SYNTAX

Set-GcpsAckDeadline -AckDeadline <int> [-Project <string>] [-Subscription] <string> -AckId <string[]>

[<CommonParameters>]



Set-GcpsAckDeadline -AckDeadline <int> -InputObject <PubSubMessageWithAckIdAndSubscription[]> [<CommonParameters>]





DESCRIPTION

Setting acknowledgement deadline in seconds for one or more PubSub messages. Will raise errors if the subscription

that the messages are pulled from does not exist. The cmdlet will search for the subscription and the messages in

the default project if -Project is not used. To set the acknowledgement deadline for messages from a single

subscription, use -Subscription to provide the name of the subscription and -AckId to provide a list of Ack Ids

for that subscription. To send acknowledgement for messages objects returned by Get-GcpsMessage cmdlet, use the

-InputObject parameter.





PARAMETERS

-AckDeadline <int>

The ack deadline to be set (in seconds).



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-Project <string>

The project that the subscription belongs to. If not set via PowerShell parameter processing, will default to

the Cloud SDK's DefaultProject property.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Subscription <string>

The name of the subscription that the messages are pulled from. This parameter is used with -AckId parameter.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <string>

The name of the subscription that the messages are pulled from. This parameter is used with -AckId parameter.



This is an alias of the Subscription parameter.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AckId <string[]>

The list of AckIds of the pulled messages from the provided subscription. This parameter is used with -Name

parameter.



Required? true

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-InputObject <PubSubMessageWithAckIdAndSubscription[]>

The list of PubSub messages that the cmdlet will send acknowledgement for.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String[]

The list of AckIds of the pulled messages from the provided subscription. This parameter is used with -Name

parameter.



Google.PowerShell.PubSub.PubSubMessageWithAckIdAndSubscription[]

The list of PubSub messages that the cmdlet will send acknowledgement for.





OUTPUTS



---------- EXAMPLE 1 ----------



PS C:\\> Set-GcpsAckDeadline -Subscription "my-subscription" -AckId "ackId" -AckDeadline 10



This command sets the acknowledgement deadline for message with Ack Id "ackId" from subscription "my-subscription"

in the default project to 10s.

---------- EXAMPLE 2 ----------



PS C:\\> Set-GcpsAckDeadline -Subscription "my-subscription" `

-AckId "ackId1", "ackId2" -Project "my-project" -AckDeadline 10



This command sets the acknowledgement deadline for messages with Ack Ids "ackId1" and "ackId2" from subscription

"my-subscription" in the project "my-project" to 10s.

---------- EXAMPLE 3 ----------



PS C:\\> $messages = Get-GcpsMessage -Subscription "my-subscription"

PS C:\\> Set-GcpsAckDeadline -InputObject $messages -AckDeadline 10



This command sets the acknowledgement deadline for messages pulled from subscription "my-subscription" to 10s.



RELATED LINKS

[Pull Messages Acknowledgement Deadline] (https://cloud.google.com/pubsub/docs/su ... k_deadline)