ActiveMQ in Action
HIGHLIGHT ActiveMQ in Action is an example-rich tutorial that shows Java developers how to implement distributed messaging using ActiveMQ, and how to integrate ActiveMQ with Java and non-Java technologies. DESCRIPTION Applications in enterprises need to communicate, most commonly done by messaging. ActiveMQ in ActionBRUCE SNYDERDEJAN BOSANACROB DAVIESMANNINGGreenwich(74 w. longFor online information and ordering of this and other manning books, please visitwww.manning.com.ThepublisheroffersdiscountsonthisbookwhenorderedinquantityFor more information, please contactSpecial Sales DepartmentManning publications co1 80 Broad stSuite 1323Stamford. cT06901Email:orders@manning.como201l by Manning Publications Co. All rights reservedNo part of this publication may be reproduced, stored in a retrieval system, or transmitted, inany form or by means electronic, mechanical, photocopying, or otherwise, without prior writtenpermission of the publisherMany of the designations used by manufacturers and sellers to distinguish their products areclaimed as trademarks. Where those designations appear in the book, and manningPublications was aware of a trademark claim, the designations have been printed in initial capsor all capsoo Recognizing the importance of preserving what has been written, it is mannings policy to havethe books we publish printed on acid-free paper and we exert our best efforts to that endRecognizing also our responsibility to conserve the resources of our planet, Manning bookare printed on paper that is at least 15 percent recycled and processed without the use ofelemental chlorineManning publications coDevelopment editor: Jeff Bleiel1 80 Broad StCopyeditor: Benjamin BergSuite 1323Proofreader: Katie tennantStamford. CT06901Typesetter Dottie marsicoCover designer: Marija TudorISBN978-1933988948Printed in the united states of america12345678910-MAL-1615141312brief contentsPART 1 AN INTRODUCTION TO MESSAGINGAND ACTIVEMQ1 Introduction to Apache ActiveMQ 32 Understanding message-oriented middleware and IMs 173 The ActiveMQ in Action examples 42PART 2 CONFIGURING STANDARDACTIVEMQ COMPONENTS554 Connecting to ActiveMQ 575 ActiveMQ message storage 966 Securing ActiveMQ 117PART 3 USING ACTIVEMQ TO BUILDMESSAGING APPLICATIONS143789Creating Java applications with ActiveMQ 145Integrating ActiveMQ with application servers 174ActiveMQ messaging for other languages 22BRIEF CONTENTSPART 4 ADVANCED FEATURES IN ACTIVEMQ25510 Deploying ActiveMQ in the enterprise 25711 ActiveMQ broker features in action 27712Advanced client options 29513 Tuning ActiveMQ for performance 31214 Administering and monitoring ActiveMQ 381contentspreface xUacknowledgabout this book xixPART 1 AN INTRODUCTION TO MESSAGINGAND ACTIVEMQIntroduction to Apache ActiveMQ 31.1 ActiveMQ features 41. 2 USing ActiveMQ: why and when? 6Loose coupling and ActiveMQ 6. When to use ActiveMQ 81. 3 Getting started with ActiveMQ 10Downloading and installing the Java se 10 downloadingActivemQ 11: Examining the ActivemQ directory 11Starting up ActiveMQ 121.4 Running your first examples with ActiveMQ 141.5 Summary 162Understanding message-oriented middleware and MS 172.1 Introduction to enterprise messaging 182.2 What's message-oriented middleware? 20CoNTENTS2.8 What's the Java Message Service? 212.4 The JMS specification 28MS clients 23. Non-/Ms clients 25. The Ms provider 25The Ms message 25 .MS message internals 25: Messageselectors 29 .Mms domains 32 Administered objects 352.5 Using the JMs APIs to create JMS applications 35A simple ms application 36 Message-driven beans 392.6 Summary 413The ActiveMQ in Action examples 428. 1 Downloading Maven and compiling the examples 438.2 Use case one: the stock portfolio example 45Running the stock portfolio example 463.3 Use case two: the job queue example 50Running the job queue example 513.4 Summary 53PART 2 CONFIGURING STANDARDACTIVEMO COMPONENTS●●。@@@@@●。@e@@@@0@@@@@@●@554Connecting to ActiveMQ 574.1 Understanding connector Uris 584.2 Transport connectors 60Configuring transport connectors 60. Adapting the stockportfolio example 614.3 Connecting to ActiveMo over the network 63Transmission Control protocol (TCP)64. New 1/0 APIprotocol (N1o) 66. User Datagram Protocol (UDP)68Secure Sockets layer Protocol (ssl) 70 Hypertext TransferProtocol(http:/https)774. Connecting to ActiveMQ inside the virtual machine(VM connector) 794.5 Network connectors 81Static networks 83 Dynamic networks 884.6 Summary 94CoNTENTSActiveMo message storage 965.1 How are messages stored by ActiveMQ: 975.2 The Kahadb message store 98The KahaDB message store internals 99. The KahaDB messagestore directory structure 100. Configuring the KahaDB messagestore 1015.8 The AMQ message store 108The aMQ message store internals 103 The AMQ message storedirectory structure 104. Configuring the amQ message store 1055. 4 The JDBC message store 107Databases supported by the DBC message store 107. The DBCmessage store schema 108: Configuring the DBC messagestore 109. Using the DBC message store with the ActiveMQjournal 1115.5 The memory message store 1llConfiguring the memory store 1125.6 Caching messages in the broker for consumers 113How message caching for consumers works 113 The ActiveMQsubscription recovery policies 114 Configuring the subscriptionperecovery polic1155. 7 Summary 116Securing ActiveMQ 1176.1 Authentication 118Configuring the simple authentication plug-in 118Configuring the JAAs plug-in 1216.2 Authorization 123Destination-level authorization 124 Message-levelauthorization 1276.8 Building a custom security plug-in 131Implementing the plug-in 132. Configuring the plug-in 133Testing the plug-in 1346. Certificate-based security 135Preparing certificates 136. Creating a truststore 136Configuring the broker 138 Authorization explained 139Testing it out 1396.5 Summary 142
用户评论