Node SDK

Interface OffloadOptions<T>

Legend

  • Namespace
  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Interface
  • Interface with type parameter
  • Property
  • Method
  • Enumeration
  • Class

These options for an RStreamsSdk.offload pipeline step. This reads events from a queue and allows for the processing of the data. Note this inherits all the useful options from ReadOptions which control reading from inQueue.

see

RStreamsSdk.offload

see

RStreamsSdk.offloadEvents

Type parameters

  • T

    The type of the event read from the source inQueue

Hierarchy

Index

Properties

debug?: boolean
deprecated

Don't use.

fast_s3_read?: boolean

If true, connect to multiple S3 files simultaneously to pre-fetch files when reading from a queue that has events stored in S3. This is a new feature and so is not on by default, though it can dramatically improve read performance. It is expected to be made the default in Q3 2022.

beta

In use now in production and being monitored. Expected to be GA and made the default in Q3 2022.

see

WriteOptions.useS3

fast_s3_read_parallel_fetch_max_bytes?: number

When using the ReadOptions.fast_s3_read feature, this specifies how many bytes of s3 data we want to prefetch. The default usually is correct.

default

5mb worth of bytes

fast_s3_read_timeout_retry_count?: number

When using the ReadOptions.fast_s3_read feature, this specifies how many retries for S3 timeouts before giving up on preconnecting. The default usually is correct.

default

1 retry

force?: boolean
id: string

The name of the bot that this code is acting as. The SDK will use it to query to the bot Dynamo DB table to pull checkpoints and to checkpoint for you.

inQueue: string

The source queue from which events will be read

limit?: number

The limit of the number of records, events, to read in total from the queue before closing the read stream.

default

unbounded

The read stream will shutdown as soon as one of the constraints is met: runTime, loops, limit, size, stopTime.

loops?: number

The max number of times the SDK will query the stream for new events before it shuts down the read stream. Consider that each query by the SDK to retrieve events from DynamoDB could return many, many events and that an "event" may actually be a pointer to an S3 file full of events.

It is uncommon for developers to have to set this, much less know it exists.

default

100

maxOverride?: string

The largest event ID that you should read, exclusive. So, stop reading when you arrive at this event ID. Use startTime and this option to read a range of events from a queue.

default

The SDK will take the current time and turn it into an event ID.

see

Fundamentals: Event ID

runTime?: DurationInputArg1

The duration of time the to read for before closing the read stream. It is common to set this to 75% to 80% of the time remaining before the lambda is shut down to give the lambda sufficient time to finish processing. Of course, different types of processing will differ.

Note, this type is any one of the valid durations the Moment JS library can take: Duration | number | string | FromTo | DurationInputObject.

The read stream will shutdown as soon as one of the constraints is met: runTime, loops, limit, size, stopTime.

size?: number

The limit of the number of bytes to read in total from the queue before closing the read stream.

default

unbounded

The read stream will shutdown as soon as one of the constraints is met: runTime, loops, limit, size, stopTime.

start?: string

The event ID of the starting position to read from with in the queue. It is common to not provide this because each queue is stateful in that it remembers the last read position of a bot. Then, as bots read they make a call back to the RStreams Bus to update the read position.

Usually, the SDK just handles this for you. So, if the start isn't provided, the SDK will just use the bot's last read position as the starting point. So, as bots are invoked, read some events and do some processing, they automatically update back how far they've read to and then the bot shuts down after a period of time. When the bot starts back up to read again, it knows where it last read from and just continues.

see

Fundamentals: Event ID

stopTime?: number

When to stop reading as a time since the epoch.

stream_query_limit?: number

The max number of records, events, the SDK should retrieve each time it retrieves events from the RStreams Bus' Dynamo DB events table.

default:

50 if ReadOptions.fast_s3_read is false

default:

1000 if ReadOptions.fast_s3_read is true

subqueue?: string
deprecated

Don't use.

Methods

Generated using TypeDoc