Response class for batch map results. Each response corresponds to one input datum and can contain multiple output messages.
const response = batchmap.Response.fromId(datum.id);response.append({ value: Buffer.from('result1'), keys: ['key1'] });response.append({ value: Buffer.from('result2'), keys: ['key2'] }); Copy
const response = batchmap.Response.fromId(datum.id);response.append({ value: Buffer.from('result1'), keys: ['key1'] });response.append({ value: Buffer.from('result2'), keys: ['key2'] });
Create a new batch response for a given datum ID.
The ID of the input datum this response corresponds to
Append an output message to this response.
The message to append with value, keys, and tags
Static
Create a batch response from a datum ID.
The ID of the input datum
A new Response instance
Response class for batch map results. Each response corresponds to one input datum and can contain multiple output messages.
Example