Class: MessageStreamDefinition

.StreamManager~MessageStreamDefinition(name, maxSize, streamSegmentSize, timeToLiveMillis, strategyOnFull, persistence, flushOnWrite, exportDefinition)

Object defining a message stream used in the CreateMessageStream and UpdateMessageStream API.

Constructor

new MessageStreamDefinition(name, maxSize, streamSegmentSize, timeToLiveMillis, strategyOnFull, persistence, flushOnWrite, exportDefinition)

Parameters:
Name Type Default Description
name String null The unique name of the stream. Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
maxSize Number 268435456 The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB.
streamSegmentSize Number 16777216 The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB. Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted.
timeToLiveMillis Number null Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires. The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
strategyOnFull aws-greengrass-core-sdk.StreamManager.StrategyOnFull null What to do when the maximum size of the stream is reached. RejectNewData: any append message request after the stream is full will be rejected with an exception. OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message.
persistence aws-greengrass-core-sdk.StreamManager.Persistence null Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts. Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk.
flushOnWrite Boolean null This only applies when Persistence is set to File mode. Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false.
exportDefinition aws-greengrass-core-sdk.StreamManager.ExportDefinition null Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail.
Source:

Members

exportDefinition

Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail.
Source:

exportDefinition

Source:

flushOnWrite

This only applies when Persistence is set to File mode. Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false.
Source:

flushOnWrite

Source:

maxSize

The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB.
Source:

maxSize

Source:

name

The unique name of the stream. Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
Source:

name

Source:

persistence

Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts. Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk.
Source:

persistence

Source:

strategyOnFull

What to do when the maximum size of the stream is reached. RejectNewData: any append message request after the stream is full will be rejected with an exception. OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message.
Source:

strategyOnFull

Source:

streamSegmentSize

The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB. Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted.
Source:

streamSegmentSize

Source:

timeToLiveMillis

Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires. The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
Source:

timeToLiveMillis

Source:

Methods

withExportDefinition(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

Parameters:
Name Type Description
value aws-greengrass-core-sdk.StreamManager.ExportDefinition Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail.
Source:
Returns:
Type
aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition

withFlushOnWrite(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

Parameters:
Name Type Description
value Boolean This only applies when Persistence is set to File mode. Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false.
Source:
Returns:
Type
aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition

withMaxSize(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

Parameters:
Name Type Description
value Number The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB.
Source:
Returns:
Type
aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition

withName(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

Parameters:
Name Type Description
value String The unique name of the stream. Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
Source:
Returns:
Type
aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition

withPersistence(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

Parameters:
Name Type Description
value aws-greengrass-core-sdk.StreamManager.Persistence Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts. Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk.
Source:
Returns:
Type
aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition

withStrategyOnFull(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

Parameters:
Name Type Description
value aws-greengrass-core-sdk.StreamManager.StrategyOnFull What to do when the maximum size of the stream is reached. RejectNewData: any append message request after the stream is full will be rejected with an exception. OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message.
Source:
Returns:
Type
aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition

withStreamSegmentSize(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

Parameters:
Name Type Description
value Number The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB. Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted.
Source:
Returns:
Type
aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition

withTimeToLiveMillis(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

Parameters:
Name Type Description
value Number Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires. The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
Source:
Returns:
Type
aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition