Skip to main content

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

Interface: RoutedSenderOptions

Defined in: RoutedSender.ts:11

Properties​

PropertyTypeDefined in
batchSizenumberRoutedSender.ts:12
concurrencyAllStorage?numberRoutedSender.ts:13
concurrencyPerStorage?numberRoutedSender.ts:14

Methods​

batchEndHook()?​

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

Defined in: RoutedSender.ts:43

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:38

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:20

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:33

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:50

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:26

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>