http://git-wip-us.apache.org/repos/asf/qpid-site/blob/dc514b74/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-CommandLine.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-CommandLine.html b/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-CommandLine.html new file mode 100644 index 0000000..4ce5330 --- /dev/null +++ b/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-CommandLine.html @@ -0,0 +1,206 @@ + + + + + 3.5. Using the command line - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

3.5. Using the command line

The Broker understands a number of command line options which may be used to customise the configuration.

+ For additional details about the broker configuration and related command line arguments see + Chapter 5, Initial Configuration. + The broker is fully configurable via its Web Management Console, for details of this see + Section 6.2, “Web Management Console”. +

To see usage information for all command line options, use the --help option

bin/qpid-server --help
usage: Qpid [-cic <path>] [-h] [-icp <path>] [-mm] [-mmhttp <port>]
+       [-mmpass <password>] [-mmqv] [-os]
+       [-prop <name=value>] [-props <path>] [-sp <path>] [-st <type>] [-v]
+ -cic,--create-initial-config <path>                  create a copy of the
+                                                      initial config file,
+                                                      either to an
+                                                      optionally specified
+                                                      file path, or as
+                                                      initial-config.json
+                                                      in the current
+                                                      directory
+ -h,--help                                            print this message
+ -icp,--initial-config-path <path>                    set the location of
+                                                      initial JSON config
+                                                      to use when
+                                                      creating/overwriting
+                                                      a broker
+                                                      configuration store
+ -mm,--management-mode                                start broker in
+                                                      management mode,
+                                                      disabling the AMQP
+                                                      ports
+ -mmhttp,--management-mode-http-port <port>           override http
+                                                      management port in
+                                                      management mode
+ -mmpass,--management-mode-password <password>        Set the password for
+                                                      the management mode
+                                                      user mm_admin
+ -mmqv,--management-mode-quiesce-virtualhosts         make virtualhosts
+                                                      stay in the quiesced
+                                                      state during
+                                                      management mode.
+ -os,--overwrite-store                                overwrite the broker
+                                                      configuration store
+                                                      with the current
+                                                      initial
+                                                      configuration
+ -prop,--config-property <name=value>                 set a configuration
+                                                      property to use when
+                                                      resolving variables
+                                                      in the broker
+                                                      configuration store,
+                                                      with format
+                                                      "name=value"
+ -props,--system-properties-file <path>               set the location of
+                                                      initial properties
+                                                      file to set
+                                                      otherwise unset
+                                                      system properties
+ -sp,--store-path <path>                              use given
+                                                      configuration store
+                                                      location
+ -st,--store-type <type>                              use given broker
+                                                      configuration store
+                                                      type
+ -v,--version                                         print the version
+                                                      information and exit
+
+ +
+ + + + +
+
+
+ + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/dc514b74/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-Logging.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-Logging.html b/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-Logging.html new file mode 100644 index 0000000..09ed33e --- /dev/null +++ b/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-Logging.html @@ -0,0 +1,147 @@ + + + + + 3.4. Log file - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

3.4. Log file

The Broker writes a log file to record both details of its normal operation and any exceptional + conditions. By default the log file is written within the log subdirectory beneath the work directory + - $QPID_WORK/log/qpid.log (UNIX) and + %QPID_WORK%\log\qpid.log (Windows).

For details of how to control the logging, see Section 9.1, “Logging”

+ +
+ + + + +
+
+
+ + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/dc514b74/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-Starting-Stopping-Unix.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-Starting-Stopping-Unix.html b/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-Starting-Stopping-Unix.html new file mode 100644 index 0000000..257e83b --- /dev/null +++ b/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-Starting-Stopping-Unix.html @@ -0,0 +1,156 @@ + + + + + 3.3. Starting/Stopping the broker on Unix - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

3.3. Starting/Stopping the broker on Unix

Firstly change to the installation directory used during the installation + and ensure that the QPID_WORK environment variable is set.

Now use the qpid-server script to start the server:

bin/qpid-server

Output similar to the following will be seen:

[Broker] BRK-1006 : Using configuration : /var/qpidwork/config.json
+[Broker] BRK-1001 : Startup : Version: 6.1.6 Build: exported
+[Broker] BRK-1010 : Platform : JVM : Oracle Corporation version: 1.7.0_79-b15 OS : Mac OS X version: 10.10.5 arch: x86_64 cores: 4
+[Broker] BRK-1011 : Maximum Memory : Heap : 518,979,584 bytes Direct : 1,610,612,736 bytes
+[Broker] BRK-1002 : Starting : Listening on TCP port 5672
+[Broker] MNG-1001 : Web Management Startup
+[Broker] MNG-1002 : Starting : HTTP : Listening on port 8080
+[Broker] MNG-1004 : Web Management Ready
+[Broker] BRK-1004 : Qpid Broker Ready

