Add support for wrapping bulk chan payloads with metadata #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a non-breaking change, which allows users to pass arbitrary data into the bulk-chan, and then make use of it on the output channel.
An example use case is correlating input with successes and failures. In our use case the elasticsearch ID may not be sufficient for this so extra metadata is required
To add metadata, a user can add a map with a namespaced keyword:
:qbits.spandex/bulk-job
to the input channel, if this keyword exists, it is used as the payload, else the whole input is used as the payload (the current behaviour).