| help | account  


Designing Applications with MSMQ: Message Queuing for Developers
View Larger Image
Alan Dickman
Addison-Wesley, Paperback, Published August 1998, 370 pages, ISBN 0201325810
List Price: $47.95
Our Price: $30.50
You Save: $17.45 (36% Off)


FREE Shipping on Orders over $40!*
Availability: Out-Of-Stock

Be the First to Write a Review and tell the world about this title!

Books on similar topics, in best-seller order:

Books from the same publisher, in best-seller order:

"This book is an invaluable resource for learning about MSMQ."
--Peter Houston
MSMQ Product Manager, Microsoft Corporation

Microsoft Message Queue Server (MSMQ)--which is incorporated into the newest version of Windows NT--brings asynchronous transaction processing (TP) capabilities to the Windows platform for the first time. MSMQ combines the high performance and robustness of mainframe transaction processing with a flexibility of objects, an administrative ease-of-use, and an ability to scale. As such MSMQ is a key technology contributing to the growth of Internet commerce and intranet distributed processing.

Whether you are a Windows programmer who is new to transaction processing or a UNIX programmer who wants to learn more about MSMQ, this book will introduce you to the topic and show you how to develop transaction-processing applications using the MSMQ technology.

Designing Applications with MSMQ offers an overview of the general design of queued messaging applications and a discussion on how MSMQ can be used in two-tier, three-tier, Web, and component architecture applications. This book also provides a detailed description of MSMQ architecture, queue, and message properties, as well as a detailed description of how MSMQ interacts with other transaction technologies, such as MTS and SQL Server.

A step-by-step tutorial shows you how to write MSMQ applications using COM components, Visual Basic, Visual C++, and the MSMQ API. In addition to the tutorial, this book offers a comprehensive introduction to transaction processing and develops a full-scale application using MSMQ that illustrates the technology's power and potential for this emergent field.

Contents

Foreword xiii

Preface xvii

Chapter 1 Distributed Architectures and Microsoft Message Queue Server (MSMQ) 1

1.1 Introduction to MSMQ Application Architectures 3
1.1.1 Communications within Distributed Applications 3
1.1.2 Queued Messaging Application Architectures 4
1.2 Using MSMQ in Well-Known Distributed Application Architectures 9
1.2.1 Monolithic Systems 9
1.2.2 Two-Tier Systems 10
1.2.3 Three-Tier Systems 12
1.2.4 Web Applications 16
1.3 The Future of MSMQ 17
1.4 Conclusion 18
1.5 Resources and References 18

Chapter 2 Overview of MSMQ Architecture and Features 21

2.1 Selected Definitions 22
2.2 Programming Interfaces 24
2.3 Messages and Message Queues 25
2.3.1 Messages 25
2.3.2 Queues 27
2.4 Sending and Receiving Messages 29
2.4.1 Peeking at Messages 30
2.4.2 Transactional Messaging 30
2.4.3 Message Security 33
2.4.4 Message Encryption 34
2.5 MSMQ Architecture 35
2.5.1 MSMQ Enterprise 35
2.5.2 Connected Networks 38
2.5.3 Message Routing 38
2.5.4 Enterprise Security 41
2.6 Integration with non-MSMQ Messaging Environments 42
2.7 Conclusion 45
2.8 Resources and References 46

Chapter 3 Properties and Queue Names 47

3.1 Properties 47
3.1.1 Queue Properties 48
3.1.2 Message Properties 50
3.2 Queue Naming 59
3.2.1 Pathnames 59
3.2.2 Format Names 60
3.3 Conclusion 67
3.4 Resources and References 67

Chapter 4 An MSMQ Application Using the COM Components 69

4.1 Overview of Hello World 70
4.2 MSMQ COM Components 73
4.2.1 MSMQQueueInfo 73
4.2.2 MSMQQueue 74
4.2.3 MSMQMessage 74
4.2.4 MSMQQuery 74
4.2.5 MSMQQueueInfos 75
4.3 Queue Creation 75
4.3.1 Using MSMQ Explorer 76
4.3.2 Using COM 79
4.4 Locating Queues 81
4.5 Creating the Hello World Sender Form 84
4.6 Opening Queues and Sending Messages 86
4.7 Receiving Responses 90
4.8 Closing Queues 93
4.9 The Hello World Receiver 94
4.10 Summary 97
4.11 Resources and References 97

Chapter 5 An MSMQ Application Using the MSMQ API 99

5.1 Overview of Hello World 100
5.2 Working with Properties in the MSMQ API 102
5.2.1 Using MQQUEUEPROPS to Represent Queue Properties 102
5.2.2 Using MQMSGPROPS to Represent Message Properties 105
5.2.3 Using MQPROPVARIANT to Represent Property Values 106
5.2.4 Scenarios Using MQQUEUEPROPS, MQMSGPROPS, and MQPROPVARIANT 108
5.3 Creating Queues 111
5.4 Locating Queues 114
5.5 Opening, Closing, and Deleting Queues 119
5.6 Receiving Messages and Sending a Response 122
5.7 The Hello World Sender 127
5.8 Sample Program Output 131
5.9 Conclusion 134
5.10 Resources and References 135

Chapter 6 MSMQ Queue and Message Design Considerations 137

6.1 Hello World Program Analysis 137
6.2 Queue Options 139
6.3 Messages and Message Property Options 141
6.3.1 Message Types 141
6.3.2 Message Body Structure 142
6.4 Summary 144
6.5 Resources and References 144

Chapter 7 Solutions to Message Problems 145

7.1 Converting Message and Correlation IDs to Strings 146
7.2 Request and Response Correlation 147
7.2.1 Copying a Message Identifier into a Correlation Identifier 148
7.2.2 Request and Response Message Correlation 150
7.3 Asynchronous Message Processing 156
7.3.1 Setting Up to Receive Messages Asynchronously 157
7.3.2 Receiving Messages Asynchronously 159
7.3.3 Processing Wait Timer Timeouts 162
7.3.4 Using the MSMQ API 162
7.4 Handling Variable-Length Messages 164
7.5 Multipart Message Sequences 169
7.6 Object Shipping 172
7.6.1 Sending and Receiving a Standard Microsoft Word Document 174
7.6.2 Sending Data Records 176
7.6.3 Sending Your Own COM Objects 178
7.7 Working While Off Line 179
7.8 Conclusion 180
7.9 Resources and References 180

Chapter 8 Improving Message Tracking and Recovery 181

8.1 Overview of MSMQ Facilities 181
8.2 Making Messages Recoverable 184
8.3 Setting Up Message and Queue Journals 185
8.3.1 Message Journals 185
8.3.2 Queue Journals 187
8.4 Tracing Message Routing 190
8.5 Acknowledging Messages 193
8.6 Recovering and Tracing Messages 196
8.6.1 Nontransactional Messages 196
8.6.2 Transactional Messages 199
8.7 Conclusion 200
8.8 Resources and References 200

Chapter 9 MSMQ Security 201

9.1 Authentication 202
9.1.1 Queue Authentication Options 205
9.1.2 Using Internal Certificates with Messages 209
9.1.3 Using External Certificates with Messages 211
9.2 Message Encryption 214
9.2.1 Queue Privacy Options 215
9.2.2 Sending and Receiving Private Messages 217
9.3 MSMQ Access Controls 219
9.4 Managing Queue Access Programmatically 222
9.5 Access Event Auditing 225
9.6 Conclusion and Recommendations 227
9.7 Resources and References 229

Chapter 10 Introduction to Transaction Processing 231

10.1 Basics of Transaction Processing 232
10.1.1 Transaction Processing Systems 232
10.1.2 Goals of Transaction Processing 235
10.1.3 Complementary TP Technologies-Clustering 236
10.2 The ACID Properties 236
10.2.1 Atomicity 236
10.2.2 Consistency 239
10.2.3 Isolation 240
10.2.4 Durability 240
10.3 Distributed Transaction Processing 241
10.3.1 On-Line Distributed Transactions 242
10.3.2 Two-Phase Commit 243
10.3.3 Nested Transactions 246
10.3.4 Overhead 247
10.4 Transactional Queued Messaging 248
10.4.1 Error Handling 249
10.4.2 Compensating Transactions 250
10.4.3 Overhead 251
10.5 When to Use On-Line or Queued Transactions 252
10.5.1 Strengths and Weaknesses of On-Line Distributed Transactions 253
10.5.2 Strengths and Weaknesses of Queued Messaging 254
10.6 Conclusions and Recommendations 255
10.7 Resources and References 256

Chapter 11 Implementing Transactions and Assessing Performance 257

11.1 Basics of Transactional Messaging 259
11.2 External Transactions 259
11.2.1 DTC Transactions 260
11.2.2 MTS Transactions 264
11.2.3 XA Transactions 272
11.3 Internal Transactions 274
11.3.1 Using COM 274
11.3.2 Using the MSMQ API 276
11.3.3 Single-Message Internal Transactions 277
11.4 In-Order Delivery 278
11.5 Conclusion 279
11.6 Resources and References 280

Appendix A COM Component and MSMQ API Reference 281

A.1 COM Components 281
A.2 MSMQ API Functions 292
A.3 Queue and Message Properties 310

Appendix B Configuring Visual C++ and Visual Basic for MSMQ 337

B.1 Creating and Configuring a Project in Visual C++ 337
B.1.1 Defining Header Files 338
B.1.2 Defining Library Files 339
B.2 Creating and Configuring a Project in Visual Basic 340
B.2.1 Creating a New Project Workspace 341
B.2.2 Defining the Library File 342

Appendix C MSMQ Performance 345

C.1 Messaging Performance 345
C.2 Conclusions and Recommendations 348
Index 351




Forgot your password?
FAQs
Shipping Options
Returns
Your Orders
Your Account