Skip to main content

@terascope/standard-asset-apis / RoutedSender / RoutedSenderOptions

Interface: RoutedSenderOptions

Defined in: RoutedSender.ts:9

Properties

PropertyTypeDefined in
batchSizenumberRoutedSender.ts:10
concurrencyAllStorage?numberRoutedSender.ts:11
concurrencyPerStorage?numberRoutedSender.ts:12

Methods

batchEndHook()?

optional batchEndHook(batchId, route, affectedRows): void | Promise<void>

Defined in: RoutedSender.ts:41

This can be used to track the batches end

Parameters

ParameterType
batchIdnumber
routestring
affectedRowsnumber

Returns

void | Promise<void>


batchStartHook()?

optional batchStartHook(batchId, route, size): void | Promise<void>

Defined in: RoutedSender.ts:36

This can be used to track the batches start

Parameters

ParameterType
batchIdnumber
routestring
sizenumber

Returns

void | Promise<void>


createRouteSenderAPI()

createRouteSenderAPI(route, connection): Promise<RouteSenderAPI>

Defined in: RoutedSender.ts:18

This is used to create a sender apis for a particular and must be implemented by a consumer of this class. This should NOT be called directly

Parameters

ParameterType
routestring
connectionstring

Returns

Promise<RouteSenderAPI>


dataRouteHook()?

optional dataRouteHook(record): void | Promise<void>

Defined in: RoutedSender.ts:31

This is called after the standard:route is pulled from the record metadata and can be used to change the standard:route for data routing (which is used within the route sender api implementations)

Parameters

ParameterType
recordDataEntity

Returns

void | Promise<void>


rejectRecord()

rejectRecord(record, error): void

Defined in: RoutedSender.ts:48

When a reject is missing the required route or metadata to be processed this method will be called with the record and error. This must be implemented because this logic may vary depending on where/how it is being used

Parameters

ParameterType
recordDataEntity
errorunknown

Returns

void


storageRouteHook()?

optional storageRouteHook(record): void | Promise<void>

Defined in: RoutedSender.ts:24

This is called before the first call to standard:route can be used to change the standard:route for storage routing

Parameters

ParameterType
recordDataEntity

Returns

void | Promise<void>