The BRK-1004 message confirms that the Broker is ready for work. The MNG-1002 and BRK-1002 confirm the ports on + which the Broker is listening (for HTTP management and AMQP respectively).

To stop the Broker, use Control-C from the controlling shell, use the + bin/qpid.stop script, use kill -TERM <pid>, or + the REST operation broker/shutdown.

+ +
+ + + + +
+
+
+ + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/dc514b74/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-Starting-Stopping-Windows.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-Starting-Stopping-Windows.html b/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-Starting-Stopping-Windows.html new file mode 100644 index 0000000..9aea781 --- /dev/null +++ b/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started-Starting-Stopping-Windows.html @@ -0,0 +1,156 @@ + + + + + 3.2. Starting/Stopping the broker on Windows - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

3.2. Starting/Stopping the broker on Windows

Firstly change to the installation directory used during the installation + and ensure that the QPID_WORK environment variable is set.

Now use the qpid-server.bat to start the server

bin\qpid-server.bat

Output similar to the following will be seen:

[Broker] BRK-1006 : Using configuration : C:\qpidwork\config.json
+[Broker] BRK-1001 : Startup : Version: 6.1.6 Build: 1478262
+[Broker] BRK-1010 : Platform : JVM : Oracle Corporation version: 1.7.0_79-b15 OS : Windows 7 version: 6.1 arch: x86 cores: 4
+[Broker] BRK-1011 : Maximum Memory : Heap : 518,979,584 bytes Direct : 1,610,612,736 bytes
+[Broker] BRK-1002 : Starting : Listening on TCP port 5672
+[Broker] MNG-1001 : Web Management Startup
+[Broker] MNG-1002 : Starting : HTTP : Listening on port 8080
+[Broker] MNG-1004 : Web Management Ready
+[Broker] BRK-1004 : Qpid Broker Ready

The BRK-1004 message confirms that the Broker is ready for work. The MNG-1002 and BRK-1002 confirm the ports on + which the Broker is listening (for HTTP management and AMQP respectively).

To stop the Broker, use Control-C from the controlling command prompt or + REST operation broker/shutdown. +

+ +
+ + + + +
+
+
+ + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/dc514b74/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started.html b/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started.html new file mode 100644 index 0000000..2201828 --- /dev/null +++ b/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-Getting-Started.html @@ -0,0 +1,151 @@ + + + + + Chapter 3. Getting Started - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

Chapter 3. Getting Started

3.1. Introduction

+ This section describes how to start and stop the Broker, and outlines the various command line options. +

+ For additional details about the broker configuration store and related command line arguments see + Chapter 5, Initial Configuration. + The broker is fully configurable via its Web Management Console, for details of this see + Section 6.2, “Web Management Console”. +

+ +
+ + + + +
+
+
+ + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/dc514b74/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-High-Availability-Backup.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-High-Availability-Backup.html b/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-High-Availability-Backup.html new file mode 100644 index 0000000..a8abd3c --- /dev/null +++ b/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-High-Availability-Backup.html @@ -0,0 +1,145 @@ + + + + + 10.10. Backups - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

10.10. Backups

It is recommend to use the hot backup script to periodically backup every node in the + group. Section 11.2.2, “BDB-HA”.

+ +
+ + + + +
+
+
+ + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/dc514b74/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-High-Availability-Behaviour.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-High-Availability-Behaviour.html b/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-High-Availability-Behaviour.html new file mode 100644 index 0000000..abf407e --- /dev/null +++ b/content/releases/qpid-java-6.1.6/java-broker/book/Java-Broker-High-Availability-Behaviour.html @@ -0,0 +1,220 @@ + + + + + 10.4. Behaviour of the Group - Apache Qpid™ + + + + + + + + + + + + + +
+
+ Menu + + Search + + +
+ + + + + +
+ + +
+

10.4. Behaviour of the Group

This section first describes the behaviour of the group in its default configuration. It + then goes on to talk about the various controls that are available to override it. It + describes the controls available that affect the durability of transactions and + the data consistency between the master and replicas and thus make trade offs between + performance and reliability.

10.4.1. Default Behaviour

Let's first look at the behaviour of a group in default configuration.

In the default configuration, for any messaging work to be done, there must be at least + quorum nodes present. This means for example, in a three node group, + this means there must be at least two nodes available.

When a messaging client sends a transaction, it can be assured that, before the control + returns back to his application after the commit call that the following is true:

  • At the master, the transaction is written to disk and OS level caches + are flushed meaning the data is on the storage device.

  • At least quorum minus 1 replicas, acknowledge the receipt of + transaction. The replicas will write the data to the storage device + sometime later.

If there were to be a master failure immediately after the transaction was committed, + the transaction would be held by at least quorum minus one replicas. For example, if we had + a group of three, then we would be assured that at least one replica held the + transaction.

