liveBook · Manning

What you will learn in ActiveMQ in Action

by Bruce Snyder, Dejan Bosanac, Rob Davies

Chapter by chapter

Chapter 1: Chapter 1. Introduction to Apache ActiveMQ

This introduction positions ActiveMQ as open source messaging middleware for loosely coupled application integration.

1.1 ActiveMQ features · 1.2 Using ActiveMQ: why and when? · 1.2.1 Loose coupling and ActiveMQ · 1.2.2 When to use ActiveMQ · 1.3 Getting started with ActiveMQ · 1.3.1 Downloading and installing the Java SE · 1.3.2 Downloading ActiveMQ · 1.3.3 Examining the ActiveMQ directory · 1.3.4 Starting up ActiveMQ · 1.4 Running your first examples with ActiveMQ · 1.5 Summary

What you learn in chapter 1 →

Chapter 2: Chapter 2. Understanding message-oriented middleware and JMS

Introduces enterprise messaging, the role of message-oriented middleware, and ActiveMQ’s place in supporting business systems.

2.1 Introduction to enterprise messaging · 2.2 What’s message-oriented middleware? · 2.3 What’s the Java Message Service? · 2.4 The JMS specification · 2.4.1 JMS clients · 2.4.2 Non-JMS clients · 2.4.3 The JMS provider · 2.4.4 The JMS message · 2.4.5 JMS message internals · 2.4.6 Message selectors · 2.4.7 JMS domains · 2.4.8 Administered objects · 2.5 Using the JMS APIs to create JMS applications · 2.5.1 A simple JMS application · 2.5.2 Message-driven beans · 2.6 Summary

What you learn in chapter 2 →

Chapter 3: Chapter 3. The ActiveMQ in Action examples

The introduction contrasts the book’s stock portfolio and job queue examples and their respective JMS messaging domains.

3.1 Downloading Maven and compiling the examples · 3.2 Use case one: the stock portfolio example · 3.2.1 Running the stock portfolio example · 3.3 Use case two: the job queue example · 3.3.1 Running the job queue example · 3.4 Summary

What you learn in chapter 3 →

Chapter 4: Chapter 4. Connecting to ActiveMQ

Introduces ActiveMQ connectors and their roles in client-to-broker and broker-to-broker communication.

4.1 Understanding connector URIs · 4.2 Transport connectors · 4.2.1 Configuring transport connectors · 4.2.2 Adapting the stock portfolio example · 4.3 Connecting to ActiveMQ over the network · 4.3.1 Transmission Control Protocol (TCP) · 4.3.2 New I/O API protocol (NIO) · 4.3.3 User Datagram Protocol (UDP) · 4.3.4 Secure Sockets Layer Protocol (SSL) · 4.3.5 Hypertext Transfer Protocol (HTTP/HTTPS) · 4.4 Connecting to ActiveMQ inside the virtual machine (VM connector) · 4.5 Network connectors · 4.5.1 Static networks · 4.5.2 Dynamic networks · 4.6 Summary

What you learn in chapter 4 →

Chapter 5: Chapter 5. ActiveMQ message storage

Introduces JMS delivery persistence, its practical tradeoffs, and ActiveMQ’s storage and in-memory recovery options.

5.1 How are messages stored by ActiveMQ? · 5.2 The KahaDB message store · 5.2.1 The KahaDB message store internals · 5.2.2 The KahaDB message store directory structure · 5.2.3 Configuring the KahaDB message store · 5.3 The AMQ message store · 5.3.1 The AMQ message store internals · 5.3.2 The AMQ message store directory structure · 5.3.3 Configuring the AMQ message store · 5.4 The JDBC message store · 5.4.1 Databases supported by the JDBC message store · 5.4.2 The JDBC message store schema · 5.4.3 Configuring the JDBC message store · 5.4.4 Using the JDBC message store with the ActiveMQ journal · 5.5 The memory message store · 5.5.1 Configuring the memory store · 5.6 Caching messages in the broker for consumers · 5.6.1 How message caching for consumers works · 5.6.2 The ActiveMQ subscription recovery policies · 5.6.3 Configuring the subscription recovery policy · 5.7 Summary

What you learn in chapter 5 →

Chapter 6: Chapter 6. Securing ActiveMQ

This introduction explains authentication and authorization in ActiveMQ’s adaptable security model.

6.1 Authentication · 6.1.1 Configuring the simple authentication plug-in · 6.1.2 Configuring the JAAS plug-in · 6.2 Authorization · 6.2.1 Destination-level authorization · 6.2.2 Message-level authorization · 6.3 Building a custom security plug-in · 6.3.1 Implementing the plug-in · 6.3.2 Configuring the plug-in · 6.3.3 Testing the plug-in · 6.4 Certificate-based security · 6.4.1 Preparing certificates · 6.4.2 Creating a truststore · 6.4.3 Configuring the broker · 6.4.4 Authorization explained · 6.4.5 Testing it out · 6.5 Summary

What you learn in chapter 6 →

Chapter 7: Chapter 7. Creating Java applications with ActiveMQ

This introduction presents an embedded ActiveMQ broker as a way for Java applications to serve both local and remote messaging clients.

7.1 Embedding ActiveMQ using Java · 7.1.1 Embedding ActiveMQ using the BrokerService · 7.1.2 Embedding ActiveMQ using the BrokerFactory · 7.2 Embedding ActiveMQ using Spring · 7.2.1 Pure Spring XML · 7.2.2 Using the BrokerFactoryBean · 7.2.3 Using Apache XBean with Spring · 7.2.4 Using a custom XML namespace with Spring · 7.3 Implementing request/reply with JMS · 7.3.1 Implementing the server and the worker · 7.3.2 Implementing the client · 7.3.3 Running the request/reply example · 7.4 Writing JMS clients using Spring · 7.4.1 Configuring JMS connections · 7.4.2 Configuring JMS destinations · 7.4.3 Creating JMS consumers · 7.4.4 Creating JMS producers · 7.4.5 Putting it all together · 7.5 Summary

What you learn in chapter 7 →

Chapter 8: Chapter 8. Integrating ActiveMQ with application servers

This introduction distinguishes Java application-server types and explains the roles of broker creation and JNDI in ActiveMQ integration.

8.1 The sample web application · 8.2 Integrating with Apache Tomcat · 8.2.1 Using local JNDI to integrate ActiveMQ with Tomcat · 8.2.2 Using global JNDI to integrate ActiveMQ with Tomcat · 8.3 Integrating with Jetty · 8.3.1 Using local JNDI to integrate ActiveMQ with Jetty · 8.3.2 Using global JNDI to integrate ActiveMQ with Jetty · 8.4 Integrating with Apache Geronimo · 8.4.1 Installing Geronimo and configuring the ActiveMQ plug-in in Geronimo · 8.4.2 Configuring the ActiveMQ JMS resources in Geronimo · 8.4.3 Preparing the sample application for deployment in Geronimo · 8.4.4 Deploying and verifying the sample application in Geronimo · 8.5 Integrating with JBoss · 8.5.1 Installing JBoss and configuring the ActiveMQ resource adapter in JBoss · 8.5.2 Configuring the ActiveMQ JMS resources in JBoss · 8.5.3 Preparing the sample application for deployment in JBoss · 8.5.4 Deploying and verifying the sample application in JBoss · 8.6 ActiveMQ and JNDI · 8.6.1 Client-side JNDI configuration · 8.7 Summary

What you learn in chapter 8 →

Chapter 9: Chapter 9. ActiveMQ messaging for other languages

The chapter introduction positions ActiveMQ as a cross-platform messaging solution and introduces STOMP’s relevance to scripting languages.

9.1 Adapting the stock portfolio example · 9.2 Messaging for scripting languages · 9.2.1 STOMP protocol basics · 9.2.2 Configuring STOMP transport · 9.2.3 Ruby STOMP consumer · 9.2.4 Python STOMP consumer · 9.2.5 PHP STOMP consumer · 9.2.6 Perl STOMP consumer · 9.2.7 Advanced messaging with STOMP · 9.3 Messaging for compiled languages · 9.3.1 Writing a C# consumer (using the NMS API) · 9.3.2 Writing a C++ consumer (using the CMS API) · 9.4 Messaging on the web with ActiveMQ · 9.4.1 Using the ActiveMQ REST API · 9.4.2 Using the ActiveMQ Ajax API · 9.5 Summary

