Closed fireproofsocks closed 4 years ago
@fireproofsocks you are looking for a way to add specific metadata to each message, different for different messages? Because if you want to add some metadata to all messages, test_messages/3
supports a :metadata
option that takes a map. Thoughts?
Yes, please use the :metadata
option. Thanks.
The metadata
option is helpful, but yes: each message may require custom metadata, so unfortunately, it's not a solution that works for our use-cases. We have a lot of pipelines (and this holds true for ETLs I've worked on in Python), and I've never seen any messages that could have shared the exact same metadata.
You can publish the messages individually though, can't you? Is there any benefit in publishing multiple of them in your tests?
The implementation of
Broadway.test_messages/3
is too simplistic to be useful for many use cases. It would be nice if it were possible to createmetadata
in the test messages instead of just mapping to the messagedata
field.Currently, I have to roll my own test messages something like this:
I think an easier UI might be to be able to supply a list of maps to
Broadway.test_messages/3
.