What is the role of the ConsumerRecord class in Kafka?
ConsumerRecord is the object a Kafka consumer receives for each message. See its fields, how to read headers and timestamps, and which offset to commit.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
ConsumerRecord is the object a Kafka consumer receives for each message. See its fields, how to read headers and timestamps, and which offset to commit.
JsonSerializer and JsonDeserializer turn Java objects into JSON bytes for Kafka and back. See the Spring Boot setup, trusted packages and error handling.
Configure Kafka producers and consumers in Spring Boot with JSON or custom serializers, safe trusted packages and an error-handling deserializer.
ConsumerConfig names, types and validates every setting of a Kafka consumer. See the key properties, their defaults and how they affect offsets, throughput and rebalances.
Set up a Kafka consumer in Spring Boot 3 with @KafkaListener, correct deserializer settings, manual acks, JSON payloads and a dead-letter topic for failures.
Build a Kafka producer in Spring Boot 3 with KafkaTemplate, YAML configuration, topic creation, async callbacks and reliability settings.
KafkaTemplate is Spring Kafka's producer class. See how to send records, handle the CompletableFuture result, set headers and use transactions.
Send typed JSON events between Spring Boot services with spring-kafka, KafkaTemplate and @KafkaListener, plus consumer groups, testing and production settings.
PagedModel wraps a page of results with metadata and next, prev, first and last links. Learn how PagedResourcesAssembler builds it in Spring Boot REST APIs.
Return a PagedModel from PagedResourcesAssembler so clients get first, prev, self, next and last links plus page metadata with every response.
Add self, collection and conditional links to a Spring Boot REST API with Spring HATEOAS, using EntityModel, assemblers and HAL responses.
EntityModel wraps a domain object together with hypermedia links, so Spring HATEOAS can return HAL responses that guide clients to related resources.
Add hypermedia links to a Spring Boot REST API with Spring HATEOAS, using EntityModel, CollectionModel, assemblers and linkTo on Spring Boot 3.
Authenticate the WebSocket handshake with a SecurityFilterChain and authorize STOMP messages with @EnableWebSocketSecurity in Spring Security 6.
WebSocketSession is Spring's handle for one open WebSocket connection. See its key methods, handler lifecycle, thread-safe sending and common pitfalls.
Extend TextWebSocketHandler, enable WebSocket support and register the handler on a path. Includes origin security, broadcasting and a browser client.
@EnableWebSocket registers WebSocketHandler endpoints in Spring. Build an echo handler, secure origins and compare it with STOMP messaging.
Classify failures, configure retry and skip, record rejects and alert on metrics so high-frequency Spring Batch jobs detect faults without manual log reading.
Validate in layers: structure in the reader, field rules in the processor, and cross-record checks with set-based SQL, with bounded skips and an audit trail.
Adapt Spring Batch jobs to changing data volumes with a JobExecutionDecider, tunable chunk size and a partitioned step on a thread pool.