Aria Event Notification: Kafka Response Configuration Guide
Overview
Aria's Event Manager determines whether an outbound event succeeded or failed by evaluating the response body returned by the destination listener. By default, Aria looks for an explicit "OK" or "Success" string in the response.
Certain event handlers—such as Kafka-based REST proxies—use schema-driven responses where success is signalled by the absence of error fields, not by a positive string. This guide documents the confirmed working configuration for correctly recording Kafka-based event responses as successes in Aria's event logs, with no code changes required.
Background & Problem Statement
When a Kafka REST proxy successfully delivers an event, it returns a response structured like the following:
{
"offsets": [
{
"partition": 1,
"offset": 5611034,
"error_code": null,
"error": null
}
],
"key_schema_id": null,
"value_schema_id": null
}
What each field means
| Field | Successful value | What it indicates |
|---|---|---|
offset |
Non-negative integer (e.g. 5611034) |
Message was written to a Kafka partition |
error_code |
null |
No Kafka-level error code was raised |
error |
null |
No error message was returned |
Why this causes failures in Aria
Kafka's schema-driven response format cannot be modified to inject an "OK" or "success" string. As a result, Aria's default success detection records all events from Kafka-based listeners as failures—even when delivery was successful—because the expected positive string is never present in the response body.
Solution: Configurable Success Pattern
Aria's success/failure determination is configurable per event step via the Server Response field in the Method Settings screen (Configuration > Notifications > Events > [Event] > Method Settings).
This field accepts a regular expression (regex) pattern that is matched against the full response body to determine success. By providing a pattern that matches the Kafka success response, Aria will correctly mark events as successful.
No deployment required. The pattern can be updated directly from the UI—no code changes are needed.
What is a regex pattern? A regular expression is a sequence of characters that defines a search rule. Aria uses it to scan the Kafka response text and check whether the response looks like a success. Confirmed patterns are provided below.
Confirmed Working Patterns
Three patterns have been confirmed to work. Choose the level of strictness appropriate for your use case. The Strict pattern is recommended for production use.
| Level | Pattern (enter exactly as shown) | What it validates |
|---|---|---|
| Loose | /"error":null/ |
No error field in the response |
| Medium | /"error_code":null.*"error":null/ |
Both error fields are null |
| Strict ★ (Recommended) | /"offset":\d+.*"error_code":null.*"error":null/ |
Message written to partition and both error fields are null |
Why the Strict pattern is recommended: It confirms that a message was actually written to a Kafka partition (the "offset" field contains a real non-negative integer) in addition to validating that both error fields are null. This is more reliable than checking for the absence of errors alone.
Configuration Steps
-
Open the event in Aria. Navigate to
Configuration > Notifications > Eventsand open the relevant event. -
Select the Method Settings step. Choose the Method Settings step that corresponds to the Kafka destination.
-
Enter the success pattern. In the Server Response field, enter the strict pattern (recommended):
/"offset":\d+.*"error_code":null.*"error":null/
Alternatively, use the loose pattern if you need a simpler match:
/"error":null/
-
Save the configuration.
-
Trigger a test event and verify. Fire a test event and check the event logs to confirm the status now shows Success.
Important: Always trigger test events after saving the updated configuration. Pre-existing log entries will not be retroactively updated.
Troubleshooting
If events continue to record as failures after updating the Server Response field, work through the checks below in order.
Pattern delimiters missing The forward slashes surrounding the pattern (e.g. /…/) are required. Omitting them will cause the match to fail. Double-check that your entry starts and ends with a /.
Field mapping not verified Confirm the Server Response field in the UI maps to the prov_success_pattern column in the database. If uncertain, request the DB script from Aria Engineering—it can be pre-populated with the correct client_no, prov_set_no, and prov_step_no.
Unexpected response body format Verify that the actual Kafka response body matches the expected structure. Use the Server Response modal in the event log to inspect the raw response returned by the listener.
Whitespace sensitivity The medium pattern uses \s* to accommodate variable whitespace around null values. If the strict pattern fails, try the loose pattern (/"error":null/) to isolate whether whitespace in the response is causing a mismatch.
Summary
The following configuration has been confirmed to correctly record Kafka-based Aria events as successes:
- No code changes to the Aria event handler are required.
- The Server Response field in Method Settings accepts a regex pattern matched against the full response body.
- Strict pattern (recommended):
/"offset":\d+.*"error_code":null.*"error":null/ - Loose pattern (acceptable):
/"error":null/ - Forward slash delimiters around the pattern are required for correct matching.
Applicability: This configuration applies to any Aria client using a Kafka REST proxy or similar schema-driven listener where success is indicated by the absence of error fields rather than an explicit success string.