src/dazzle_back/pra/consumers.py¶
Generated: 2026-03-30T04:38:46.492119+00:00
Commit: 615f1354a103
Language: python
Scope: dazzle_back
Purpose¶
Test consumers for PRA stress testing.
Provides configurable consumers that simulate various processing behaviors: - Normal: Process events at full speed - Slow: Introduce artificial latency (backpressure testing) - Failing: Randomly fail events (DLQ testing)
Key Exports¶
ConsumerStatsTestConsumerNormalConsumerSlowConsumerFailingConsumerProjectionConsumerDerivationConsumerConsumerGroupcreate_backpressure_test_consumerscreate_dlq_test_consumerscreate_projection_test_consumerscreate_full_test_consumersavg_processing_msstatsprocessprojectionssequencerebuild_time_msstart_rebuildcomplete_rebuild
Dependencies¶
Imports¶
__future__.annotationsasynciologgingrandomtimeabc.ABCabc.abstractmethodcollections.abc.Callabledataclasses.dataclassdataclasses.fielddatetime.UTCdatetime.datetimetyping.Anydazzle_back.events.envelope.EventEnvelopedazzle_back.metrics.MetricsCollector
Event Interactions¶
None detected.
Invariants and Assumptions¶
- Validates: Permanent failure for event {envelope.event_id}
Tests¶
tests/unit/test_pra_cli.pytests/unit/test_pra_harness.pytests/unit/test_pra_metrics.pytests/unit/test_pra_load_generator.py
Notes¶
This page was automatically generated by tools/gen_reference_docs.py.