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

Update DLQ writer writeEntry to switch from plugin_type/plugin_id to elemenet_type/element_id #16463

Open
andsel opened this issue Sep 18, 2024 · 0 comments

Comments

@andsel
Copy link
Contributor

andsel commented Sep 18, 2024

The DeadLetterQueueWriter.writeEntry method

public void writeEntry(Event event, String pluginName, String pluginId, String reason) throws IOException {
accepts two parameters to identify which is the entity that generated the DLQ event.
As of today to identify that entity, the plugin type and plugin id was enough, for example (output, 123456) but with the introduction of #16423 to enqueue also events that fails a conditional evaluation, becomes more meaningful the element_type (such as output, input, if-statement) and element_id (the id of plugin instance or could be the source reference for conditionals).

This means that the @metadata in DLQ input are not

"@metadata" => {
        "dead_letter_queue" => {
             "entry_time" => 2024-09-17T14:45:27.999153Z,
              "plugin_id" => "if-statement",
            "plugin_type" => "if-statement",
                 "reason" => "condition evaluation error, Unexpected conditional input combination of '<no-class>:<null-value>' (left) and 'class org.jruby.RubyFixnum:100' (right)"
        }
    }

but should become like:

"@metadata" => {
  "dead_letter_queue" => {
    "element_id" => ...
    "element_type" => ...
   ...
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant