100% found this document useful (5 votes)
17 views

Learning RabbitMQ 1st Edition Toshev Martin 2024 Scribd Download

Martin

Uploaded by

sazmannafath
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (5 votes)
17 views

Learning RabbitMQ 1st Edition Toshev Martin 2024 Scribd Download

Martin

Uploaded by

sazmannafath
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.

com

Learning RabbitMQ 1st Edition Toshev Martin

https://textbookfull.com/product/learning-rabbitmq-1st-
edition-toshev-martin/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

RabbitMQ Essentials Build distributed and scalable


applications with message queuing using RabbitMQ 2nd
Edition Johansson
https://textbookfull.com/product/rabbitmq-essentials-build-
distributed-and-scalable-applications-with-message-queuing-using-
rabbitmq-2nd-edition-johansson/
textboxfull.com

RabbitMQ in Depth 1st Edition Gavin M. Roy

https://textbookfull.com/product/rabbitmq-in-depth-1st-edition-gavin-
m-roy/

textboxfull.com

RabbitMQ in Depth 1st Edition Gavin M Roy

https://textbookfull.com/product/rabbitmq-in-depth-1st-edition-gavin-
m-roy-2/

textboxfull.com

The Optimal RabbitMQ Guide 2nd Edition Lovisa Johansson

https://textbookfull.com/product/the-optimal-rabbitmq-guide-2nd-
edition-lovisa-johansson/

textboxfull.com
Easy Japanese a Direct Learning Approach for Immediate
Communication Japanese Phrasebook 2016th Edition Samuel E
Martin
https://textbookfull.com/product/easy-japanese-a-direct-learning-
approach-for-immediate-communication-japanese-phrasebook-2016th-
edition-samuel-e-martin/
textboxfull.com

Commanding Casey A Forbidden Enemies to Lovers Romance 1st


