http://git-wip-us.apache.org/repos/asf/qpid-site/blob/0e1f0cc4/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability-OverviewOfHA.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability-OverviewOfHA.html b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability-OverviewOfHA.html new file mode 100644 index 0000000..822db58 --- /dev/null +++ b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability-OverviewOfHA.html @@ -0,0 +1,168 @@ + + + + + 10.2. High Availability Overview - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

10.2. High Availability Overview

The Broker provides a HA implementation offering an Active/Passive mode of operation. + When using HA, many instances of the Broker work together to form an high availability group of two or more nodes.

The remainder of this section now talks about the specifics of how HA is achieved in terms + of the concepts introduced earlier in this + book.

The Virtualhost is the unit of + replication. This means that any durable queues, exchanges, and bindings + belonging to that virtualhost, any persistent messages contained within + the queues and any attribute settings applied to the virtualhost itself are automatically + replicated to all nodes within the group.[11]

It is the Virtualhost Nodes + (from different Broker instances) that join together to form a group. The virtualhost nodes + collectively to coordinate the group: they organise replication between the master and + replicas and conduct elections to determine who becomes the new master in the event of the old + failing.

When a virtualhost node is in the master role, the virtualhost + beneath it is available for messaging work. Any write operations sent to the virtualhost are + automatically replicated to all other nodes in group.

When a virtualhost node is in the replica role, the virtualhost + beneath it is always unavailable for message work. Any attempted connections to a virtualhost + in this state are automatically turned away, allowing a messaging client to discover where the + master currently resides. When in replica role, the node sole responsibility is to consume a + replication stream in order that it remains up to date with the master.

