Class: PollWorkflowTaskQueueResponse
Represents a PollWorkflowTaskQueueResponse.
Properties
attempt
attempt:
number
Starting at 1, the number of attempts to complete this task by any worker.
backlogCountHint
backlogCountHint:
Long
A hint that there are more tasks already present in this task queue partition. Can be used to prioritize draining a sticky queue.
Specifically, the returned number is the number of tasks remaining in the in-memory buffer for this partition, which is currently capped at 1000. Because sticky queues only have one partition, this number is more useful when draining them. Normal queues, typically having more than one partition, will return a number representing only some portion of the overall backlog. Subsequent RPCs may not hit the same partition as this call.
history?
optionalhistory?:$Properties|null
The history for this workflow, which will either be complete or partial. Partial histories are sent to workers who have signaled that they are using a sticky queue when completing a workflow task.
messages
messages:
$Properties[]
Protocol messages piggybacking on a WFT as a transport
nextPageToken
nextPageToken:
Uint8Array
Will be set if there are more history events than were included in this response. Such events
should be fetched via GetWorkflowExecutionHistory.
pollerGroupId
pollerGroupId:
string
This poller group ID identifies the owner of the workflow task awaiting for query response. Corresponding RespondQueryTaskCompleted should pass this value for proper routing.
pollerGroupInfos
pollerGroupInfos:
$Properties[]
Deprecated. Use poller_groups_info instead, which carries a version so the client can
ignore stale updates.
The weighted list of poller groups IDs that client should use for future polls to this task
queue. Client is expected to:
- Maintain minimum number of pollers no less than the number of groups.
- Try to assign the next poll to a group without any pending polls,
- If every group has some pending polls, assign the next poll to a group randomly according to the weights.
pollerGroupsInfo?
optionalpollerGroupsInfo?:$Properties|null
The weighted, versioned list of poller groups IDs that client should use for future polls to
this task queue. Client should ignore this if it has already applied a snapshot with a
version greater than or equal to poller_groups_info.version. Client is expected to:
- Maintain minimum number of pollers no less than the number of groups.
- Try to assign the next poll to a group without any pending polls,
- If every group has some pending polls, assign the next poll to a group randomly according to the weights.
pollerScalingDecision?
optionalpollerScalingDecision?:$Properties|null
Server-advised information the SDK may use to adjust its poller count.
previousStartedEventId
previousStartedEventId:
Long
The last workflow task started event which was processed by some worker for this execution. Will be zero if no task has ever started.
queries
queries:
object
Queries that should be executed after applying the history in this task. Responses should be
attached to RespondWorkflowTaskCompletedRequest::query_results
Index Signature
[k: string]: $Properties
query?
optionalquery?:$Properties|null
Legacy queries appear in this field. The query must be responded to via
RespondQueryTaskCompleted. If the workflow is already closed (queries are permitted on
closed workflows) then the history field will be populated with the entire history. It
may also be populated if this task originates on a non-sticky queue.
scheduledTime?
optionalscheduledTime?:$Properties|null
When this task was scheduled by the server
startedEventId
startedEventId:
Long
The id of the most recent workflow task started event, which will have been generated as a result of this poll request being served. Will be zero if the task does not contain any events which would advance history (no new WFT started). Currently this can happen for queries.
startedTime?
optionalstartedTime?:$Properties|null
When the current workflow task started event was generated, meaning the current attempt.
taskToken
taskToken:
Uint8Array
A unique identifier for this task
workflowExecution?
optionalworkflowExecution?:$Properties|null
PollWorkflowTaskQueueResponse workflowExecution.
workflowExecutionTaskQueue?
optionalworkflowExecutionTaskQueue?:$Properties|null
The task queue this task originated from, which will always be the original non-sticky name for the queue, even if this response came from polling a sticky queue.
workflowType?
optionalworkflowType?:$Properties|null
PollWorkflowTaskQueueResponse workflowType.
Methods
toJSON()
toJSON():
object
Converts this PollWorkflowTaskQueueResponse to JSON.
Returns
object
JSON object
create()
Call Signature
staticcreate(properties?):PollWorkflowTaskQueueResponse&$Shape
Creates a new PollWorkflowTaskQueueResponse instance using the specified properties.
Parameters
properties?
Properties to set
Returns
PollWorkflowTaskQueueResponse & $Shape
PollWorkflowTaskQueueResponse instance
Call Signature
staticcreate(properties?):PollWorkflowTaskQueueResponse
Creates a new PollWorkflowTaskQueueResponse instance using the specified properties.
Parameters
properties?
Properties to set
Returns
PollWorkflowTaskQueueResponse
PollWorkflowTaskQueueResponse instance
decode()
staticdecode(reader,length?):PollWorkflowTaskQueueResponse&$Shape
Decodes a PollWorkflowTaskQueueResponse message from the specified reader or buffer.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
length?
number
Message length if known beforehand
Returns
PollWorkflowTaskQueueResponse & $Shape
PollWorkflowTaskQueueResponse
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited()
staticdecodeDelimited(reader):PollWorkflowTaskQueueResponse&$Shape
Decodes a PollWorkflowTaskQueueResponse message from the specified reader or buffer, length delimited.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
Returns
PollWorkflowTaskQueueResponse & $Shape
PollWorkflowTaskQueueResponse
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
encode()
staticencode(message,writer?):Writer
Encodes the specified PollWorkflowTaskQueueResponse message. Does not implicitly temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse.verify|verify messages.
Parameters
message
PollWorkflowTaskQueueResponse message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
encodeDelimited()
staticencodeDelimited(message,writer?):Writer
Encodes the specified PollWorkflowTaskQueueResponse message, length delimited. Does not implicitly temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse.verify|verify messages.
Parameters
message
PollWorkflowTaskQueueResponse message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
staticfromObject(object):PollWorkflowTaskQueueResponse
Creates a PollWorkflowTaskQueueResponse message from a plain object. Also converts values to their respective internal types.
Parameters
object
Plain object
Returns
PollWorkflowTaskQueueResponse
PollWorkflowTaskQueueResponse
toObject()
statictoObject(message,options?):object
Creates a plain object from a PollWorkflowTaskQueueResponse message. Also converts values to other types if specified.
Parameters
message
PollWorkflowTaskQueueResponse
PollWorkflowTaskQueueResponse
options?
IConversionOptions
Conversion options
Returns
object
Plain object