feat(policy): add Kafka event publishing for policy changes#34
Conversation
Add PolicyChangedPayload and PolicyEventEnvelope for structured policy change events with contentId, ageRestricted, geo lists, moderation state, and standard envelope fields.
…ublisher Add PolicyEventPublisher interface with publishPolicyChanged method and NoopPolicyEventPublisher as a fallback when Kafka is disabled.
Add KafkaPolicyEventPublisher for publishing policy.changed events, PolicyEventsProperties for topic configuration, and PolicyEventsConfiguration for conditional bean wiring. Enable spring-kafka dependency in pom.xml.
Inject PolicyEventPublisher into ContentPolicyService and publish PolicyChanged events after updateContentPolicy and updateModerationState.
…ication Add integration test verifying publishPolicyChanged is called after updateContentPolicy and updateModerationState.
Add KafkaPolicyEventPublisherTest verifying envelope structure, topic routing, key, traceId handling. Add NoopPolicyEventPublisherTest verifying publish is a no-op.
- Update kafka-event-catalog.md with actual policy.changed payload schema - Mark PR-005 Phases A-D as complete in modular-implementation-roadmap.md - Add ADR 014 documenting policy-service Kafka event publishing
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 29 minutes and 58 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (15)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
policy.changedeventupdateContentPolicyandupdateModerationStatecloudmedia.policy.changedTest plan