event-driven-messaging
SolidUse when implementing Kafka, RabbitMQ, Pulsar, or JMS producers and consumers in Spring Boot 3. Covers event contracts, idempotency, retries, dead-letter handling, ordering, and outbox delivery.
AI & Automation 260 stars
40 forks Updated 4 days ago MIT
Install
Quality Score: 86/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Event-Driven Messaging
Design for at-least-once delivery unless the complete system proves stronger semantics.
## Event contract
- Use an immutable event envelope with `eventId`, `eventType`, `occurredAt`, `schemaVersion`, and payload.
- Treat published schemas as APIs. Add fields compatibly and never silently change meaning.
- Put correlation and causation IDs in headers or the envelope.
- Do not publish JPA entities or framework-specific serialization shapes.
## Producer rules
- Publish only after the originating state change is durable.
- Use a transactional outbox when database state and broker publication must agree.
- Use deterministic partition keys when per-aggregate ordering matters.
- Configure delivery timeout and acknowledgements explicitly.
## Consumer rules
- Make handlers idempotent with a durable processed-event record or naturally idempotent write.
- Keep the transaction boundary around the state change and idempotency marker.
- Classify transient and permanent failures before configuring retries.
- Bound retries with backoff, then route poison messages to a dead-letter destination.
- Preserve the original event, failure reason, and attempt count for replay.
## Testing
- Test serialization compatibility and handler idempotency.
- Use Testcontainers for broker integration tests.
- Test duplicate, reordered, delayed, and poison messages.
## Examples
- See `examples/good-consumer.java` and `examples/bad-consumer.java`.
## Gotchas
- Agent assumes e...
Details
- Author
- rrezartprebreza
- Repository
- rrezartprebreza/spring-boot-skills
- Created
- 4 months ago
- Last Updated
- 4 days ago
- Language
- Java
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
API & Backend Solid
event-driven-architecture
Use when designing systems around events and message queues. Covers event schema design, delivery guarantees, idempotent consumers, ordering, dead-letter handling, and event sourcing.
26 Updated 3 weeks ago
nimadorostkar AI & Automation Solid
loom-event-driven
Event-driven architecture patterns including message queues, pub/sub, event sourcing, CQRS, and sagas.
54 Updated today
cosmix AI & Automation Featured
architecture-paradigm-event-driven
Applies event-driven async messaging to decouple producers and consumers. Use when designing real-time or multi-subscriber systems needing loose coupling.
337 Updated today
athola