Edition Nicolina Martin [Martin

https://textbookfull.com/product/commanding-casey-a-forbidden-enemies-
to-lovers-romance-1st-edition-nicolina-martin-martin/

textboxfull.com

Biopackaging 1st Edition Martin Alberto Masuelli

https://textbookfull.com/product/biopackaging-1st-edition-martin-
alberto-masuelli/

textboxfull.com

The Twins Gladiators of Krix 4 1st Edition Miranda Martin


James D Horton Martin Miranda

https://textbookfull.com/product/the-twins-gladiators-of-krix-4-1st-
edition-miranda-martin-james-d-horton-martin-miranda/

textboxfull.com

Functional Design: Principles, Patterns, and Practices


(Robert C. Martin Series) 1st Edition Robert C. Martin

https://textbookfull.com/product/functional-design-principles-
patterns-and-practices-robert-c-martin-series-1st-edition-robert-c-
martin/
textboxfull.com
[1]
Learning RabbitMQ

Build and optimize efficient messaging applications


with ease

Martin Toshev

BIRMINGHAM - MUMBAI
Learning RabbitMQ

Copyright © 2015 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the author(s), nor Packt
Publishing, and its dealers and distributors will be held liable for any damages
caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

First published: December 2015

Production reference: 1171215

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham B3 2PB, UK.

ISBN 978-1-78398-456-5

www.packtpub.com
Credits

Author Project Coordinator


Martin Toshev Nidhi Joshi

Reviewers Proofreader
Van Thoai Nguyen Safis Editing
Héctor Veiga
Indexer
Commissioning Editor Hemangini Bari
Ashwin Nair
Graphics
Acquisition Editor Disha Haria
Vinay Argekar
Production Coordinator
Content Development Editor Arvindkumar Gupta
Kirti Patil
Cover Work
Technical Editor Arvindkumar Gupta
Danish Shaikh

Copy Editor
Vibha Shukla
About the Author

Martin Toshev is a software developer and Java enthusiast with more than eight
years of experience and vast expertise originating from projects in areas such as
enterprise Java, social networking, source code analysis, Internet of Things, and
investment banking in companies such as Cisco and Deutsche Telekom. He is a
graduate of computer science from the University of Sofia. He is also a certified Java
professional (SCJP6) and a certified IBM cloud computing solution advisor. His areas
of interest include a wide range of Java-related technologies (Servlets, JSP, JAXB,
JAXP, JMS, JMX, JAX-RS, JAX-WS, Hibernate, Spring Framework, Liferay Portal, and
Eclipse RCP), cloud computing technologies, cloud-based software architectures,
enterprise application integration, and relational and NoSQL databases. Martin is
one of the leaders of the Bulgarian Java Users group (BGJUG), a regular speaker at
Java conferences, and one of the organizers behind the jPrime conference in Bulgaria
(http://jprime.io/).
About the Reviewers

Van Thoai Nguyen has worked in the software industry for a decade in various
domains. In 2012, he joined BuzzNumbers as one of the core senior software
engineers, where he had opportunities to design, implement, and apply many
cool technologies, tools, and frameworks. A RabbitMQ cluster was employed as
the backbone of the real-time data processing platform, which includes various
data collectors, data filtering, enrichment, and storage using a sharded cluster of
MongoDB and SOLR. He is still maintaining the open source .NET RabbitMQ client
library, Burrow.NET (https://github.com/vanthoainguyen/Burrow.NET), which
he built during the time he worked for BuzzNumbers. This library is still being used
in many different applications in that company. Van is interested in clean code and
design, SOLID principle, and BIG data. You can read his blog at http://thoai-
nguyen.blogspot.com.au/.
Héctor Veiga is a software engineer specializing in real-time data integration and
processing. Recently, he has focused his work on different cloud technologies, such
as AWS, to develop scalable, resilient, and high-performing applications with the
latest open source technologies, such as Scala, Akka, or Apache Spark. Additionally,
he has a strong foundation in messaging systems, such as RabbitMQ and AMQP. He
also has a master's degree in telecommunications engineering from the Universidad
Politécnica de Madrid and a master's degree in information technology and
management from the Illinois Institute of Technology.

He currently works as part of the Connected Driving real-time data collection team
and is actively developing scalable applications to ingest and process data from
several different sources. He utilizes RabbitMQ heavily to address their messaging
requirements. In the past, he worked at Xaptum Technologies, a company dedicated
to M2M technologies.

Héctor also helped with the reviewing process of RabbitMQ Cookbook and RabbitMQ
Essentials, both from Packt Publishing.

I would like to thank my parents, Pilar and Jose Carlos, as well as my sister, Paula,
for always supporting me and motivating me to keep pushing on. Without them,
all this would not have been possible.
www.PacktPub.com

Support files, eBooks, discount offers, and more


For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF
and ePub files available? You can upgrade to the eBook version at www.PacktPub.com
and as a print book customer, you are entitled to a discount on the eBook copy. Get in
touch with us at service@packtpub.com for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign
up for a range of free newsletters and receive exclusive discounts and offers on Packt
books and eBooks.
TM

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital
book library. Here, you can search, access, and readPackt's entire library of books.

Why subscribe?
• Fully searchable across every book published by Packt
• Copy and paste, print, and bookmark content
• On demand and accessible via a web browser

Free access for Packt account holders


If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view 9 entirely free books. Simply use your login credentials for
immediate access.
I would like to thank all of the people that supported me during the process of
writing this book and especially my mother Milena, my beloved Tsveti and my
grandmother Maria. Without them this would not have been possible.
Table of Contents
Preface vii
Chapter 1: Introducing RabbitMQ 1
Enterprise messaging 2
Use cases 6
Solutions 7
Patterns 7
Point-to-point 7
Publish-subscribe 7
Request-response 7
Understanding RabbitMQ 8
Features 10
Comparison with other technologies 11
Installation 11
Linux 16
Case study: CSN (Corporate Social Network) 17
Summary 18
Exercises 18
Chapter 2: Design Patterns with RabbitMQ 19
Messaging patterns in RabbitMQ 19
Point-to-point communication 23
Publish-subscribe communication 29
Request-reply communication 34
Message router 39
Case study: Initial design of the CSN 41
Summary 42
Exercises 42

[i]
Table of Contents

Chapter 3: Administration, Configuration, and Management 43


Administering RabbitMQ instances 43
Administering RabbitMQ components 46
Administering users 47
Administering vhosts 49
Administering permissions 50
Administering exchanges 50
Administering queues 51
Administering bindings 52
Administering policies 52
Administering the RabbitMQ database 55
Full backup and restore 55
Backing up and restoring the broker metadata 56
Installing RabbitMQ plugins 57
Configuring RabbitMQ instances 58
Setting environment variables 58
Modifying the RabbitMQ configuration file 59
Managing RabbitMQ instances 59
Upgrading RabbitMQ 62
Case study: Administering CSN 63
Summary 64
Exercises 65
Chapter 4: Clustering 67
Benefits of clustering 67
RabbitMQ clustering support 68
Creating a simple cluster 69
Adding nodes to the cluster 70
Adding RAM-only nodes to the cluster 73
Removing nodes from a cluster 74
Connecting to the cluster 75
Case study: scaling the CSN 81
Summary 82
Exercises 82
Chapter 5: High Availability 83
Benefits of high availability 84
High availability support in RabbitMQ 85
Mirrored queues 86
Federation plugin 90
Shovel plugin 96

[ ii ]
Table of Contents

Reliable delivery 98
AMQP transactions 100
Publisher confirms 103
Client high availability 104
Client reconnections 104
Load balancing 104
Case study: introducing high availability in CSN 105
Summary 106
Exercises 106
Chapter 6: Integrations 107
Types of integrations 108
Spring framework 109
Spring AMQP 110
Spring Integration 113
Integration with ESBs 116
Mule ESB 116
WSO2 122
Integration with databases 127
Oracle RDBMS 127
MongoDB 129
Hadoop 129
RabbitMQ integrations 130
RabbitMQ deployment options 130
Puppet 131
Docker 132
Vagrant 133
Testing RabbitMQ applications 133
Unit testing of RabbitMQ applications 133
Integration testing of RabbitMQ applications 133
Case study: Integrating CSN with external systems 134
Summary 135
Exercises 135
Chapter 7: Performance Tuning and Monitoring 137
Performance tuning of RabbitMQ instances 137
Memory usage 139
Faster runtime execution 140
Message size 141
The maximum frame size of messages 141
The maximum number of channels 141
Connection heartbeats 142
Clustering and high availability 142
QoS prefetching 143
[ iii ]
Table of Contents

Message persistence 144


Mnesia transaction logs 145
Acknowledgements, transactions and publisher confirms 145
Message routing 145
Queue creation/deletion 145
Queue message TTL 146
Alarms 147
Network tuning 148
Client tuning 149
Performance testing 149
Monitoring of RabbitMQ instances 154
The management UI 154
Nagios 156
Monit 158
Munin 159
Comparing RabbitMQ with other message brokers 162
Case Study : Performance tuning and monitoring of
RabbitMQ instances in CSN 162
Summary 162
Exercises 163
Chapter 8: Troubleshooting 165
General troubleshooting approach 165
Checking the status of a particular node 166
Inspecting the RabbitMQ logs 167
The RabbitMQ mailing list and IRC channel 169
Erlang troubleshooting 169
An Erlang Primer 169
The Erlang crash dump 177
Problems with starting/stopping RabbitMQ nodes 179
Problems with message delivery 182
Summary 182
Exercises 183
Chapter 9: Security 185
Types of threats 185
Authentication 188
Configuring the LDAP backend 190
Security considerations 194
Authorization 194
LDAP authentication 195

[ iv ]
Table of Contents

Secure communication 198


Secure communication with the management interface 201
Secure cluster communication 203
EXTERNAL SSL authentication 203
Penetration testing 203
Case study – securing CSN 204
Summary 206
Exercises 206
Chapter 10: Internals 207
High level architecture of RabbitMQ 207
Overview of RabbitMQ components 212
Boot component 212
Plug-in loader component 215
Recovery component 216
Persistence component 217
Metadata persistence 217
Message persistence component 218
Networking component 219
Other components 220
Developing plug-ins for RabbitMQ 221
Case Study: Developing a RabbitMQ plugin for CSN 222
Summary 222
Exercises 223
Appendix: Contributing to RabbitMQ 225
RabbitMQ community 225
RabbitMQ repositories 225
Getting the sources 226
Building the RabbitMQ server 226
Points for contribution 230
Index 231

[v]
Preface
Learning RabbitMQ provides you with a practical guide for the notorious message
broker and covers the essentials required to start using it. The reader is able to
build up knowledge along the way—starting from the very basics (such as what is
RabbitMQ and what features does it provide) and reaching the point where more
advanced topics, such as RabbitMQ troubleshooting and internals, are discussed.
Best practices and important tips are provided in a variety of scenarios; some of them
are related to external systems that provide integration with the message broker or
that are integrated as part of the message broker in the form of a RabbitMQ plugin.
Practical examples are also provided for most of these scenarios that can be applied
in a broader context and used as a good starting point.

An example system called CSN (Corporate Social Network) is used to illustrate the
various concepts provided throughout the chapters.

Each chapter ends with an Exercises section that allows the reader to test his
understanding on the presented topic.

What this book covers


Chapter 1, Introducing RabbitMQ, provides you with a brief recap on enterprise
messaging and a short overview of RabbitMQ along with its features. Other similar
technologies are mentioned and an installation guide for the message broker is
provided at the end of the chapter. The basic terminology behind RabbitMQ such as
exchanges, queues, and bindings is introduced.

Chapter 2, Design Patterns with RabbitMQ, discusses what messaging patterns


can be implemented using RabbitMQ, including point-to-point, publish-subscribe,
request-reply, and message router types of communication. The patterns are
implemented using the building blocks provided by the message broker and
using the Java client API.

[ vii ]
Preface

Chapter 3, Administration, Configuration and Management, reveals how to administer


and configure RabbitMQ instances, how to install and manage RabbitMQ plugins,
and how to use the various utilities provided as part of the RabbitMQ installation
in order to accomplish a number of administrative tasks. A brief overview of the
RabbitMQ management HTTP API is provided.

Chapter 4, Clustering, discusses what built-in clustering support is provided in the


message broker and how it can be used to enable scalability in terms of message
queues. A sample RabbitMQ cluster is created in order to demonstrate how nodes
can be added/removed from a cluster and how RabbitMQ clients can connect to
the cluster.

Chapter 5, High Availability, extends on the concepts of clustering by providing an


overview of how a RabbitMQ cluster can be made more reliable in terms of mirrored
queues and how messages can be replicated between remote instances using the
Federation and Shovel plugins. High availability in terms of client connections and
reliable delivery is also discussed with AMQP transactions, publisher confirms, and
client reconnections.

Chapter 6, Integrations, provides you with a number of practical scenarios for


integration of the message broker with the Spring framework, with ESB (enterprise
services bus) systems such as MuleESB and WS02, and with database management
systems (RDBMS and NoSQL). Deployment options for RabbitMQ using systems
such as Puppet, Docker, and Vagrant are discussed in the chapter. A brief overview
of how RabbitMQ applications can be tested using third-party frameworks is
provided at the end of the chapter.

Chapter 7, Performance Monitoring and Tuning, gives a detailed list of factors that must
be considered in terms of performance tuning of the message broker. The PerfTest
tool is used to demonstrate how the RabbitMQ performance can be tested. At the end
of the chapter, several monitoring solutions that provide support for RabbitMQ such
as Nagios, Munin, and Monit are used to demonstrate how the message broker can
be monitored in terms of stability and performance.

Chapter 8, Troubleshooting, illustrates a number of problems that can occur during the
startup of the message broker and normal operation along with the various causes
and resolutions in such cases. A brief primer on the Erlang programming language
is provided for the purpose of understanding and analyzing the RabbitMQ crash
dump—either directly or using the Crashdump Viewer for convenience.

Chapter 9, Security, provides a high-level overview of the vulnerability landscape


related to the message broker along with a number of techniques to secure a
RabbitMQ setup. Authentication, authorization, and secure communication are
among the most important concepts covered in the chapter.

[ viii ]
Preface

Chapter 10, Internals, discusses the internal architecture of the message broker and
provides a detailed overview on the most important components that RabbitMQ
comprises of.

Appendix A, Contributing to RabbitMQ, provides a short guide on how to get the


RabbitMQ sources, how to set up a development environment, and how to build the
message broker. A short discussion on how to contribute to the RabbitMQ ecosystem
is provided as part of the appendix.

What you need for this book


In order to get the most out of this book, the reader is expected to have at least a
basic understanding of what messaging is all about and a good understanding in at
least one object-oriented programming language. As the book features the RabbitMQ
Java client API in order to demonstrate how to use the message broker, it is good to
have at least a basic understanding of the Java programming language. Most of the
examples are not specific to a particular operating system; if they are, it is explicitly
mentioned whether this is, for example, a Windows- or Unix-based distribution
such as Ubuntu. For this reason, there is no particular requirement for an operating
system in order to run the examples.

Who this book is for


If you are a developer or system administrator with basic knowledge in messaging
who wants to learn RabbitMQ or further enhance your knowledge in working with
the message broker, then this book is ideal for you. For a full understanding of
some the examples in the book, basic knowledge of the Java programming language
is required. Feeling comfortable with RabbitMQ is a great way to leverage your
expertise in the world of messaging systems.

Conventions
In this book, you will find a number of text styles that distinguish between different
kinds of information. Here are some examples of these styles and an explanation of
their meaning.

Code words in text, names of third-party applications, utilities, folder names,


filenames, file extensions andpathnames are shown in bold as follows: "We already
saw how easy it is to start/stop/restart instances using the rabbitmqctl and
rabbitmq-server utilities that are part of the standard RabbitMQ installation."

[ ix ]
Preface

A block of code displayed in a box with console font:


<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>

A block of configuration or output is also displayed in a box as follows:


sudo apt-get install rabbitmq-server –y
sudo rabbitmq-plugins enable rabbitmq_management
sudo service rabbitmq-server restart

New terms and important words are also shown in bold. Words that you see on the
screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking
the Next button moves you to the next screen."

Reader feedback
Feedback from our readers is always welcome. Let us know what you think about
this book—what you liked or disliked. Reader feedback is important for us as it
helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail feedback@packtpub.com, and mention


the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing
or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support
Now that you are the proud owner of a Packt book, we have a number of things to
help you to get the most from your purchase.

Downloading the example code


You can download the example code files from your account at http://www.
packtpub.com for all the Packt Publishing books you have purchased. If you
purchased this book elsewhere, you can visit http://www.packtpub.com/support
and register to have the files e-mailed directly to you.

[x]
Preface

Errata
Although we have taken every care to ensure the accuracy of our content, mistakes
do happen. If you find a mistake in one of our books—maybe a mistake in the text or
the code—we would be grateful if you could report this to us. By doing so, you can
save other readers from frustration and help us improve subsequent versions of this
book. If you find any errata, please report them by visiting http://www.packtpub.
com/submit-errata, selecting your book, clicking on the Errata Submission Form
link, and entering the details of your errata. Once your errata are verified, your
submission will be accepted and the errata will be uploaded to our website or added
to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/


content/support and enter the name of the book in the search field. The required
information will appear under the Errata section.

Piracy
Piracy of copyrighted material on the Internet is an ongoing problem across all
media. At Packt, we take the protection of our copyright and licenses very seriously.
If you come across any illegal copies of our works in any form on the Internet, please
provide us with the location address or website name immediately so that we can
pursue a remedy.

Please contact us at copyright@packtpub.com with a link to the suspected


pirated material.

We appreciate your help in protecting our authors and our ability to bring you
valuable content.

Questions
If you have a problem with any aspect of this book, you can contact us at
questions@packtpub.com, and we will do our best to address the problem.

[ xi ]
Introducing RabbitMQ
In the world of enterprise messaging systems there are a number of patterns and
practices that are already successfully applied in order improve to scalability and
interoperability between different components in a system or between varying in
size and complexity systems. RabbitMQ is one such messaging solution, which
combines powerful messaging capabilities with easy use and availability on a
number of target platforms.

The following topics will be covered in this chapter:

• Fundamentals of enterprise messaging


• RabbitMQ brief overview
• RabbitMQ features
• Comparing RabbitMQ to other technologies
• Installing RabbitMQ

[1]
Introducing RabbitMQ

Enterprise messaging
A typical enterprise will have a number of systems that must typically communicate
with each other in order to implement a well-defined business process. A question that
is frequently tackled for this reason is how to implement the communication channel
between these types of systems? For example, consider the following diagram:

System 1 System 4

System 2 ? System 5

System 3 System 6

The question mark in the preceding picture denotes the communication media for
the six systems that are illustrated. In the diagram, we can think of these separate
systems as the components of one large system and the problem stays the same.
Before discussing the various alternatives for integration, a number of key factors are
considered, as follows:

• Loose coupling: At what degree do the different systems depend on each


other or can operate independently?
• Real-time workload processing: How fast is the communication between
the systems?
• Scalability: How does the entire system scale when more systems are added
and the workload demands an increase?
• Maintainability: How hard it is to maintain the integrated systems?
• Extensibility: How easy it is to integrate new systems?

[2]
Chapter 1

Let's assume that the systems communicate directly via some kind of remote
procedure calls as shown in the following diagram:

System 1 System 4

System 2 System 5

System 3 System 6

This implies that separate communication links must be established between each
pair of systems, which leads to tight coupling, a lot of effort to maintain all of the
links, reduced scalability, and reduced extensibility (for every new system that
is added, a few more communication links with other systems must be created).
However, real-time communication requirements might be met with some additional
effort to design the communication links.

A second approach is to use a shared file system in order to exchange files between
the systems that are being integrated, as illustrated in the following diagram:

System 1 System 4

System 2 File System System 5

System 3 System 6

[3]
Introducing RabbitMQ

A shared file system is used to provide the communication medium. Each system
may export data to a file that can be imported and used by other systems. The fact
that each system may support its own data format leads to the fact that each system
must have a particular mechanism to import data from every other system that it
needs to communicate with. This, on other hand, leads to the same problems that are
described in the case of direct communication. Moreover, real-time communication
requirements might be more difficult to establish and reading or writing data from
disk is also an expensive operation.

A third option is to use a shared database as shown in the following diagram:

System 1 System 4

System 2 System 5
Database

System 3 System 6

Here, all the systems should depend on the same database schema. Although this
reduces coupling between systems and improves extensibility (new systems must
conform to a single database schema in order to integrate with other systems),
real-time workload processing is still an issue. Scalability and maintainability
depend directly on the type of database that is being used and they could turn out
to be weak factors especially if it is a relational database (this may not be the case if
NoSQL solutions are applicable for the particular use case).

[4]
Chapter 1

Messaging comes to the rescue when considering the problems that arise when
applying the previous approaches. Consider the following diagram for the
Enterprise Messaging System:

System 1 System 4

Enterprise
System 2 Messaging System 5
System

System 3 System 6

A message is the central unit of communication used in enterprise messaging


systems. A message typically consists of the following:

• A message header: It provides metadata about the message such as encoding,


routing information, and security-related information
• A message body: It provides the actual data that is carried by the message,
represented in a proper format

The messaging system itself provides mechanisms to validate, store, route, and
transform messages that are being sent between the different systems. Each system is
responsible for crafting its own message that is transferred via the messaging system
(also called the messaging broker) to other systems that are connected to the broker
and configured to receive that particular type of message. Each system may create a
message in a proper format that is specified by the protocol of the message broker—
meaning that the system is only coupled with that particular protocol. If the broker
implements a protocol that is based on a well-recognized standard, then this would
further decouple the systems from that particular message broker implementation.

[5]
Introducing RabbitMQ

Real-time workload processing is typically quite fast as the particular protocol that
is implemented by different messaging brokers is optimized to process message data
in a reliable and secure manner with minimal overhead. Most messaging solutions
provide a number of facilities that allow easy configuration, management, and
monitoring; thus, simplifying maintainability. Clustering support is also considered
by most implementations due to scalability and reliability requirements and
increasing workload demands. Integrating new systems is a matter of implementing
a mechanism for direct communication with the message broker.

In case the different systems provide different implementations of messaging protocols


(such as REST, SOAP, JSON-RPC, JMX, AMQP, and many others), a messaging system
could further provide various adapters for the different protocols as well as extended
mechanisms for routing and transformation of different types of messages—this
extended functionality also categorizes the message brokers as Enterprise Service
Bus (ESB) solutions. One major drawback of an ESB is that it must implement all
the communication requirements of all systems that are being integrated by the ESB,
otherwise workarounds must be used in order to implement direct communication
between the integrated systems (thus, neglecting the usage of an ESB).

Use cases
There are a variety of scenarios where messaging systems may be applied, such as
the following:
• Financial services: High rate real-time trade transactions handled between
different systems
• Social networking: Activity streams and event propagation between
different components in a social network
• E-mailing: Sending e-mail notifications or digests periodically to a large
number of users
• Processing large volumes of data upon request, such as image rendering
• Chat services
• Propagation of events throughout a system
• Any type of real-time system integration (system of systems)

As you can see, messaging solutions can be applied to a variety of scenarios that
typically involve a number of systems that must communicate in a timely manner
or perform a large number of time-consuming tasks. Messaging solutions are also
extensively being deployed by Cloud providers in order to provide messaging as a
service for Cloud-based applications.

[6]
Other documents randomly have
different content
must not venture into the depths of reality. Molière would probably
have had a short way with those who cannot laugh at Tartuffe, as
Cervantes would have had a short way with those who cannot laugh
at Don Quixote. There is as much imagination—as much sympathy,
even, perhaps—in the laughter of the great comic writers as in the
tears of the sentimentalist. And Molière’s aim was laughter achieved
through an exaggerated imitation of reality. He was the poet of good
sense, and he felt that he had but to hold up the mirror of good
sense in order that we might see how absurd is every form of
egotism and pretentiousness. He took the side of the simple dignity
of human nature against all the narrowing vices, the anti-social
vices, whether of avarice, licentiousness, self-righteousness or
preciosity. He has written the smiling poetry of our sins. Not that he
is indulgent to them, like Anatole France, whose view of life is
sentimental. Molière’s work was a declaration of war against all
those human beings who are more pleased with themselves than
they ought to be, down to that amazing coterie of literary ladies in
Les Femmes savantes, concerning whose projected academy of taste
one of them announces in almost modern accents:

Nous serons par nos lois les juges des ouvrages;


Par nos lois, prose et vers, tout nous sera soumis;
Nul n’aura de l’esprit hors nous et nos amis;
Nous chercherons partout à trouver à redire,
Et ne verrons que nous qui sache bien écrire.

Molière has been accused of writing an attack on the higher


education of women in Les Femmes savantes. What we see in it to-
day is an immortal picture of those intellectual impostors of the
drawing-room—the not-very-intelligentsia, as they have been wittily
called—who exist in every civilised capital and in every generation.
The vanities of the rival poets, it is true, are caricatured rather
extravagantly, but the caricature is essentially true to life. This is
what men and women are like. At least, this is what they are like
when they are most exclusive and most satisfied with themselves.
Molière knew human nature. That is what makes him so much
greater a comic dramatist than any English dramatist who has
written since Shakespeare.
Molière has been taken to task by many critics since his death.
He has been accused even of writing badly. He has been accused of
padding, incorrectness, and the use of jargon. He has been told that
he should have written none of his plays in verse, but all of them, as
he wrote L’Avare, in prose. All these criticisms are nine-tenths
fatuous. Molière by the use of verse gave comic speech the
exhilaration of a game, as Pope did, and literature that has
exhilarating qualities of this kind has justified its existence, whether
or not it squares with some hard-and-fast theory of poetry. If we
cannot define poetry so as to leave room for Molière and Pope, then
so much the worse for our definition of poetry. As for padding, I
doubt whether any dramatist has ever kept the breath of life in his
speech more continuously than Molière. His dialogue is not a flowing
tap but a running stream. That Molière’s language may be faulty I
will not dispute, as French is an alien and but half-known tongue to
me. He produces his effects, whatever his grammar. He has created
for us a world, delicious even in its insincerities and absurdities—a
world seen through charming, humorous, generous, remorseless
eyes—a world held together by wit—a world in which the sins of
society dance to the ravishing music of the alexandrine.
IV
EDMUND BURKE

Burke, we are told, was known as “the dinner-bell” because the


House of Commons emptied when he rose to speak. This is usually
put down to the uncouthness of his delivery. But, after all, there was
nothing in his delivery to prevent his indictment of Warren Hastings
from so affecting his hearers in places that, as Lord Morley writes,
“every listener, including the great criminal, held his breath in an
agony of horror,” and “women were carried out fainting.” I fancy
Burke’s virtues rather than his vices were at the bottom of his failure
in the House of Commons. He took the imagination of an artist into
politics, and he soared high above the questions of the hour among
eternal principles of human nature in which country gentlemen had
only a very faint interest. Not that he was a theoretical speaker in
the sense of being a doctrinaire. He had no belief in paper Utopias.
His object in politics was not to construct an ideal society out of his
head but to construct an acceptable society out of human beings as
their traditions, their environment, and their needs have moulded
them. He never forgot that actual human beings are the material in
which the politician must work. His constant and passionate sense of
human nature is what puts his speeches far above any others that
have been delivered in English. Even when he spoke or wrote on the
wrong side, he was often right about human nature. Page after page
of his Reflections on the French Revolution is as right about human
nature as it is wrong about its ostensible subject. One might say
with truth that, whatever his ostensible subject may be, Burke’s real
subject is always human nature.
If he was indignant against wrong in America or India or Ireland,
it was not with the indignation of a sentimentalist so much as of a
moralist outraged by the degradation of human nature. He loved
disinterestedness and wisdom in public affairs, and he mourned over
the absence of them as a Shakespeare might have mourned over the
absence of noble characters about whom to write plays. In his great
Speech at Bristol he pilloried that narrow and selfish conception of
freedom according to which freedom consists in the right to
dominate over others. Burke demanded of human nature not an
impossible perfection but at least the first beginnings of
magnanimity. Thus he loathed every form of mean domination,
whether it revealed itself as religious persecution or political
repression. He attacked both the anti-Catholic and the anti-American
would-be despots in the Speech at Bristol, and his comment may
serve for almost any “anti” in any age:

It is but too true that the love, and even the very idea, of
genuine liberty is extremely rare. It is but too true that there
are many whose whole scheme of freedom is made up of
pride, perverseness and insolence. They feel themselves in a
state of thraldom, they imagine that their souls are cooped
and cabined in, unless they have some man, or some body of
men, dependent on their mercy. This desire of having some
one below them descends to those who are the very lowest
of all; and a Protestant cobbler, debased by his poverty, but
exalted by his share of the ruling Church, feels a pride in
knowing it is by his generosity alone that the peer, whose
footman’s instep he measures, is able to keep his chaplain
from a jail. This disposition is the true source of the passion
which many men in very humble life have taken to the
American War. Our subjects in America, our colonies, our
dependants. This lust of party-power is the liberty they
hunger and thirst for; and this syren song of ambition has
charmed ears that one would have thought were never
organised to that sort of music.
All through his life Burke set his face against what may be called
the lusts of human nature. As a Member of Parliament he refused to
curry favour with his constituents by gratifying their baser appetites.
In the farewell speech from which I have quoted, he has left us an
impassioned statement of his position:

No man carries farther than I do the policy of making


government pleasing to the people. But the widest range of
this politic complaisance is confined within the limits of
justice. I would not only consult the interest of the people,
but I would cheerfully gratify their humours. We are all a sort
of children that must be soothed and managed. I think I am
not austere or formal in my nature. I would bear, I would
even myself play part in, any innocent buffooneries to divert
them. But I will never act the tyrant for their amusement. If
they will mix malice in their sports, I shall never consent to
throw them any living, sentient creature whatsoever—no, not
so much as a kitling—to torment.

Burke spent the greater part of his life summoning men to the
discipline of duty and away from anarchic graspings after rights.
George III’s war against America, as well as the French Revolution is
the assertion of a “right,” and Burke’s hatred of the war, as of the
Revolution, arose from his belief that the assertion of “rights,” not
for great public ends, but from ill-tempered obstinacy in clinging to a
theory, was no likely means of increasing the happiness and liberties
of human beings. He once received a letter from a gentleman who
declared that, even if the assertion of her right to tax America meant
the ruin of England, he would nevertheless say “Let her perish!” All
through the American War Burke saw that what prevented peace
was this sort of doctrinaire theory of the rights of England. In 1775
the American Congress appointed a deputation to lay a petition
before the House of Commons. The Cabinet refused to receive an
“illegal” body. Penn brought over an “olive branch of peace” from
Congress in the same year, and again, holding fast to their theory of
the rights of Empire, ministers replied that Congress was an illegal
body. Burke saw the vital thing to decide between England and
America was not some metaphysical point in the disputed question
of rights, but the means by which two groups of human beings could
learn to live in peace and charity in the same world. I do not wish to
suggest that he cared nothing for the rights or wrongs of the
quarrel. He was the impassioned champion of right, in the noble
sense of the word, beyond any other statesman of his time. On the
other hand, he detested the assertion of a right for its own sake—
the politics born of the theory that one has the right (whether one is
a man or a nation) to do what one likes with one’s own. Burke saw
that this is the humour of children quarrelling in the nursery. “The
question with me is,” he said, “not whether you have a right to
render your people miserable, but whether it is not your interest to
make them happy.” He regarded peace as almost an end in itself,
and he besought his fellow-countrymen not to stand upon their
rights at the cost of making peace impossible. “Whether liberty be
advantageous or not,” he told them during the war, “(for I know it is
a fashion to decry the very principle), none will dispute that peace is
a blessing; and peace must in the course of human affairs be
frequently bought by some indulgence of liberty.” Thus we find him
all through the war reminding his fellow-countrymen that the
Americans were human beings—a fact of a kind that is always
forgotten in time of war—and that the Anglo-American problem was
chiefly a problem in human nature. “Nobody shall persuade me,” he
declared, drawing on his knowledge of human nature, “when a
whole people are concerned, that acts of lenity are not means of
conciliation.” Again, when he was told that America was worth
fighting for, his reply was: “Certainly it is, if fighting a people be the
best way of gaining them.” Though opposed to the separation of
America, he was in the end convinced that, if the alternatives were
separation and coercion, England was more likely to gain a separate
America than a bludgeoned America as a friend. Addressing his
former constituents, he said:
I parted with it as with a limb, but as a limb to save the
body; and I would have parted with more if more had been
necessary: anything rather than a fruitless, hopeless,
unnatural civil war. This mode of yielding would, it is said,
give way to independency without a war. I am persuaded
from the nature of things, and from every information, that it
would have had a directly contrary effect. But if it had this
effect, I confess that I should prefer independency without
war to independency with it; and I have so much trust in the
inclinations and prejudices of mankind, and so little in
anything else, that I should expect ten times more benefit to
this kingdom from the affection of America, though under a
separate establishment, than from her perfect submission to
the Crown and Parliament, accompanied with her terror,
disgust and abhorrence. Bodies tied together by so unnatural
a bond of union as mutual hatred are only converted to their
ruin.

There, again, you see the appeal to the “nature of things,” the use of
the imagination instead of blind partisan passion. He himself might
have called this distinguishing quality not imagination so much as a
capacity to take long views. He looked on the taking of long views as
itself a primary virtue in politics. He praised Cromwell and other
statesmen whom he regarded as great bad men because “they had
long views, and sanctified their ambition by aiming at the orderly
rule, and not the destruction of their country.” Who, reading to-day
his speeches on America and India, can question that Burke himself
possessed the genius of the long view, which is only another name
for imagination in politics?
Mr. Murison’s admirable student’s edition of some of the writings
of Burke gives us examples of Burke not only during the American
but during the French period. He has called his book, indeed, not
after the Letter to the Sheriffs of Bristol or the Speech at Bristol, but
after the Letter to a Noble Lord, in which Burke defends himself in
the French period against the Duke of Bedford. Here, as during the
American War, we find him protesting against the introduction of
“metaphysical” disputes about rights into politics. During the
American War he had said, in regard to the question of rights: “I do
not enter into these metaphysical distinctions. I hate the very sound
of them.” Now, during the Revolution, he declared: “Nothing can be
conceived more hard than the heart of a thoroughbred
metaphysician. It comes nearer to the cold malignity of a wicked
spirit than to the frailty and passion of man.” Unfortunately, Burke
himself was something of a “metaphysician” in his attack on the
French Revolution. He wrote against France from prejudice and from
theory, and his eye is continually distracted from the facts of human
nature to a paper political orthodoxy. Even here, however, he did not
forget human nature, and, in so far as the French Revolution was
false to human nature—if the phrase is permissible—Burke has told
the truth in lasting prose.
His greatness as an artist is shown by the fact that he can move
us to silent admiration even when we disagree with him. There is
plenty of dull matter in most of his writings, since much of them is
necessarily occupied with the detail of dead controversies, but there
is a tide of eloquence that continually returns into his sentences and
carries us off our feet. We never get to love him as a man. We do
not know him personally as we know Johnson. He is a voice, a
figure, not one of ourselves. His eloquence is the eloquence of
wisdom, seldom of personal intimacy. He is not a master of tears
and laughter, but, like Milton, seems rather to represent a sort of
impassioned dignity of human nature. But what an imagination he
poured into the public affairs of his time—an imagination to which
his time was all but indifferent until he used his eloquence in support
of (in Lord Morley’s phrase) “the great army of the indolent good,
the people who lead excellent lives and never use their reason.”
Even then, however, the imagination survived, and, hackneyed
though it is by quotation, one never grows weary of coming on that
great passage in which he mourns over the fate of Marie Antoinette
and the passing of the age of chivalry from Europe.
It is now sixteen or seventeen years since I saw the
Queen of France, then the Dauphiness, at Versailles; and
surely never lighted on this orb, which she hardly seemed to
touch, a more delightful vision. I saw her just above the
horizon, decorating and cheering the elevated sphere she just
began to move in; glittering like the morning star, full of life,
and splendour, and joy. Oh, what a revolution! and what a
heart must I have to contemplate without emotion that
elevation and that fall! Little did I dream when she added
titles of veneration to those of enthusiastic, distant, respectful
love, that she should ever be obliged to carry the sharp
antidote against disgrace concealed in that bosom; little did I
dream that I should have lived to see such disasters fallen
upon her in a nation of gallant men, in a nation of men of
honour and of cavaliers. I thought ten thousand swords must
have leaped from their scabbards to avenge even a look that
threatened her with insult. But the age of chivalry is gone.
That of sophisters, economists and calculators has
succeeded; and the glory of Europe is extinguished for ever.
Never, never more, shall we behold that generous loyalty to
rank and sex, that proud submission, that dignified
obedience, that subordination of the heart, which kept alive,
even in servitude itself, the spirit of an exalted freedom. The
unbought grace of life, the cheap defence of nations, the
nurse of manly sentiments and heroic enterprise is gone! It is
gone, that sensibility of principle, that chastity of honour,
which felt a stain like a wound, which inspired courage whilst
it mitigated ferocity, which ennobled whatever it touched, and
under which vice itself lost half its evil by losing all its
grossness.

As we read these sentences we cease to ask ourselves whether


Burke was on the right or the wrong side in the French Revolution.
We are content that a great artist has spoken from the depths of his
soul. He has released the truth that is in him to the eternal
enrichment of the human race.
V
KEATS

1. THE VARIOUS KEATSES


Most men who write in praise of Shakespeare write in praise of
themselves. Shakespeare is their mirror. Respectable middle-aged
professors generally think of him as the respectable middle-aged
man of the Stratford bust. Mr. Frank Harris sees him as Mr. Frank
Harris with a difference. Mr. Charles Whibley imagines him as a
Whibleyesque Tory with a knotted whip ever ready for the back of
democracy. After reading The John Keats Memorial Volume,
consisting of appreciations in prose and verse from all manner of
contributors, great and little, one comes to the conclusion that most
men interpret Keats in the same easy-going way. Thus, Mr. Bernard
Shaw notes that the poet of the Ode to a Nightingale and the Ode
on Melancholy was “a merry soul, a jolly fellow, who could not only
carry his splendid burthen of genius, but swing it round, toss it up
and catch it again, and whistle a tune as he strode along,” and he
discovers in three verses of The Pot of Basil “the immense
indictment of the profiteers and exploiters with which Marx has
shaken capitalistic civilisation to its foundations, even to its
overthrow in Russia.” To Dr. Arthur Lynch, on the other hand, Keats
is primarily a philosopher, whose philosophic principles “account for
his Republicanism as well as for his criticisms of poetry.” Mr. Arthur
Symons takes an opposite view. “John Keats,” he tells us, “at a time
when the phrase had not yet been invented, practised the theory of
art for art’s sake.... Keats had something feminine and twisted in his
mind, made up out of unhealthy nerves ... which it is now the
fashion to call decadent.” To Sir Ian Hamilton (who contributes a
beautiful comment, saved by its passion from the perils of high-
flownness) Keats was the prototype of the heroic youth that
sacrificed itself in the war. Did he not once declare his willingness to
“jump down Etna for any great public good”; and did he not write:

The Patriot shall feel


My stern alarum and unsheath his steel?

And, if we dip into the thousands of other things that have been
written about Keats, including the centenary appreciations, we shall
find this personal emphasis on the part of the critic again and again.
Lord Houghton even did his best to raise Keats a step nearer in
the social scale by associating him with “the upper rank of the
middle class”—an exaggeration, however, which is no more
inaccurate than the common view that Keats was brought up on the
verge of pauperdom. As a matter of fact, Keats’s father was an ostler
who married his employer’s daughter, and his grandfather, the livery
stable keeper of Finsbury Pavement, left a fortune of £13,000. But it
is not only with regard to his birth that attempts to bring Keats into
the fold of respectability are common. His character, and the
character of his genius, are unconsciously doctored to suit the tastes
of those who do not apparently care for Keats as he actually was.
The Keats who thrashed the butcher is more important for them
than the Keats who fell in love with Fanny Brawne. They prefer
canonising Keats to knowing him, and the logical consequence of
their attitude is that the Keats who might have been means more to
them than the Keats who was. I do not deny that a great deal that is
said about Keats on all sides is true: possibly most of it is true. But
much of it is true only as an argument. The manly Keats is the true
answer to the effeminate Keats, as the effeminate Keats is the true
answer to the manly Keats. The Keats who said: “I think I shall be
among the English poets after my death,” and the Keats who was
“snuffed out by an article” similarly answer one another; and the
Keats of The Fall of Hyperion is the perfect critic of the Keats of the
Ode on Indolence, and vice versa. Keats was a score of Keatses. He
was luxurious and ascetic, heroic and self-indulgent, ambitious and
diffident, an artist and a thinker, vulgar and an æsthete, perfect in
phrase and gauche in phrase, melancholy and merry, sensual and
spiritual, a cynic about women and one of the great lovers, a teller
of heart-easing tales and a would-be redeemer. The perfect portrait
of Keats will reveal him in all these contradictory lights, and we shall
never understand Keats if we merely isolate one group of facts, such
as the thrashing of the butcher, or another group, such as that he
thought for a moment of abandoning Hyperion as a result of the
hostile reviews of Endymion. Keats’s life was not that of a planet
beautifully poised as it wheels on its lonely errand. He was a man
torn by conflicting demons—a martyr to poetry and love and,
ultimately, to ideals of truth and goodness.
He bowed before altars that, even when he bowed, he seems to
have known were altars of the lesser gods. Not that he blasphemed
the greater gods in doing so. He believed that the altar at the foot of
the hill was a stage in the poet’s progress to the altar at the summit.
As he grew older, however, his vision of the summit became more
intense, and a greater Muse announced to him:

None can usurp this height


But those to whom the miseries of the world
Are miseries and will not let them rest.

He was exchanging the worship of Apollo for the worship of Zeus


and, like Tolstoy, he seemed to condemn his own past work as a
denial of the genius of true art. Even here, however, Keats was still
tortured by conflicting allegiances, and it is on Apollo, not on Zeus,
he calls in his condemnation of Byron in The Fall of Hyperion:
Apollo! faded! O far-flown Apollo!
Where is thy misty pestilence to creep
Into the dwellings, through the door crannies
Of all mock lyrists, large self-worshippers
And careless Hectorers in proud bad verse?
Though I breathe death with them it will be life
To see them sprawl before me into graves.

But he was Zeus’s child, as he lay dying, and the very epitaph he left
for himself, remembering a phrase in The Maid’s Tragedy of
Beaumont and Fletcher, “Here lies one whose name is writ in water,”
was a last farewell to an Apollo who seemed to have failed him.
The Keats who achieved perfection in literature, however, was
Apollo’s Keats—Apollo’s and Aphrodite’s. His odes, written out of a
genius stirred to its depths for the first time by his passion for Fanny
Brawne—he does not seem to have been subject to love, as most
poets are, in his boyhood—were but the perfect expression of that
idolatry that had stammered in Endymion. Keats in his masterpieces
is still the Prince breaking through the wood to the vision of the
Sleeping Beauty. He has not yet touched her into life. He almost
prefers to remain a spectator, not an awakener. He loves the picture
itself more than the reality, though he guesses all the while at the
reality behind. That, perhaps, is why men do not go to Keats for
healing, as they go to Wordsworth, or for hope, as they go to
Shelley. Keats enriches life rather with a sense of a loveliness for
ever vanishing, and with a dream of what life might be if the
loveliness remained. Regret means more to him than hope:
Who are these coming to the sacrifice?
To what green altar, O mysterious priest,
Lead’st thou that heifer lowing at the skies,
And all her silken flanks with garlands drest?
What little town by river or sea-shore,
Or mountain-built with peaceful citadel,
Is emptied of its folk, this pious morn?
And, little town, thy streets for evermore
Will silent be; and not a soul to tell
Why thou art desolate, can e’er return.

The world at its most beautiful is for Keats a series of dissolving


pictures—of “fair attitudes” that only the artist can make immortal.
His indolence is the indolence of a man under the spell of beautiful
shapes. His energy is the energy of a man who would drain the
whole cup of worship in a beautiful phrase. His æsthetic attitude to
life—as æsthetic in its way as the early Pater’s—appears in that
letter in which he writes:

I go among the Fields and catch a glimpse of a Stoat or a


field-mouse peeping out of the withered grass—the creature
hath a purpose, and its eyes are bright with it. I go amongst
the buildings of a city, and I see a Man hurrying along—to
what? The Creature has a purpose, and his eyes are bright
with it.

In this very letter, no doubt, the disinterested philosopher as well as


the æsthete speaks, but it is Keats’s longing for philosophy, not his
philosophy itself, that touches us most profoundly in his greatest
work. Our knowledge of his sufferings gives his work a background
of
Sorrow more beautiful than Beauty’s self
against which the exquisite images he wrought have a tragic and
spiritual appeal beyond that of any other poet of his kind. The Keats
we love is more than the Keats of the poems—more even than the
Keats of the letters. It is the Keats of these and of the life—that
proud and vehement spirit, that great-hearted traveller in the realms
of gold, caught in circumstances and done to death in the very
temples where he had worshipped.

2. THE ARTIFICER
It is an interesting fact that most of the writers who use words
like artificers have been townsmen. Milton and Gray, Keats and
Lamb, were all Londoners. It is as though to some extent words took
the place of natural scenes in the development of the townsman’s
genius. The town boy finds the Muse in a book rather than by a
stream. He hears her voice first, perhaps, in a beautiful phrase. It
would be ridiculous to speak as though the country-bred poet were
uninfluenced by books or the town-bred poet uninfluenced by bird
and tree, by winds and waters. All I suggest is that in the townsman
the influence of literature is more dominant, and frequently leads to
an excitement over phrases almost more intense than his excitement
over things.
Milton was thus a stylist in a sense in which Shakespeare was
not. Keats was a stylist in a sense in which Shelley was not. Not that
Milton and Keats used speech more felicitously, but they used it
more self-consciously. Theirs, at their greatest, was the magic of art
rather than of nature. They had not, in the same measure as
Shakespeare and Shelley, the freedom of the air—the bird-like flight
or the bird-like song.
The genius of Keats, we know, was founded on the reading of
books. He did not even begin writing till he was nearly eighteen,
when Cowden Clarke lent him the treasures of his library, including
The Faëry Queene. The first of his great poems was written after
reading Chapman’s Homer, and to the end of his life he was inspired
by works of art to a greater degree than any other writer of genius
in the England of his time.
This may help to explain why he was, as Mr. John Bailey has
pointed out, the poet of stillness. Books, pictures, and Grecian urns
are still. They fix life for us in the wonder of a trance, and, if Keats
saw Cortes “silent upon a peak in Darien,” and

grey-haired Saturn, quiet as a stone,


Still as the silence round about his lair;

and figure after figure in the same sculptured stillness, may this not
have been due to the fact that his genius fed so largely on the arts?
Keats, however, was the poet of trance, even apart from his stay
in the trance-world of the artists. One of his characteristic moods
was an ecstatic indolence, like that of a man who has tasted an
enchanted herb. He was a poet, indeed, whose soul escaped in song
as on the drowsy wings of a dream. He may be said to have turned
from the fever of life to the intoxication of poetry. He loved poetry
—“my demon poesy”—as a thing in itself, as, perhaps, no other poet
equally great has done. This was his quest: this was his Paradise. He
prayed, indeed:
That I may die a death
Of luxury, and my young spirit follow
The morning sunbeams to the great Apollo
Like a fresh sacrifice; or, if I can bear
The o’erwhelming sweets, ’twill bring me to the fair
Visions of all places: a bowery nook
Will be elysium—an eternal book
Whence I may copy many a lovely saying
About the leaves and flowers—about the playing
Of nymphs in woods, and fountains; and the shade
Keeping a silence round a sleeping maid.

This was the mood in which he wrote his greatest work. At the
same time Keats was not an unmixed æsthete. He recognised from
the first, as we see in this early poem, “Sleep and Poetry,” that the
true field of poetry is not the joys of the senses, but the whole of
human life:

And can I ever bid these joys farewell?


Yes, I must pass them for a nobler life,
Where I may find the agonies, the strife
Of human hearts.

Modern critics, reading these lines, are tempted to disparage the


work Keats actually accomplished in comparison with the work that
he might have accomplished, had he not died at twenty-five. They
prefer “The Fall of Hyperion,” that he might have written, to “The
Eve of St. Agnes,” the “Nightingale,” and the “Grecian Urn” that he
did write. They love the potential middle-aged Keats more than the
perfect youthful Keats.
This seems to me a perversity, but the criticism has value in
reminding us how rich and deep was the nature that expressed itself
in the work even of the young Keats. Keats was an æsthete, but he
was always something more. He was a man continually stirred by a
divine hunger for things never to be attained by the ecstasies of
youth—for knowledge, for truth, for something that might heal the
sorrows of men. His nature was continually at war with itself. His
being was in tumult, even though his genius found its perfect hour in
stillness.
But it was the tumult of love, not the tumult of noble ideals, that
led to the production of his greatest work. Fanny Brawne, that
beautiful minx in her teens, is denounced for having murdered
Keats; but she certainly did not murder his genius. It was after
meeting her that he wrote the Odes and “The Eve of St. Agnes,” and
“Lamia” and “La Belle Dame Sans Merci.” There has been too much
cursing of Fanny. She may have been the cause of Keats’s greatest
agony, but she was also the cause of his greatest ecstasy. The world
is in Fanny’s debt, as Keats was. It was Fanny’s Keats, in a very real
sense, who wrote the immortal verse that all the world now
honours.

3. FANNY BRAWNE
“My dear Brown,” wrote the dying Keats, with Fanny Brawne in
his thoughts, in almost the last of his surviving letters, “for my sake,
be her advocate for ever.” “You think she has many faults,” he had
written a month earlier, when leaving England; “but, for my sake,
think she has none.” Thus did Keats bequeath the perfect image of
Fanny Brawne to his friend. And the bequest is not only to his friend
but to posterity. We, too, must study her image in the eyes of Keats,
and hang the portrait of the lady who had no faults in at least as
good a position on the wall with those other portraits of the flawed
lady—the minx, the flirt, the siren, the destroyer.
Sir Sidney Colvin, in his noble and monumental biography of
Keats, found no room for this idealised portrait. He was scrupulously
fair to Fanny Brawne as a woman, but he condemned her as the
woman with whom Keats happened to fall in love. To Sir Sidney she
was not Keats’s goddess, but Keats’s demon. Criticising the book on
its first appearance, I pointed out that almost everything that is
immortal in the poetry of Keats was written when he was under the
influence of his passion for Fanny Brawne, and I urged that, had it
not been for the ploughing and harrowing of love, we should
probably never have had the rich harvest of his genius. Sir Sidney
has now added a few pages to his preface, in which he replies to
this criticism, and declares that to write of Fanny Brawne in such a
manner is “to misunderstand Keats’s whole career.” He admits that
“most of Keats’s best work was done after he had met Fanny
Brawne,” but it was done, he insists, “not because of her, but in spite
of her.” “At the hour when his genius was naturally and splendidly
ripening of itself,” he writes, “she brought into his life an element of
distracting unrest, of mingled pleasure and torment, to use his own
words, but of torment far more than of pleasure.... In writing to her
or about her he never for a moment suggests that he owed to her
any of his inspiration as a poet.... In point of fact, from the hour
when he passed under her spell he could never do any long or
sustained work except in absence from her.” Now all this means little
more than that Fanny Brawne made Keats suffer. On that point
everybody is agreed. The only matter in dispute is whether this
suffering was a source of energy or of destruction to Keats’s genius.
Keats has left us in one of his letters his own view of the part
suffering plays in the making of a soul. Scoffing at the conception of
the world as a “vale of tears,” he urges that we should regard it
instead as “the vale of soul-making,” and asks: “Do you not see how
necessary a world of pain and troubles is to school an intelligence
and make it a soul?” Thus, according to his own philosophy, there is
no essential contradiction between a love that harrows and a love
that enriches. As for his never having suggested that he owed any of
his inspiration to his love for Fanny, he may not have done this in so
many words, but he makes it clear enough that she stirred his
nature to the depths for the first time and awakened in him that
fiery energy which is one of the first conditions of genius in poetry.
“I cannot think of you,” he wrote, “without some sort of energy—
though mal à propos. Even as I leave off, it seems to me that a few
more moments’ thought of you would uncrystallise and dissolve me.
I must not give way to it—but turn to my writing again—if I fail I
shall die hard. O my love, your lips are growing sweet again to my
fancy—I must forget them.” Sir Sidney would read this letter as a
confession that love and genius were at enmity in Keats. It seems to
me a much more reasonable view that in the heat of conflict Keats’s
genius became doubly intense, and that, had there been no
struggle, there would have been no triumph. It is not necessary to
believe that Fanny Brawne was the ideal woman for Keats to have
loved: the point is that his love of her was the supreme event in his
life. “I never,” he told her, “felt my mind repose upon anything with
complete and undistracted enjoyment—upon no person but you.” “I
have been astonished,” he wrote in another letter, “that men could
die martyrs for religion—I have shuddered at it. I shudder no more—
I could be martyr’d for my religion—love is my religion—I could die
for that. I could die for you. My creed is love, and you are its only
tenet.” And still earlier he had written: “I have two luxuries to brood
over in my walks—your loveliness and the hour of my death. O, that
I could have possession of them both in the same minute.... I will
imagine you Venus to-night and pray, pray, pray to your star like a
heathen.” It is out of emotional travail such as we find in these
letters that poetry is born. Is it possible to believe that, if Keats had
never fallen in love—and he had never been in love till he met Fanny
—he would have been the great poet we know?
I hold that it is not. Hence I still maintain the truth of the
statement which Sir Sidney Colvin sets out to controvert, that, while
Fanny “may have been the bad fairy of Keats as a man, she was his
good fairy as a poet.”
Keats’s misfortune in love was a personal misfortune, not a
misfortune to his genius. He was too poor to marry, and, in his own
phrase, he “trembled at domestic cares.” He was ill and morbid: he
had longed for the hour of his death before ever he set eyes on
Fanny. Add to this that he was young and sensual and as jealous as
Othello. His own nature had in it all the elements of tragic suffering,
even if Fanny had been as perfect as St. Cecilia. And she was no St.
Cecilia. He had called her “minx” shortly after their first meeting in
the autumn of 1818, and described her as “beautiful and elegant,
graceful, silly, fashionable and strange.” Even then, however, he was
in love with her. “The very first week I knew you,” he told her
afterwards, “I wrote myself your vassal.... If you should ever feel for
man at the first sight what I did for you, I am lost.” It is clear from
this that his heart and his head quarrelled about Fanny. At the same
time, after those first censures, he never spoke critically of her
again, even to his most intimate friends. Some of his friends
evidently disliked Fanny and wished to separate the lovers. He refers
to this in a letter in which he speaks angrily of “these laughers who
do not like you, who envy you for your beauty,” and writes of himself
as “one who, if he never should see you again, would make you the
saint of his memory.” But Keats himself could not be certain that she
was a saint. “My greatest torment since I have known you,” he tells
her, “has been the fear of you being a little inclined to the Cressid.”
He is so jealous that, when he is ill, he tells her that she must not
even go into town alone till he is well again, and says: “If you would
really what is called enjoy yourself at a party—if you can smile in
people’s faces, and wish them to admire you now—you never have
nor ever will love me.” But he adds a postscript: “No, my sweet
Fanny—I am wrong—I do not wish you to be unhappy—and yet I do,
I must while there is so sweet a beauty—my loveliest, my darling!
Good-bye! I kiss you—O the torments!” In a later letter he returns to
his jealousy, and declares: “Hamlet’s heart was full of such misery as
mine is when he said to Ophelia, ‘Go to a nunnery, go, go!’” He tells
this fragile little worldly creature that she should be prepared to
suffer on the rack for him, accuses her of flirting with Brown, and, in
one of the most painful of his letters, cries out:

I appeal to you by the blood of that Christ you believe in:


Do not write to me if you have done anything this month
which it would have pained me to have seen. You may have
altered—if you have not—if you still believe in dancing rooms
and other societies as I have seen you—I do not want to live
—if you have done so I wish the coming night may be my
last. I cannot live without you, and not only you, but chaste
you, virtuous you.... Be serious! Love is not a plaything—and
again do not write unless you can do it with a crystal
conscience.

Poor Keats! Poor Fanny! That Fanny loved Keats is obvious. In


this at least she showed herself unworldly. She cannot have been
dazzled by his fame, for at that time he was to all appearance
merely a minor poet who had been laughed at. He was of humble
birth, and he had not even the prospect of being able to earn a
living. Add to this that he was an all but chronic invalid. Her love
must, in the circumstances, have been a very real and unselfish
affair, and there is no evidence to suggest that, for all her taste for
dancing and for going into town, it was fickle. Keats asked too much
of her. He wished to enslave her as she had enslaved him. He knew
in his saner moments that he was unfair to her. “At times,” he wrote,
“I feel bitterly sorry that ever I made you unhappy.” There was
unhappiness on both sides—the unhappiness of an engagement that
could come to nothing. “There are,” as Keats mournfully wrote,
“impossibilities in the world.” It was Fate, not Fanny, that wrecked
the life of Keats. “My dear Brown,” he wrote near the end, “I should
have had her when I was in health, and I should have remained
well.” That is not the comment a man makes on a woman whom he
regards as his destroying angel. Nor is it a destroying angel that
Keats pictures when he writes to Fanny: “You are always new. The
last of your kisses was ever the sweetest; the last smile the
brightest; the last movement the gracefullest. When you passed my
window home yesterday, I was filled with as much admiration as if I
had then seen you for the first time.” Love such as this is not the
enemy of poetry. Without it there would be no poetry but that of
patriots, saints and hermits. A biography of Keats should not be a
biography without a heroine. That would be Hamlet without Ophelia.
Sir Sidney Colvin’s is a masterly life which is likely to take a
permanent place in English biographical literature. But it has one
flaw. Sir Sidney did not see how vital a clue Keats left us to the
interpretation of his life and genius in that last despairing appeal:
“My dear Brown, for my sake be her advocate for ever.”
VI
CHARLES LAMB

Charles Lamb was a small, flat-footed man whose eyes were of


different colours and who stammered. He nevertheless leaves on
many of his readers the impression of personal beauty. De Quincey
has told us that in the repose of sleep Lamb’s face “assumed an
expression almost seraphic, from its intellectual beauty of outline, its
childlike simplicity, and its benignity.” He added that the eyes
“disturbed the unity of effect in Lamb’s waking face,” and gave a
feeling of restlessness, “shifting, like Northern lights, through every
mode of combination with fantastic playfulness.” This description, I
think, suggests something of the quality of Lamb’s charm. There are
in his best work depths of repose under a restless and prankish
surface. He is at once the most restful and the most playful of
essayists. Carlyle, whose soul could not find rest in such quietistic
virtue as Lamb’s, noticed only the playfulness and was disgusted by
it. “Charles Lamb,” he declared, “I do verily believe to be in some
considerable degree insane. A more pitiful, rickety, gasping,
staggering, stammering tomfool I do not know. He is witty by
denying truisms and abjuring good manners.” He wrote this in his
Diary in 1831 after paying a visit to Lamb at Enfield. “Poor Lamb!”
he concluded. “Poor England, when such a despicable abortion is
named genius! He said: ‘There are just two things I regret in
England’s history: first, that Guy Fawkes’ plot did not take effect
(there would have been so glorious an explosion); second, that the
Royalists did not hang Milton (then we might have laughed at them),
etc., etc.’ Armer Teufel!”
Carlyle would have been astonished if he had foreseen that it
would be he and not Lamb who would be the “poor devil” in the
eyes of posterity. Lamb is a tragically lovable figure, but Carlyle is a
tragically pitiable figure. Lamb, indeed, is in danger of being
pedestalled among the saints of literature. He had most of the
virtues that a man can have without his virtue becoming a reproach
to his fellows. He had most of the vices that a man can have without
ceasing to be virtuous. He had enthusiasm that made him at home
among the poets, and prejudices that made him at home among
common men. His prejudices, however, were for the most part
humorous, as when, speaking of L. E. L., he said: “If she belonged
to me I would lock her up and feed her on bread and water till she
left off writing poetry. A female poet, a female author of any kind,
ranks below an actress, I think.” He also denounced clever women
as “impudent, forward, unfeminine, and unhealthy in their minds.” At
the same time, the woman he loved most on earth and devoted his
life to was the “female author” with whom he collaborated in the
Tales from Shakespeare. But probably there did exist somewhere in
his nature the seeds of most of those prejudices dear to the
common Englishman—prejudices against Scotsmen, Jews, and clever
women, against such writers as Voltaire and Shelley, and in favour of
eating, drinking and tobacco. He held some of his prejudices
comically, and some in sober earnest, but at least he had enough of
them mixed up in his composition to keep him in touch with ordinary
people. That is one of the first necessities of a writer—especially of a
dramatist, novelist or essayist, whose subject-matter is human
nature. A great writer may be indifferent to the philosophy of the
hour or even to some extent to the politics of the hour, but he
cannot safely be indifferent to such matters as his neighbour’s love
of boiled ham or his fondness for a game of cards. Lamb
sympathised with all the human appetites that will bear talking
about. Many noble authors are hosts who talk gloriously, but never
invite us to dinner or even ring for the decanter. Lamb remembers
that a party should be a party.
It is not enough, however, that a writer should be friends with
our appetites. Lamb would never have become the most beloved of
English essayists if he had told us only such things as that Coleridge
“holds that a man cannot have a pure mind who refuses apple
dumplings,” or that he himself, though having lost his taste for “the
whole vegetable tribe,” sticks, nevertheless, to asparagus, “which
still seems to inspire gentle thoughts.” He was human elsewhere
than at the table or beside a bottle. His kindness was higher than
gastric. His indulgences seem but a modest disguise for his virtues.
His life was a life of industrious self-sacrifice. “I am wedded,
Coleridge,” he cried, after the murder of his mother, “to the fortunes
of my sister and my poor old father”; and his life with his sister
affords one of the supreme examples of fidelity in literary biography.
Lamb is eminently the essayist of the affections. The best of his
essays are made up of affectionate memories. He seems to steep his
very words in some dye of memory and affection that no other
writer has discovered. He is one of those rare sentimentalists who
speak out of the heart. He has but to write, “Do you remember?” as
in Old China, and our breasts feel a pang like a home-sick child
thinking of the happiness of a distant fireside and a smiling mother
that it will see no more. Lamb’s work is full of this sense of
separation. He is the painter of “the old familiar faces.” He conjures
up a Utopia of the past, in which aunts were kind and Coleridge, the
“inspired charity-boy,” was his friend, and every neighbour was a
figure as queer as a witch in a fairy-tale. “All, all are gone”—that is
his theme.
He is the poet of town-bred boyhood. He is a true lover of
antiquity, but antiquity means to him, not merely such things as
Oxford and a library of old books: it means a small boy sitting in the
gallery of the theatre, and the clerks (mostly bachelors) in the shut-
up South-Sea House, and the dead pedagogue with uplifted rod in
Christ’s Hospital, of whom he wrote: “Poor J. B.! May all his faults be
forgiven; and may he be wafted to bliss by little cherub boys, all
head and wings, with no bottoms to reproach his sublunary
infirmities.” His essays are a jesting elegy on all that venerable and
ruined world. He is at once Hamlet and Yorick in his melancholy and
his mirth. He has obeyed the injunction: “Let us all praise famous
men,” but he has interpreted it in terms of the men who were
famous in his own small circle when he was a boy and a poor clerk.
Lamb not only made all that world of school and holiday and
office a part of antiquity; he also made himself a part of antiquity.
He is himself his completest character—the only character, indeed,
whom he did not paint in miniature. We know him, as a result of his
letters, his essays, and the anecdotes of his friends, more intimately
even than we know Dr. Johnson. He has confessed everything
except his goodness, and, indeed, did his reputation some harm with
his contemporaries by being so public with his shortcomings. He was
the enemy of dull priggishness, and would even set up as a buffoon
in contrast. He earned the reputation of a drunkard, not entirely
deserved, partly by his Confessions of a Drunkard, but partly by his
habit of bursting into singing “Diddle, diddle, dumpling,” under the
influence of liquor, whatever the company. His life, however, was a
long, half-comic battle against those three friendly enemies of man—
liquor, snuff and tobacco. His path was strewn with good resolutions.
“This very night,” he wrote on one occasion, “I am going to leave off
tobacco! Surely there must be some other world in which this
unconquerable purpose shall be realised.” The perfect anecdote of
Lamb’s vices is surely that which Hone tells of his abandonment of
snuff:

One summer’s evening I was walking on Hampstead


Heath with Charles Lamb, and we talked ourselves into a
philosophic contempt of our slavery to the habit of snuff-
taking, and with the firm resolution of never again taking a
single pinch, we threw our snuff-boxes away from the hill on
which we stood, far among the furze and the brambles below,
and went home in triumph. I began to be very miserable, and
was wretched all night. In the morning I was walking on the
same hill. I saw Charles Lamb below, searching among the
bushes. He looked up laughing, and saying, “What, you are
come to look for your snuff-box too!” “Oh, no,” said I, taking
a pinch out of a paper in my waistcoat pocket, “I went for a
halfpennyworth to the first shop that was open.”

Lamb’s life is an epic of such things as this, and Mr. Lucas is its
rhapsodist. He has written an anthological biography that will have a
permanent place on the shelves beside the works of Lamb himself.
VII
BYRON ONCE MORE

It will always be easy to take an interest in Byron because he was


not only a scamp but a hero—or, alternatively, because he was not
only a hero but a scamp. As a hero he can be taken seriously: as a
villain he can be taken comically. His letters, like Don Juan, reveal
him at their best chiefly on the comic side. He was not only a wit,
but an audacious wit, and there is a kind of audacity that amuses us,
whether in a guttersnipe or in a peer. Byron was a guttersnipe in
scarlet and ermine. He enjoyed all the more playing the part of a
guttersnipe, because he could play it in a peer’s robe. He was
obviously the sort of person who, if brought up in the gutter, would
be sent to a reformatory. Imagine a reformatory boy, unreformed
and possessed of genius, loosed on respectable society, and you will
have a picture of Byron. Not that Byron did not share the point of
view of respectable society on the most important matters. He had
no sympathy with the heresies of Shelley, whom he thought “crazy
against religion and morality.” He did not want a new morality, as
Shelley did: he was quite content with the old morality and the old
immorality. He never could have run away with a woman on
principle. Love with him was not a principle, but an appetite. He was
a glutton who did not know where to stop. He himself never
pretended that it was the desire of the moth for the star that was
the cause of his troubles. He was an orthodox materialist, as we may
gather from one of his unusually frank letters to Lady Melbourne, a
lady in her sixties, to whom he ran with the tale of every fresh
amour, like a newsboy with the stop-press edition of an evening
paper. We find him at the age of twenty-five or so writing to explain
that he was sure to die fairly young. “I began very early and very
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like