Collection<RequestPayload> matchingPayloads = enrichmentService.getMatchingPayloads(request);
if (!matchingPayloads.isEmpty()) {
if (matchingPayloads.size() > 1) {
pushException(new MultipleGroupsPerRequestException(request.getUri()));
} else {
enrichHttpRequest.fire(new EnrichHttpRequest(request, matchingPayloads.iterator().next(), enrichmentService));
}
}
}