Class: ReadMessagesOptions

.StreamManager~ReadMessagesOptions(desiredStartSequenceNumber, minMessageCount, maxMessageCount, readTimeoutMillis)

Options for the ReadMessages API. All fields are optional.

Constructor

new ReadMessagesOptions(desiredStartSequenceNumber, minMessageCount, maxMessageCount, readTimeoutMillis)

Parameters:
Name Type Default Description
desiredStartSequenceNumber Number null The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum.
minMessageCount Number 1 The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown. The minimum values is 1 and the maximum value is 2147483647.
maxMessageCount Number null The maximum number of messages that will be returned. The minimum values is the value of the minimum message count and the maximum value is 2147483647.
readTimeoutMillis Number 0 The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages. If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown. If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached. The maximum value is the value of the client timeout.
Source:

Members

desiredStartSequenceNumber

The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum.
Source:

desiredStartSequenceNumber

Source:

maxMessageCount

The maximum number of messages that will be returned. The minimum values is the value of the minimum message count and the maximum value is 2147483647.
Source:

maxMessageCount

Source:

minMessageCount

The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown. The minimum values is 1 and the maximum value is 2147483647.
Source:

minMessageCount

Source:

readTimeoutMillis

The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages. If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown. If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached. The maximum value is the value of the client timeout.
Source:

readTimeoutMillis

Source:

Methods

withDesiredStartSequenceNumber(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}

Parameters:
Name Type Description
value Number The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum.
Source:
Returns:
Type
aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions

withMaxMessageCount(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}

Parameters:
Name Type Description
value Number The maximum number of messages that will be returned. The minimum values is the value of the minimum message count and the maximum value is 2147483647.
Source:
Returns:
Type
aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions

withMinMessageCount(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}

Parameters:
Name Type Description
value Number The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown. The minimum values is 1 and the maximum value is 2147483647.
Source:
Returns:
Type
aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions

withReadTimeoutMillis(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}

Parameters:
Name Type Description
value Number The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages. If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown. If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached. The maximum value is the value of the client timeout.
Source:
Returns:
Type
aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions