preface |
|
xv | |
acknowledgments |
|
xvii | |
about this book |
|
xix | |
|
Part 1 An introduction to messaging and ActiveMQ |
|
|
1 | (54) |
|
1 Introduction to Apache ActiveMQ |
|
|
3 | (14) |
|
|
4 | (2) |
|
1.2 Using ActiveMQ: why and when? |
|
|
6 | (4) |
|
Loose coupling and ActiveMQ |
|
|
6 | (2) |
|
|
8 | (2) |
|
1.3 Getting started with ActiveMQ |
|
|
10 | (4) |
|
Downloading and installing the Java SE |
|
|
10 | (1) |
|
|
11 | (1) |
|
Examining the ActiveMQ directory |
|
|
11 | (1) |
|
|
12 | (2) |
|
1.4 Running your first examples with ActiveMQ |
|
|
14 | (2) |
|
|
16 | (1) |
|
2 Understanding message-oriented middleware and JMS |
|
|
17 | (25) |
|
2.1 Introduction to enterprise messaging |
|
|
18 | (2) |
|
2.2 What's message-oriented middleware? |
|
|
20 | (1) |
|
2.3 What's the Java Message Service? |
|
|
21 | (2) |
|
2.4 The JMS specification |
|
|
23 | (12) |
|
|
23 | (2) |
|
|
25 | (1) |
|
|
25 | (1) |
|
|
25 | (1) |
|
|
25 | (4) |
|
|
29 | (3) |
|
|
32 | (3) |
|
|
35 | (1) |
|
2.5 Using the JMS APIs to create JMS applications |
|
|
35 | (6) |
|
|
36 | (3) |
|
|
39 | (2) |
|
|
41 | (1) |
|
3 The ActiveMQ in Action examples |
|
|
42 | (13) |
|
3.1 Downloading Maven and compiling the examples |
|
|
43 | (2) |
|
3.2 Use case one: the stock portfolio example |
|
|
45 | (5) |
|
Running the stock portfolio example |
|
|
46 | (4) |
|
3.3 Use case two: the job queue example |
|
|
50 | (3) |
|
Running the job queue example |
|
|
51 | (2) |
|
|
53 | (2) |
|
Part 2 Configuring standard ActiveMQ components |
|
|
55 | (88) |
|
|
57 | (39) |
|
4.1 Understanding connector URIs |
|
|
58 | (2) |
|
|
60 | (3) |
|
Configuring transport connectors |
|
|
60 | (1) |
|
Adapting the stock portfolio example |
|
|
61 | (2) |
|
4.3 Connecting to ActiveMQ over the network |
|
|
63 | (16) |
|
Transmission Control Protocol (TCP) |
|
|
64 | (2) |
|
New I/O API protocol (NIO) |
|
|
66 | (2) |
|
User Datagram Protocol (UDP) |
|
|
68 | (2) |
|
Secure Sockets Layer Protocol (SSL) |
|
|
70 | (7) |
|
Hypertext Transfer Protocol (HTTP/HTTPS) |
|
|
77 | (2) |
|
4.4 Connecting to ActiveMQ inside the virtual machine (VM connector) |
|
|
79 | (2) |
|
|
81 | (13) |
|
|
83 | (5) |
|
|
88 | (6) |
|
|
94 | (2) |
|
5 ActiveMQ message storage |
|
|
96 | (21) |
|
5.1 How are messages stored by ActiveMQ? |
|
|
97 | (1) |
|
5.2 The KahaDB message store |
|
|
98 | (5) |
|
The KahaDB message store internals |
|
|
99 | (1) |
|
The KahaDB message store directory structure |
|
|
100 | (1) |
|
Configuring the KahaDB message store |
|
|
101 | (2) |
|
5.3 The AMQ message store |
|
|
103 | (4) |
|
The AMQ message store internals |
|
|
103 | (1) |
|
The AMQ message store directory structure |
|
|
104 | (1) |
|
Configuring the AMQ message store |
|
|
105 | (2) |
|
5.4 The JDBC message store |
|
|
107 | (4) |
|
Databases supported by the JDBC message store |
|
|
107 | (1) |
|
The JDBC message store schema |
|
|
108 | (1) |
|
Configuring the JDBC message store |
|
|
109 | (2) |
|
Using the JDBC message store with the ActiveMQ journal |
|
|
111 | (1) |
|
5.5 The memory message store |
|
|
111 | (2) |
|
Configuring the memory store |
|
|
112 | (1) |
|
5.6 Caching messages in the broker for consumers |
|
|
113 | (3) |
|
How message caching for consumers works |
|
|
113 | (1) |
|
The ActiveMQ subscription recovery policies |
|
|
114 | (1) |
|
Configuring the subscription recovery policy |
|
|
115 | (1) |
|
|
116 | (1) |
|
|
117 | (26) |
|
|
118 | (5) |
|
Configuring the simple authentication plug-in |
|
|
118 | (3) |
|
Configuring the JAAS plug-in |
|
|
121 | (2) |
|
|
123 | (8) |
|
Destination-level authorization |
|
|
124 | (3) |
|
Message-level authorization |
|
|
127 | (4) |
|
6.3 Building a custom security plug-in |
|
|
131 | (4) |
|
|
132 | (1) |
|
|
133 | (1) |
|
|
134 | (1) |
|
6.4 Certificate-based security |
|
|
135 | (7) |
|
|
136 | (1) |
|
|
136 | (2) |
|
|
138 | (1) |
|
|
139 | (1) |
|
|
139 | (3) |
|
|
142 | (1) |
|
Part 3 Using ActiveMQ to build messaging applications |
|
|
143 | (112) |
|
7 Creating Java applications with ActiveMQ |
|
|
145 | (29) |
|
7.1 Embedding ActiveMQ using Java |
|
|
146 | (4) |
|
Embedding ActiveMQ using the BrokerService |
|
|
147 | (2) |
|
Embedding ActiveMQ using the BrokerFactory |
|
|
149 | (1) |
|
7.2 Embedding ActiveMQ using Spring |
|
|
150 | (8) |
|
|
151 | (2) |
|
Using the BrokerFactory Bean |
|
|
153 | (1) |
|
Using Apache XBean with Spring |
|
|
154 | (2) |
|
Using a custom XML namespace with Spring |
|
|
156 | (2) |
|
7.3 Implementing request/reply with JMS |
|
|
158 | (7) |
|
Implementing the server and the worker |
|
|
160 | (2) |
|
|
162 | (2) |
|
Running the request/reply example |
|
|
164 | (1) |
|
7.4 Writing JMS clients using Spring |
|
|
165 | (7) |
|
Configuring JMS connections |
|
|
166 | (1) |
|
Configuring JMS destinations |
|
|
167 | (1) |
|
|
167 | (1) |
|
|
168 | (3) |
|
|
171 | (1) |
|
|
172 | (2) |
|
8 Integrating ActiveMQ with application servers |
|
|
174 | (47) |
|
8.1 The sample web application |
|
|
176 | (5) |
|
8.2 Integrating with Apache Tomcat |
|
|
181 | (6) |
|
Using local JNDI to integrate ActiveMQ with Tomcat |
|
|
182 | (2) |
|
Using global JNDI to integrate ActiveMQ with Tomcat |
|
|
184 | (3) |
|
8.3 Integrating with Jetty |
|
|
187 | (5) |
|
Using local JNDI to integrate ActiveMQ with Jetty |
|
|
187 | (2) |
|
Using global JNDI to integrate ActiveMQ with Jetty |
|
|
189 | (3) |
|
8.4 Integrating with Apache Geronimo |
|
|
192 | (16) |
|
Installing Geronimo and configuring the ActiveMQplug-in in Geronimo |
|
|
192 | (4) |
|
Configuring the ActiveMQJMS resources in Geronimo |
|
|
196 | (6) |
|
Preparing the sample application for deployment in Geronimo |
|
|
202 | (3) |
|
Deploying and verifying the sample application in Geronimo |
|
|
205 | (3) |
|
8.5 Integrating with JBoss |
|
|
208 | (9) |
|
Installing JBoss and configuring the ActiveMQ resource adapter in JBoss |
|
|
209 | (3) |
|
Configuring the ActiveMQJMS resources in JBoss |
|
|
212 | (1) |
|
Preparing the sample application for deployment inJBoss |
|
|
212 | (3) |
|
Deploying and verifying the sample application inJBoss |
|
|
215 | (2) |
|
|
217 | (3) |
|
Client-side JNDI configuration |
|
|
217 | (3) |
|
|
220 | (1) |
|
9 ActiveMQ messaging for other languages |
|
|
221 | (34) |
|
9.1 Adapting the stock portfolio example |
|
|
222 | (2) |
|
9.2 Messaging for scripting languages |
|
|
224 | (17) |
|
|
224 | (2) |
|
Configuring STOMP transport |
|
|
226 | (1) |
|
|
227 | (2) |
|
|
229 | (4) |
|
|
233 | (1) |
|
|
234 | (2) |
|
Advanced messaging with STOMP |
|
|
236 | (5) |
|
9.3 Messaging for compiled languages |
|
|
241 | (6) |
|
Writing a C# consumer (using the NMS API) |
|
|
242 | (2) |
|
Writing a C++ consumer (using the CMS API) |
|
|
244 | (3) |
|
9.4 Messaging on the web with ActiveMQ |
|
|
247 | (7) |
|
Using the ActiveMQ REST API |
|
|
248 | (2) |
|
Using the ActiveMQ Ajax API |
|
|
250 | (4) |
|
|
254 | (1) |
|
Part 4 Advanced features in ActiveMQ |
|
|
255 | (112) |
|
10 Deploying ActiveMQ in the enterprise |
|
|
257 | (20) |
|
10.1 Configuring ActiveMQ for high availability |
|
|
258 | (5) |
|
Shared nothing master/slave |
|
|
258 | (3) |
|
Shared storage master/slave |
|
|
261 | (2) |
|
10.2 How ActiveMQ passes messages across a network of brokers |
|
|
263 | (9) |
|
|
264 | (2) |
|
|
266 | (2) |
|
|
268 | (4) |
|
10.3 Deploying ActiveMQ for large numbers of concurrent applications |
|
|
272 | (4) |
|
|
272 | (3) |
|
|
275 | (1) |
|
|
275 | (1) |
|
|
276 | (1) |
|
11 ActiveMQ broker features in action |
|
|
277 | (18) |
|
11.1 Wildcards and composite destinations |
|
|
278 | (2) |
|
Consume from multiple destinations using wildcards |
|
|
278 | (1) |
|
Sending a message to multiple destinations |
|
|
279 | (1) |
|
|
280 | (4) |
|
11.3 Supercharge JMS topics by going virtual |
|
|
284 | (2) |
|
11.4 Retroactive consumers |
|
|
286 | (1) |
|
11.5 Message redelivery and dead-letter queues |
|
|
287 | (1) |
|
11.6 Extending functionality with interceptor plug-ins |
|
|
288 | (4) |
|
|
288 | (2) |
|
|
290 | (1) |
|
Central timestamp messages with the timestamp interceptor plug-in |
|
|
291 | (1) |
|
|
291 | (1) |
|
11.7 Routing engine with Apache Camel framework |
|
|
292 | (2) |
|
|
294 | (1) |
|
12 Advanced client options |
|
|
295 | (17) |
|
|
296 | (2) |
|
Selecting an exclusive message consumer |
|
|
296 | (1) |
|
Using exclusive consumers to provide a distributed lock |
|
|
297 | (1) |
|
|
298 | (3) |
|
|
301 | (2) |
|
|
303 | (2) |
|
12.5 Surviving network or broker failure with the failover protocol |
|
|
305 | (4) |
|
12.6 Scheduling messages to be delivered by ActiveMQ in the future |
|
|
309 | (2) |
|
|
311 | (1) |
|
13 Tuning ActiveMQ for performance |
|
|
312 | (19) |
|
|
313 | (6) |
|
Persistent versus nonpersistent messages |
|
|
313 | (1) |
|
|
314 | (1) |
|
|
315 | (3) |
|
Tuning the OpenWire protocol |
|
|
318 | (1) |
|
|
319 | (1) |
|
13.2 Optimizing message producers |
|
|
319 | (4) |
|
|
319 | (1) |
|
|
320 | (3) |
|
13.3 Optimizing message consumers |
|
|
323 | (4) |
|
|
323 | (2) |
|
Delivery and acknowledgment of messages |
|
|
325 | (1) |
|
|
326 | (1) |
|
|
327 | (3) |
|
|
330 | (1) |
|
14 Administering and monitoring ActiveMQ |
|
|
331 | (36) |
|
14.1 The JMX API and ActiveMQ |
|
|
332 | (12) |
|
Local vs. remote JMX access |
|
|
332 | (2) |
|
Exposing the JMX MBeans for ActiveMQ |
|
|
334 | (2) |
|
Exploring broker properties using the JMX API |
|
|
336 | (3) |
|
Advanced JMX configuration |
|
|
339 | (1) |
|
Restricting JMX access to a specific host |
|
|
340 | (1) |
|
Configuring JMX password authentication |
|
|
341 | (3) |
|
14.2 Monitoring ActiveMQ with advisory messages |
|
|
344 | (6) |
|
Configuring advisory support |
|
|
344 | (1) |
|
|
345 | (5) |
|
|
350 | (1) |
|
14.3 Tools for ActiveMQ administration |
|
|
350 | (10) |
|
|
350 | (5) |
|
|
355 | (2) |
|
|
357 | (2) |
|
|
359 | (1) |
|
14.4 Configuring ActiveMQ logging |
|
|
360 | (6) |
|
|
361 | (1) |
|
|
362 | (3) |
|
Internal broker event logging |
|
|
365 | (1) |
|
|
366 | (1) |
index |
|
367 | |