In the event of a master failure, if quorum nodes remain, those nodes hold an election. + The nodes will elect master the node with the most recent transaction. If two or more nodes + have the most recent transaction the group makes an arbitrary choice. If quorum number of + nodes does not remain, the nodes cannot elect a new master and will wait until nodes rejoin. + You will see later that manual controls are available allow service to be restored from + fewer than quorum nodes and to influence which node gets elected in the event of a + tie.

Whenever a group has fewer than quorum nodes present, the virtualhost will be + unavailable and messaging connections will be refused. If quorum disappears at the very + moment a messaging client sends a transaction that transaction will fail.

You will have noticed the difference in the synchronization policies applied the master + and the replicas. The replicas send the acknowledgement back before the data is written to + disk. The master synchronously writes the transaction to storage. This is an example of a + trade off between durability and performance. We will see more about how to control this + trade off later.

10.4.2. Synchronization Policy

The synchronization policy dictates what a node must do when it + receives a transaction before it acknowledges that transaction to the rest of the + group.

The following options are available:

  • SYNC. The node must write the transaction to disk and flush + any OS level buffers before sending the acknowledgement. SYNC is offers the highest + durability but offers the least performance.

  • WRITE_NO_SYNC. The node must write the transaction to disk + before sending the acknowledgement. OS level buffers will be flush as some point + later. This typically provides an assurance against failure of the application but not + the operating system or hardware.

  • NO_SYNC. The node immediately sends the acknowledgement. The + transaction will be written and OS level buffers flushed as some point later. NO_SYNC + offers the highest performance but the lowest durability level. This synchronization + policy is sometimes known as commit to the network.

It is possible to assign a one policy to the master and a different policy to the + replicas. These are configured as attributes on the + virtualhost. By default the master uses SYNC and replicas use + NO_SYNC.

10.4.3. Node Priority

Node priority can be used to influence the behaviour of the election algorithm. It is + useful in the case were you want to favour some nodes over others. For instance, if you wish + to favour nodes located in a particular data centre over those in a remote site.

The following options are available:

  • Highest. Nodes with this priority will be more favoured. In + the event of two or more nodes having the most recent transaction, the node with this + priority will be elected master. If two or more nodes have this priority the algorithm + will make an arbitrary choice.

  • High. Nodes with this priority will be favoured but not as + much so as those with Highest.

  • Normal. This is default election priority.

  • Never. The node will never be elected even if the + node has the most recent transaction. The node will still keep up to date + with the replication stream and will still vote itself, but can just never be + elected.

+

Node priority is configured as an attribute on the + virtualhost node and can be changed at runtime and is effective immediately.

Important

Use of the Never priority can lead to transaction loss. For example, consider a group + of three where replica-2 is marked as Never. If a transaction were to arrive and it be + acknowledged only by Master and Replica-2, the transaction would succeed. Replica 1 is + running behind for some reason (perhaps a full-GC). If a Master failure were to occur at + that moment, the replicas would elect Replica-1 even though Replica-2 had the most recent + transaction.

Transaction loss is reported by message HA-1014.

10.4.4. Required Minimum Number Of Nodes

This controls the required minimum number of nodes to complete a transaction and to + elect a new master. By default, the required number of nodes is set to + Default (which signifies quorum).

It is possible to reduce the required minimum number of nodes. The rationale for doing + this is normally to temporarily restore service from fewer than quorum nodes following an + extraordinary failure.

For example, consider a group of three. If one node were to fail, as quorum still + remained, the system would continue work without any intervention. If the failing node were + the master, a new master would be elected.

What if a further node were to fail? Quorum no longer remains, and the remaining node + would just wait. It cannot elect itself master. What if we wanted to restore service from + just this one node?

In this case, Required Number of Nodes can be reduced to 1 on the remain node, allowing + the node to elect itself and service to be restored from the singleton. Required minimum + number of nodes is configured as an attribute on the + virtualhost node and can be changed at runtime and is effective immediately.

Important

The attribute must be used cautiously. Careless use will lead to lost transactions and + can lead to a split-brain in the event of a network partition. If used to temporarily restore + service from fewer than quorum nodes, it is imperative to revert it + to the Default value as the failed nodes are restored.

Transaction loss is reported by message HA-1014.

10.4.5. Allow to Operate Solo

This attribute only applies to groups containing exactly two nodes.

In a group of two, if a node were to fail then in default configuration work will cease + as quorum no longer exists. A single node cannot elect itself master.

The allow to operate solo flag allows a node in a two node group to elect itself master and + to operate sole. It is configured as an attribute on the + virtualhost node and can be changed at runtime and is effective immediately.

For example, consider a group of two where the master fails. Service will be interrupted + as the remaining node cannot elect itself master. To allow it to become master, apply the + allow to operate solo flag to it. It will elect itself master and work can continue, albeit + from one node.

Important

It is imperative not to allow the allow to operate solo flag to be set on both nodes at once. To + do so will mean, in the event of a network partition, a split-brain will + occur.

Transaction loss is reported by message HA-1014.

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