You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bridge: support raw inputs for transformations (#975)
Adds a bunch of plumbing to allow the message payloads from consumers to
be passed to transformations as strings rather than pre-parsing as JSON
in rust.
One concrete use case for this is if the system publishing those
messages to the queue is sending XML or perhaps base64 encoded data.
When configured to specify the `format` of a transformation, you can set
it to `string` rather than the default `json`. Then, when the
transformation receives that string as an argument, it can do whatever
parsing is required in order to return a valid `Object`.
Tests have been added up and down the stack to show that strings are
handled correctly, and that the new config data is propagated.
Notable omissions:
- redis relies on JSON values internally and can't easily support "raw"
inputs. We can revisit this when we switch to `omniqueue` since I
believe it handles this better.
- [x] webhook receivers _can support_ raw inputs, I think, but _don't
currently_.
I'll try to get this going before the PR merges.
Update: got receivers going now. For both senders and receivers, we now
check the configuration to catch cases where redis is paired with a
string transformation and call that an Error. There's some tests in
place to make sure those errors show up early in the process, rather
than waiting for some message to come through.
0 commit comments