How do you set ActiveMQ acknowledgment modes in Spring Boot?
Set JMS acknowledgment modes for ActiveMQ in Spring Boot with properties or a custom listener container factory, plus redelivery and dead letter handling.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
Set JMS acknowledgment modes for ActiveMQ in Spring Boot with properties or a custom listener container factory, plus redelivery and dead letter handling.
The Spring JMS ErrorHandler is a hook for exceptions thrown by message listeners, used for logging and alerts while the transaction setting controls redelivery.
Let transient errors trigger redelivery, configure ActiveMQ back-off, and route poison messages to a dead-letter queue instead of swallowing exceptions.
Register a Jackson MessageConverter so JmsTemplate and JmsListener send and receive JSON objects over ActiveMQ, and avoid unsafe Java serialization.
@JmsListener turns a method into a JMS message consumer with a managed listener container. See queues, topics, concurrency and correct error handling.
Add the ActiveMQ starter, send with JmsTemplate and receive with @JmsListener. Includes JSON payloads, queues versus topics and reliability tips.
JmsTemplate handles connections, sessions and conversion so you can send and receive JMS messages with one call. See setup, JSON converters and receive tips.
Use CascadeType.REMOVE and orphanRemoval on parents that own their children, or ON DELETE CASCADE in the database, and avoid ALL on shared relationships.
JPA's @Cacheable marks an entity for the Hibernate second-level cache. Learn the cache modes, setup with Ehcache, and how it differs from Spring's annotation.
Understand the JPA first-level, second-level and query caches and Spring's @Cacheable. Includes working Hibernate 6 and Ehcache JCache configuration.
Add the ActiveMQ starter and set spring.activemq.broker-url, user and password. Spring Boot then auto-configures JmsTemplate and listeners.
It bundles Spring JMS and ActiveMQ Classic libraries and auto-configures a connection factory and JmsTemplate for asynchronous messaging.
Add the ActiveMQ or Artemis starter, configure the broker URL, send with JmsTemplate and receive with @JmsListener. Covers JSON converters, topics and reliability.
Propagation.REQUIRES_NEW suspends the caller's transaction and runs a method in its own, independently committed transaction.
RedeliveryPolicy configures how Apache Camel retries failed messages, including attempts, delay, exponential backoff, jitter and dead letter handling.
Call stored procedures from JPA and Spring Data JPA with @Procedure, named procedures and StoredProcedureQuery, including OUT parameters.
Configure redelivery, exponential backoff and a dead letter channel in Apache Camel routes using onException and error handlers.
@Procedure lets a Spring Data JPA repository call a database stored procedure. See procedureName, OUT parameters, named stored procedure queries and database caveats.
Learn three ways to call stored procedures from JPA and Spring Data, how to map IN and OUT parameters, and when to pick each approach.
@Query lets you define JPQL or native SQL on a Spring Data repository method when derived queries are too limited. See parameters, updates, paging and projections.