What you learn in chapter 9 →

Chapter 10: Chapter 10. Deploying ActiveMQ in the enterprise

This introduction previews enterprise ActiveMQ deployment for high availability, global messaging, and large-scale concurrency.

10.1 Configuring ActiveMQ for high availability · 10.1.1 Shared nothing master/slave · 10.1.2 Shared storage master/slave · 10.2 How ActiveMQ passes messages across a network of brokers · 10.2.1 Store and forward · 10.2.2 Network discovery · 10.2.3 Network configuration · 10.3 Deploying ActiveMQ for large numbers of concurrent applications · 10.3.1 Vertical scaling · 10.3.2 Horizontal scaling · 10.3.3 Traffic partitioning · 10.4 Summary

What you learn in chapter 10 →

Chapter 11: Chapter 11. ActiveMQ broker features in action

This introduction outlines advanced ActiveMQ broker features and explains how virtual topics combine topic broadcasts with load-balanced queue dispatch.

11.1 Wildcards and composite destinations · 11.1.1 Consume from multiple destinations using wildcards · 11.1.2 Sending a message to multiple destinations · 11.2 Advisory messages · 11.3 Supercharge JMS topics by going virtual · 11.4 Retroactive consumers · 11.5 Message redelivery and dead-letter queues · 11.6 Extending functionality with interceptor plug-ins · 11.6.1 Visualization · 11.6.2 Enhanced logging · 11.6.3 Central timestamp messages with the timestamp interceptor plug-in · 11.6.4 Statistics · 11.7 Routing engine with Apache Camel framework · 11.8 Summary

What you learn in chapter 11 →

Chapter 12: Chapter 12. Advanced client options

The chapter introduction outlines advanced ActiveMQ client features, including exclusive consumers and message groups.

12.1 Exclusive consumers · 12.1.1 Selecting an exclusive message consumer · 12.1.2 Using exclusive consumers to provide a distributed lock · 12.2 Message groups · 12.3 ActiveMQ streams · 12.4 Blob messages · 12.5 Surviving network or broker failure with the failover protocol · 12.6 Scheduling messages to be delivered by ActiveMQ in the future · 12.7 Summary

What you learn in chapter 12 →

Chapter 13: Chapter 13. Tuning ActiveMQ for performance

This introduction outlines factors affecting ActiveMQ performance and describes two architectural choices that can improve it.

13.1 General techniques · 13.1.1 Persistent versus nonpersistent messages · 13.1.2 Transactions · 13.1.3 Embedding brokers · 13.1.4 Tuning the OpenWire protocol · 13.1.5 Tuning the TCP transport · 13.2 Optimizing message producers · 13.2.1 Asynchronous send · 13.2.2 Producer flow control · 13.3 Optimizing message consumers · 13.3.1 Prefetch limit · 13.3.2 Delivery and acknowledgment of messages · 13.3.3 Asynchronous dispatch · 13.4 Tuning in action · 13.5 Summary

What you learn in chapter 13 →

Chapter 14: Chapter 14. Administering and monitoring ActiveMQ

This introduction explains why ActiveMQ brokers need monitoring and administration and identifies JMX as a common management interface.

14.1 The JMX API and ActiveMQ · 14.1.1 Local vs. remote JMX access · 14.1.2 Exposing the JMX MBeans for ActiveMQ · 14.1.3 Exploring broker properties using the JMX API · 14.1.4 Advanced JMX configuration · 14.1.5 Restricting JMX access to a specific host · 14.1.6 Configuring JMX password authentication · 14.2 Monitoring ActiveMQ with advisory messages · 14.2.1 Configuring advisory support · 14.2.2 Using advisory messages · 14.2.3 Conclusion · 14.3 Tools for ActiveMQ administration · 14.3.1 Command-line tools · 14.3.2 Command agent · 14.3.3 JConsole · 14.3.4 Web console · 14.4 Configuring ActiveMQ logging · 14.4.1 Broker logging · 14.4.2 Client logging · 14.4.3 Internal broker event logging · 14.5 Summary

What you learn in chapter 14 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.