Messaging clients discover the active virtualhost.This can be achieved using a static + technique (for instance, a failover url (a feature of the Apache Qpid JMS and Apache Qpid JMS AMQP 0-x clients), + or a dynamic one utilising some kind of proxy or virtual IP (VIP).

The figure that follows illustrates a group formed of three virtualhost nodes from three + separate Broker instances. A client is connected to the virtualhost node that is in the master + role. The two virtualhost nodes weather1 and weather3 + are replicas and are receiving a stream of updates.

Figure 10.1. 3-node group deployed across three Brokers.

Diagram showing a 3 node group deployed across three Brokers

Currently, the only virtualhost/virtualhost node type offering HA is BDB HA. Internally, + this leverages the HA capabilities of the Berkeley DB JE edition.

Note

The HA solution from the Apache Qpid Broker-J is incompatible with the HA solution offered by the CPP + Broker. It is not possible to co-locate Qpid Broker-J and CPP Brokers within the same group.



[11] Transient messages and messages on non-durable queues are not replicated.

+ +
+ + + + +
+
+
+ + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/0e1f0cc4/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability-Reset-Group-Infomational.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability-Reset-Group-Infomational.html b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability-Reset-Group-Infomational.html new file mode 100644 index 0000000..d35bf09 --- /dev/null +++ b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability-Reset-Group-Infomational.html @@ -0,0 +1,151 @@ + + + + + 10.11. Reset Group Information - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

10.11. Reset Group Information

BDB JE internally stores details of the group within its database. There are some + circumstances when resetting this information is useful.

  • Copying data between environments (e.g. production to UAT)

  • Some disaster recovery situations where a group must be recreated on new + hardware

This is not an normal operation and is not usually required

The following command replaces the group table contained within the JE logs files with the + provided information.

Example 10.1. Resetting of replication group with DbResetRepGroup

java -cp je-7.4.5.jar com.sleepycat.je.rep.util.DbResetRepGroup -h path/to/jelogfiles
-groupName newgroupname -nodeName newnodename -nodeHostPort newhostname:5000


The modified log files can then by copied into + ${QPID_WORK}/<nodename>/config directory of a target Broker. Then + start the Broker, and add a BDB HA Virtualhost node specify the same group name, node name and + node address. You will then have a group with a single node, ready to start re-adding + additional nodes as described above.

+ +
+ + + + +
+
+
+ + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/0e1f0cc4/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability-Security.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability-Security.html b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability-Security.html new file mode 100644 index 0000000..fb0dfeb --- /dev/null +++ b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability-Security.html @@ -0,0 +1,146 @@ + + + + + 10.9. Security - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

10.9. Security

The replication stream between the master and the replicas is insecure and can be + intercepted by anyone having access to the replication network.

In order to reduce the security risks the entire HA group is recommended to run in a + separate network protected from general access and/or utilise SSH-tunnels/IPsec.

+ +
+ + + + +
+
+
+ + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/0e1f0cc4/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability.html b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability.html new file mode 100644 index 0000000..11db318 --- /dev/null +++ b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-High-Availability.html @@ -0,0 +1,153 @@ + + + + + Chapter 10. High Availability - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

Chapter 10. High Availability

10.1. General Introduction

The term High Availability (HA) usually refers to having a number of instances of a + service such as a Message Broker available so that should a service unexpectedly fail, or + requires to be shutdown for maintenance, users may quickly connect to another instance and + continue their work with minimal interruption. HA is one way to make a overall system more + resilient by eliminating a single point of failure from a system.

HA offerings are usually categorised as Active/Active or + Active/Passive. An Active/Active system is one where all + nodes within the group are usually available for use by clients all of the time. In an + Active/Passive system, one only node within the group is available for use by clients at any + one time, whilst the others are in some kind of standby state, awaiting to quickly step-in in + the event the active node becomes unavailable.

+ +
+ + + + +
+
+
+ + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/0e1f0cc4/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Configuration-Properties.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Configuration-Properties.html b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Configuration-Properties.html new file mode 100644 index 0000000..91d5a43 --- /dev/null +++ b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Configuration-Properties.html @@ -0,0 +1,167 @@ + + + + + 5.6. Customising Configuration using Configuration Properties - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

5.6. Customising Configuration using Configuration Properties

It is possible for 'Initial Configuration' (and Configuration Store) files to contain + ${properties} that can be resolved to String values at startup, allowing a degree of + customisation using a fixed file. Configuration Property values can be set either via + Java System Properties, or by specifying ConfigurationProperties on the broker command + line. If both are defined, System Property values take precedence.

The broker has the following set of core configuration properties, with the indicated + default values if not otherwise configured by the user:

Table 5.1. Base Configuration Properties

Name Description Value
qpid.amqp_port Port number used for the brokers default AMQP messaging port "5672"
qpid.http_port Port number used for the brokers default HTTP management port "8080"
qpid.home_dir Location of the broker installation directory, which contains + the 'lib' directory and the 'etc' directory often used to store + files such as group and ACL files. Defaults to the value set into the QPID_HOME system property if + it is set, or remains unset otherwise unless configured by the user. +
qpid.work_dir Location of the broker working directory, which might contain + the persistent message store and broker configuration store files. Defaults to the value set into the QPID_WORK system property if + it is set, or the 'work' subdirectory of the JVMs current working + directory.


+

Use of these core properties can be seen in the default 'Initial Configuration' example.

Configuration Properties can be set on the command line using the + -prop (or --configuration-property) + command line argument:

+$ ./qpid-server -prop "qpid.amqp_port=10000" -prop "qpid.http_port=10001"
+        

In the example above, property used to set the port number of the default AMQP port + is specified with the value 10000, overriding the default value of 5672, and similarly + the value 10001 is used to override the default HTTP port number of 8080. When using the + 'Initial Configuration' to initialise a new Configuration Store (either at first broker + startup, when requesting to overwrite the configuration store) these new values will be used for the + port numbers instead.

NOTE: When running the broker on Windows and starting it via the qpid-server.bat + file, the "name=value" argument MUST be quoted.

+ +
+ + + + +
+
+
+ + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/0e1f0cc4/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Create-Initial-Config.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Create-Initial-Config.html b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Create-Initial-Config.html new file mode 100644 index 0000000..0a63182 --- /dev/null +++ b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Create-Initial-Config.html @@ -0,0 +1,159 @@ + + + + + 5.4. Creating an 'Initial Configuration' JSON File - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

5.4. Creating an 'Initial Configuration' JSON File

It is possible to have the broker output its default internal 'Initial Configuration' + file to disk using the command line argument -cic (or + --create-initial-config). If the option is used without + providing a path, a file called initial-config.json will be created + in the current directory, or alternatively the file can be created at a specified + location:

+$ ./qpid-server -cic ./initial-config.json
+        

The 'Initial Configuration' JSON file shares a common format with the brokers JSON + Configuration Store implementation, so it is possible to use a Broker's Configuration + Store output as an initial configuration. Typically 'Initial Configuration' files would + not to contain IDs for the configured entities, so that IDs will be generated when the + configuration store is initialised and prevent use of the same IDs across multiple + brokers, however it may prove useful to include IDs if using the Memory Configuration Store Type.

It can be useful to use Configuration + Properties within 'Initial Configuration' files to allow a degree of + customisation with an otherwise fixed file.

For an example file, see Section 5.7, “Example of JSON 'Initial Configuration'” +

+ +
+ + + + +
+
+
+ + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/0e1f0cc4/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Example.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Example.html b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Example.html new file mode 100644 index 0000000..0b6fdcc --- /dev/null +++ b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Example.html @@ -0,0 +1,243 @@ + + + + + 5.7. Example of JSON 'Initial Configuration' - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

5.7. Example of JSON 'Initial Configuration'

An example of the default 'Initial Configuration' JSON file the broker uses is + provided below:

Example 5.1. JSON 'Initial configuration' File

+{
+  "name": "${broker.name}",
+  "modelVersion": "7.0",
+  "authenticationproviders" : [ {
+    "name" : "passwordFile",
+    "type" : "PlainPasswordFile",
+    "path" : "${qpid.home_dir}${file.separator}etc${file.separator}passwd"
+  } ],
+    "brokerloggers" : [ {
+    "name" : "logfile",
+    "type" : "File",
+    "fileName" : "${qpid.work_dir}${file.separator}log${file.separator}qpid.log",
+    "brokerloginclusionrules" : [ {
+      "name" : "Root",
+      "type" : "NameAndLevel",
+      "level" : "WARN",
+      "loggerName" : "ROOT"
+    }, {
+      "name" : "Qpid",
+      "type" : "NameAndLevel",
+      "level" : "INFO",
+      "loggerName" : "org.apache.qpid.*"
+    }, {
+      "name" : "Operational",
+      "type" : "NameAndLevel",
+      "level" : "INFO",
+      "loggerName" : "qpid.message.*"
+    }, {
+      "name" : "Statistics",
+      "type" : "NameAndLevel",
+      "level" : "INFO",
+      "loggerName" : "qpid.statistics.*"
+    } ]
+  }, {
+    "name" : "memory",
+    "type" : "Memory",
+    "brokerloginclusionrules" : [ {
+      "name" : "Root",
+      "type" : "NameAndLevel",
+      "level" : "WARN",
+      "loggerName" : "ROOT"
+    }, {
+      "name" : "Qpid",
+      "type" : "NameAndLevel",
+      "level" : "INFO",
+      "loggerName" : "org.apache.qpid.*"
+    }, {
+      "name" : "Operational",
+      "type" : "NameAndLevel",
+      "level" : "INFO",
+      "loggerName" : "qpid.message.*"
+    }, {
+      "name" : "Statistics",
+      "type" : "NameAndLevel",
+      "level" : "INFO",
+      "loggerName" : "qpid.statistics.*"
+    } ]
+  } ],
+  "ports" : [  {
+    "name" : "AMQP",
+    "port" : "${qpid.amqp_port}",
+    "authenticationProvider" : "passwordFile",
+    "virtualhostaliases" : [ {
+       "name" : "nameAlias",
+       "type" : "nameAlias"
+    }, {
+        "name" : "defaultAlias",
+        "type" : "defaultAlias"
+    }, {
+        "name" : "hostnameAlias",
+        "type" : "hostnameAlias"
+    } ]
+  }, {
+    "name" : "HTTP",
+    "port" : "${qpid.http_port}",
+    "authenticationProvider" : "passwordFile",
+    "protocols" : [ "HTTP" ]
+  }],
+  "virtualhostnodes" : [ {
+    "name" : "default",
+    "type" : "JSON",
+    "defaultVirtualHostNode" : "true",
+    "virtualHostInitialConfiguration" : "\\${qpid.initial_config_virtualhost_config}"
+  } ],
+  "plugins" : [ {
+    "type" : "MANAGEMENT-HTTP",
+    "name" : "httpManagement"
+  } ]
+}
+

In the configuration above the following entries are stored:

  • Authentication Provider of type + PlainPasswordFile with name "passwordFile". +

  • Two Port entries: "AMQP", "HTTP" +

  • Virtualhost Node called default. On initial startup, it + virtualHostInitialConfiguration will cause a virtualhost to be created + with the same name. The configuration will be stored in a + JSON configuration store, the message data will + be stored in a DERBY message store.

  • One management plugin: "httpManagement" of type "MANAGEMENT-HTTP".

  • Broker attributes are stored as a root entry.

+


+ +
+ + + + +
+
+
+ + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/0e1f0cc4/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Initial-Config-Location.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Initial-Config-Location.html b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Initial-Config-Location.html new file mode 100644 index 0000000..dedc5e5 --- /dev/null +++ b/content/releases/qpid-broker-j-7.0.0/book/Java-Broker-Initial-Configuration-Initial-Config-Location.html @@ -0,0 +1,154 @@ + + + + + 5.3. 'Initial Configuration' Location - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

5.3. 'Initial Configuration' Location

The 'Initial Configuration' JSON file is used when initialising new broker + configuration stores. The broker will default to using an internal file within its jar + unless otherwise instructed.

The command line argument -icp (or + --initial-config-path) can be used to override the brokers + internal file and supply a user-created + one:

+$ ./qpid-server -icp ./my-initial-configuration.json
+        

If a Configuration Store already exists at the current store location then the + current 'Initial Configuration' will be ignored unless otherwise requested to overwrite the configuration + store +

+ +
+ + + + +
+
+
+ + --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org