jEAP Messaging
jEAP Messaging is a library for sending and receiving messages over Apache Kafka in Spring Boot applications. It builds on Spring for Apache Kafka and Avro, and lets a microservice produce and consume strongly-typed events and commands with minimal boilerplate. It provides:
- A structured definition of message types using Avro schemas and message-type descriptors
- Avro serialization of message types to Kafka records
- Pre-configured Spring Kafka beans for producers and consumers (single- and multi-cluster)
- Declaration of consumed/produced message types on topics using Java annotations (message contracts)
- Built-in error handling that never loses a message (integration with a
jeap-error-handling-service) - Idempotent message handling, message signing and encryption, and a Kafka broker health indicator
For the transactional outbox pattern see the separate jeap-messaging-outbox library.
Documentation
Start with Getting started, then follow the links below.
Modules
The artifact most consumers depend on is jeap-messaging-infrastructure-kafka. Group id for all
modules is ch.admin.bit.jeap; the version is managed by the jEAP Spring Boot parent.
| Module | Purpose |
|---|---|
jeap-messaging-model | Infrastructure-independent interfaces for domain events and commands |
jeap-messaging-api | MessageListener / MessagePublisher interfaces |
jeap-messaging-avro | Avro implementation of the model: AvroMessage, builders, AvroSerializationHelper |
jeap-messaging-avro-maven-plugin | Generates Java classes from Avro schemas / the Message Type Registry |
jeap-messaging-avro-compiler, -validator, -test | Internal Avro compilation, validation and test support |
jeap-messaging-avro-errorevent | Avro types for the error-handling integration |
jeap-messaging-infrastructure | Core Kafka infrastructure: serialization, signing, crypto, tracing, metrics, health, error handling |
jeap-messaging-infrastructure-kafka | Spring Boot auto-configuration; the main consumer-facing artifact |
jeap-messaging-infrastructure-kafka-test | Test fixtures: TestMessageSender, TestKafkaListener, KafkaIntegrationTestBase |
jeap-messaging-infrastructure-kafka-without-tracing-test | Test fixtures for services that do not use tracing |
jeap-messaging-confluent-schema-registry | Confluent Schema Registry integration |
jeap-messaging-glue-schema-registry | AWS Glue Schema Registry integration |
jeap-messaging-aws-msk-iam-auth | AWS MSK IAM authentication |
jeap-messaging-idempotence | @IdempotentMessageHandler with a JPA-backed processing store and housekeeping |
jeap-messaging-contract-annotations | Message-contract annotations |
jeap-messaging-contract-annotation-processor | Annotation processor generating the contract JSON uploaded during the build |
jeap-messaging-contract-maven-plugin | Maven plugin for message contracts |
jeap-messaging-registry-maven-plugin | Verifies and exports a Message Type Registry |