How do you configure RabbitMQ consumers in a Spring Boot application?
Set up a RabbitMQ consumer in Spring Boot 3 with @RabbitListener, then add retries, dead-lettering, concurrency and Testcontainers tests.
2,882 posts about Java: questions with answers, tutorials and articles, newest first.
Set up a RabbitMQ consumer in Spring Boot 3 with @RabbitListener, then add retries, dead-lettering, concurrency and Testcontainers tests.
MappingJackson2HttpMessageConverter reads and writes JSON in Spring MVC using Jackson. Spring Boot registers it for you; customize the ObjectMapper to change output.
Spring Boot auto-configures RabbitTemplate so you can inject it and send RabbitMQ messages. This guide covers properties, JSON and reliable publishing.
Compare blocking retry with DefaultErrorHandler and non-blocking retry with @RetryableTopic in Spring Kafka, including dead-letter topics and idempotent consumers.
Spring Boot serializes controller return values to JSON through Jackson. Learn @RestController, @ResponseBody, Jackson annotations, status codes and testing.
@ResponseBody skips view resolution and serialises the return value, usually to JSON, with an HttpMessageConverter. See how it relates to @RestController and ResponseEntity.
Spring Boot picks the response format from the Accept header. See JSON and XML setup, a format query parameter and custom converters with tests.
MultipartFile represents uploaded files in Spring MVC. Learn its methods, safe storage, size limits and validation with working code.
Handle single and multiple file uploads in Spring Boot with MultipartFile, JSON metadata parts, validation and S3 storage.
@RequestParam binds query-string and form values to Spring controller parameters. See required, defaultValue, Optional, lists, file uploads and validation.
Read query parameters in Spring MVC with @RequestParam, defaults, lists, validated records and Pageable, with current Spring Boot 3 code.
Build a complete REST API in Spring Boot: @RestController, verb mappings, request validation, correct status codes and RFC 9457 error responses.
Build a REST API in Spring with @RestController, correct HTTP status codes, bean validation and consistent ProblemDetail error responses.
Learn when to use @ResponseStatus, ResponseEntity or exception handlers to return the right HTTP status code from Spring MVC and REST controllers.
ResponseEntity lets a Spring controller decide status, headers and body per request. Compare it with ResponseStatus and exception handlers.
@ExceptionHandler turns exceptions thrown in Spring MVC into custom responses. See local and global handlers, ProblemDetail and common mistakes.
Use @RestControllerAdvice and @ExceptionHandler to turn exceptions into consistent ProblemDetail responses across all Spring controllers.
Configure message bundles, a locale resolver and a language-switch interceptor in Spring Boot, and read localized text in controllers, templates and validation.
The Spring Validator interface defines programmatic validation with supports and validate. Learn to write one, register it in MVC and compare it with annotations.
Create a custom validation annotation and ConstraintValidator, apply it with @Valid and return clear 400 error messages in Spring Boot 3.