enqueue Detailed
suspend fun enqueueDetailed(type: String, payloadJson: String, stableEventId: String? = null, idempotencyKeyOverride: String? = null, userId: String? = null): EnqueueResult
Enqueue an event through the v0.5.0 pipeline:
Size guardrail
Legacy denylist (fast-path, deprecated)
Event Validation (JsonSchemaValidator)
PII Detection -> REJECT / REDACT / FLAG_AND_ALLOW
Anomaly Detection (statistical + optional ML)
Data Classification tagging
Field-Level Encryption (specified JSON paths)
Queue Pressure check
Idempotency Key
Document Encryption (PayloadCodec -> AES-256-GCM)
Room Insert (with userId, dataClassification, anomalyScore)
Audit Record (PersistentAuditTrail)
Threading: Main-safe. Database and crypto IO dispatched internally.
Since
0.5.0 userId parameter, pipeline steps 3-7 added
Parameters
user Id
Optional user identifier for GDPR data subject tracking.