How do you handle ActiveMQ connection pooling in Spring Boot?
Enable pooled-jms in Spring Boot to reuse ActiveMQ connections, sessions and producers, size the pool correctly and verify it on the broker.
2,889 posts about Java: questions with answers, tutorials and articles, newest first.
Enable pooled-jms in Spring Boot to reuse ActiveMQ connections, sessions and producers, size the pool correctly and verify it on the broker.
ActiveMQ has no virtual hosts, so you isolate applications with name prefixes, users, groups and authorization rules. Includes broker XML and Spring Boot client setup.
Create a keystore, add an ssl:// transport connector to ActiveMQ, and configure the Spring Boot client truststore. Optionally add mutual TLS and broker authorization.
High availability in ActiveMQ comes from master/slave pairs on shared storage plus client failover URLs. Networks of brokers add scale, not message safety.
Track broker metrics through JMX or an exporter and application metrics with Micrometer, then alert on queue depth and stuck consumers.
Control message flow in ActiveMQ and Spring Boot with broker usage limits, producer flow control, consumer prefetch, bounded concurrency and dead-letter handling.
There is no ActiveMQ binder for Spring Cloud Stream. This guide shows the working Spring Boot JMS setup and when to switch to Kafka or RabbitMQ.
Register a Jackson MessageConverter so Spring Boot sends and receives Java objects as JSON over ActiveMQ, and learn why to avoid ObjectMessage.
Make ActiveMQ messaging survive broker failures in Spring Boot: failover transport, shared-storage standby brokers, persistent delivery and safe redelivery.
Set a RedeliveryPolicy, make listener sessions transacted and configure dead-letter queues so failed ActiveMQ messages retry with backoff and land in a DLQ.
Configure JMS acknowledge modes in Spring Boot, use transacted listeners for reliable processing and tune ActiveMQ redelivery and dead-letter handling.
Send and receive on ActiveMQ queues and topics with JmsTemplate and @JmsListener, configure pub-sub and durable subscriptions, and monitor destinations.
Set up ActiveMQ in Spring Boot: starter, connection properties, a JmsTemplate producer, an @JmsListener consumer, JSON payloads and queue versus topic mode.
Run one Spring Boot jar in every environment: external config files, profiles, environment variables, secret trees, typed properties and Spring Cloud Config.
A JWT is a signed token that carries claims for stateless authentication. Learn its structure, benefits, risks and safe validation practices.
Add OAuth2 Login for browser sign-in, protect APIs as a JWT resource server, and call other services with the client credentials grant in Spring Security 6.
A checklist for securing Spring Boot 3 apps: authentication, authorization, CSRF and CORS, input validation, Actuator lockdown, secrets and dependency updates.
Spring Security blocks CSRF attacks by requiring a secret token on unsafe requests. See how it works, how to configure it for SPAs, and when to disable it.
Learn what @PreAuthorize does in Spring Security 6: enable method security, write SpEL rules, use arguments and avoid common proxy pitfalls.
Configure RBAC in Spring Security 6 without WebSecurityConfigurerAdapter: role rules, users, method security, 403 handling and tests.