Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for wrapping bulk chan payloads with metadata #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Limess
Copy link

@Limess Limess commented Jun 17, 2021

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).

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
@mpenet
Copy link
Owner

mpenet commented Sep 23, 2022

Sorry I totally forgot about that one.

Why can't you just use regular clojure metadata on the input request-map?

@Limess
Copy link
Author

Limess commented Feb 27, 2023

I forgot the exact context, but I believe adding any metadata to the request will be sent to Elasticsearch, which won't accept it.

We had the requirement of preserving context through spandex, without affecting the ES request payload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants