Package ai.pipestream.api.annotation
Annotation Interface ProcessingBuffered
Annotation to enable automatic processing buffer capture for pipeline methods.
When applied to a method that returns ProcessResponse, this annotation will: 1. Automatically capture the output document (PipeDoc) from ProcessResponse 2. Store it in a ProcessingBuffer when enabled via configuration 3. Provide seamless test data capture without manual buffer management
Configuration is controlled via properties: - processing.buffer.enabled: Enable/disable buffer capture (default: false) - processing.buffer.capacity: Buffer capacity (default: 100) - processing.buffer.directory: Save directory (default: target/test-data)
Example usage:
@ProcessingBuffered(type = PipeDoc.class, enabled = "${processing.buffer.enabled:false}")
public Uni<ProcessResponse> processData(ProcessRequest request) {
// Normal processing logic - buffer capture is automatic
return Uni.createFrom().item(response);
}
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
type
Class<? extends com.google.protobuf.Message> typeThe type of protobuf message to capture from the ProcessResponse. Currently supports PipeDoc.class for output document capture. -
enabled
String enabledWhether buffer capture is enabled. Supports configuration expressions like "${processing.buffer.enabled:false}". Default is false to avoid unexpected buffer usage.- Default:
"false"
-
capacity
String capacityBuffer capacity override. Supports configuration expressions like "${processing.buffer.capacity:100}". If not specified, uses the global configuration or default value.- Default:
""
-
directory
String directoryBuffer save directory override. Supports configuration expressions like "${processing.buffer.directory:target/test-data}". If not specified, uses the global configuration or default value.- Default:
""
-
prefix
String prefixBuffer file prefix for saved files. Supports configuration expressions like "${processing.buffer.prefix:processed}". If not specified, uses the module name as prefix.- Default:
""
-