How do you implement durable subscribers in ActiveMQ with Spring Boot?
Configure a durable topic subscription in ActiveMQ with Spring Boot, including the listener factory, client ID, publisher and operational pitfalls.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
Configure a durable topic subscription in ActiveMQ with Spring Boot, including the listener factory, client ID, publisher and operational pitfalls.
A JMS message selector lets a consumer receive only messages whose headers and properties match an SQL-like expression. See syntax, Spring examples and trade-offs.
Use JMS selectors with @JmsListener and JmsTemplate to deliver only matching messages from ActiveMQ to each Spring Boot consumer.
An ActiveMQ Session is a single-threaded JMS context that creates producers, consumers and messages, and manages transactions and acknowledgement modes.
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.