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

Support multiple peer-forwarding components in the same pipeline #3994

Open
3 tasks
dlvenable opened this issue Jan 19, 2024 · 0 comments
Open
3 tasks

Support multiple peer-forwarding components in the same pipeline #3994

dlvenable opened this issue Jan 19, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@dlvenable
Copy link
Member

dlvenable commented Jan 19, 2024

Is your feature request related to a problem? Please describe.

Currently Data Prepper does not support multiple instances of processors that require peer-forwarding in a single pipeline.

processor:
  - aggregate:
  - aggregate:

This is primarily because Data Prepper does not currently distinguish between different plugins of the same type. So when forwarding events, the event would go back to the first aggregate processor.

if (pipelinePeerForwarderReceiveBufferMap.containsKey(pipelineName) &&
pipelinePeerForwarderReceiveBufferMap.get(pipelineName).containsKey(pluginId)) {
throw new RuntimeException("Data Prepper 2.0 will only support a single peer-forwarder per pipeline/plugin type");
}

There is also currently a restriction on sharing the same identification keys.

processors.forEach(processor -> {
if (processor instanceof RequiresPeerForwarding) {
final Set<String> processorIdentificationKeys = new HashSet<>(((RequiresPeerForwarding) processor).getIdentificationKeys());
if (!identificationKeys.equals(processorIdentificationKeys)) {
throw new RuntimeException(
"All the processors of same type within a single pipeline should have same identification keys.");
}
}
});

Describe the solution you'd like

Open up this functionality.

When routing events between peers, Data Prepper includes a destinationPluginId property.

Currently, pluginIds are not unique. Thus, if we forwarded events Data Prepper would not know which aggregate processor to use - the first or second. We should update Data Prepper by:

  1. Supporting dynamic pluginIds as noted in Pipeline Component Ids #1025 and Auto-generate unique component Ids #3995. We do not need configurable plugin Ids for this.
  2. When forwarding events, use the pluginId instead of the plugin type.

By generating component Ids such as aggregate and aggregate2, Data Prepper can forward events to peers and target the correct processor in the processor chain.

Tasks

@dlvenable dlvenable self-assigned this Jan 23, 2024
@dlvenable dlvenable added enhancement New feature or request and removed untriaged labels Jan 23, 2024
@dlvenable dlvenable added this to the v2.7 milestone Jan 23, 2024
@dlvenable dlvenable modified the milestones: v2.7, v2.8 Jan 30, 2024
@dlvenable dlvenable modified the milestones: v2.8, v2.9 Apr 16, 2024
@dlvenable dlvenable removed this from the v2.9 milestone Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant