activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [12/16] activemq-artemis git commit: ARTEMIS-1912 big doc refactor
Date Thu, 07 Jun 2018 15:26:54 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2b5d8f3b/docs/user-manual/en/data-tools.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/data-tools.md b/docs/user-manual/en/data-tools.md
new file mode 100644
index 0000000..fb7443f
--- /dev/null
+++ b/docs/user-manual/en/data-tools.md
@@ -0,0 +1,348 @@
+# Data Tools
+
+You can use the Artemis CLI to execute data maintenance tools:
+
+This is a list of sub-commands available
+
+Name | Description
+---|---
+exp | Export the message data using a special and independent XML format
+imp | Imports the journal to a running broker using the output from expt
+data | Prints a report about journal records and summary of existent records, as well a report
on paging
+encode | shows an internal format of the journal encoded to String
+decode | imports the internal journal format from encode
+
+You can use the help at the tool for more information on how to execute each of the tools.
For example:
+
+```
+$ ./artemis help data print
+NAME
+        artemis data print - Print data records information (WARNING: don't use
+        while a production server is running)
+
+SYNOPSIS
+        artemis data print [--bindings <binding>] [--broker <brokerConfig>]
+                [--f] [--jdbc] [--jdbc-bindings-table-name <jdbcBindings>]
+                [--jdbc-connection-url <jdbcURL>]
+                [--jdbc-driver-class-name <jdbcClassName>]
+                [--jdbc-large-message-table-name <jdbcLargeMessages>]
+                [--jdbc-message-table-name <jdbcMessages>]
+                [--jdbc-page-store-table-name <jdbcPageStore>] [--journal <journal>]
+                [--large-messages <largeMessges>] [--output <output>]
+                [--paging <paging>] [--safe] [--verbose] [--] [<configuration>]
+
+OPTIONS
+        --bindings <binding>
+            The folder used for bindings (default from broker.xml)
+
+        --broker <brokerConfig>
+            This would override the broker configuration from the bootstrap
+
+        --f
+            This will allow certain tools like print-data to be performed
+            ignoring any running servers. WARNING: Changing data concurrently
+            with a running broker may damage your data. Be careful with this
+            option.
+
+        --jdbc
+            It will activate jdbc
+
+        --jdbc-bindings-table-name <jdbcBindings>
+            Name of the jdbc bindigns table
+
+        --jdbc-connection-url <jdbcURL>
+            The connection used for the database
+
+        --jdbc-driver-class-name <jdbcClassName>
+            JDBC driver classname
+
+        --jdbc-large-message-table-name <jdbcLargeMessages>
+            Name of the large messages table
+
+        --jdbc-message-table-name <jdbcMessages>
+            Name of the jdbc messages table
+
+        --jdbc-page-store-table-name <jdbcPageStore>
+            Name of the page sotre messages table
+
+        --journal <journal>
+            The folder used for messages journal (default from broker.xml)
+
+        --large-messages <largeMessges>
+            The folder used for large-messages (default from broker.xml)
+
+        --output <output>
+            Output name for the file
+
+        --paging <paging>
+            The folder used for paging (default from broker.xml)
+
+        --safe
+            It will print your data structure without showing your data
+
+        --verbose
+            Adds more information on the execution
+
+        --
+            This option can be used to separate command-line options from the
+            list of argument, (useful when arguments might be mistaken for
+            command-line options
+
+        <configuration>
+            Broker Configuration URI, default
+            'xml:${ARTEMIS_INSTANCE}/etc/bootstrap.xml'
+```
+
+
+For a full list of data tools commands available use:
+
+```
+$ ./artemis help data
+NAME
+        artemis data - data tools group (print|imp|exp|encode|decode|compact)
+        (example ./artemis data print)
+
+SYNOPSIS
+        artemis data
+        artemis data compact [--verbose] [--paging <paging>]
+                [--journal <journal>] [--large-messages <largeMessges>]
+                [--broker <brokerConfig>] [--bindings <binding>]
+        artemis data decode [--verbose] [--suffix <suffix>] [--paging <paging>]
+                [--prefix <prefix>] [--file-size <size>] --input <input>
+                [--journal <journal>] [--directory <directory>]
+                [--large-messages <largeMessges>] [--broker <brokerConfig>]
+                [--bindings <binding>]
+        artemis data encode [--verbose] [--directory <directory>]
+                [--suffix <suffix>] [--paging <paging>] [--prefix <prefix>]
+                [--file-size <size>] [--journal <journal>]
+                [--large-messages <largeMessges>] [--broker <brokerConfig>]
+                [--bindings <binding>]
+        artemis data exp [--jdbc-bindings-table-name <jdbcBindings>]
+                [--jdbc-message-table-name <jdbcMessages>] [--paging <paging>]
+                [--jdbc-connection-url <jdbcURL>]
+                [--jdbc-large-message-table-name <jdbcLargeMessages>] [--f]
+                [--large-messages <largeMessges>] [--broker <brokerConfig>]
+                [--jdbc-page-store-table-name <jdbcPageStore>]
+                [--jdbc-driver-class-name <jdbcClassName>] [--jdbc] [--verbose]
+                [--journal <journal>] [--output <output>] [--bindings <binding>]
+        artemis data imp [--user <user>] [--legacy-prefixes] [--verbose]
+                [--host <host>] [--port <port>] [--transaction] --input <input>
+                [--password <password>] [--sort]
+        artemis data print [--jdbc-bindings-table-name <jdbcBindings>]
+                [--jdbc-message-table-name <jdbcMessages>] [--paging <paging>]
+                [--jdbc-connection-url <jdbcURL>]
+                [--jdbc-large-message-table-name <jdbcLargeMessages>] [--f]
+                [--large-messages <largeMessges>] [--broker <brokerConfig>]
+                [--jdbc-page-store-table-name <jdbcPageStore>]
+                [--jdbc-driver-class-name <jdbcClassName>] [--safe] [--jdbc] [--verbose]
+                [--journal <journal>] [--output <output>] [--bindings <binding>]
+
+COMMANDS
+        With no arguments, Display help information
+
+        print
+            Print data records information (WARNING: don't use while a
+            production server is running)
+
+            With --jdbc-bindings-table-name option, Name of the jdbc bindigns
+            table
+
+            With --jdbc-message-table-name option, Name of the jdbc messages
+            table
+
+            With --paging option, The folder used for paging (default from
+            broker.xml)
+
+            With --jdbc-connection-url option, The connection used for the
+            database
+
+            With --jdbc-large-message-table-name option, Name of the large
+            messages table
+
+            With --f option, This will allow certain tools like print-data to be
+            performed ignoring any running servers. WARNING: Changing data
+            concurrently with a running broker may damage your data. Be careful
+            with this option.
+
+            With --large-messages option, The folder used for large-messages
+            (default from broker.xml)
+
+            With --broker option, This would override the broker configuration
+            from the bootstrap
+
+            With --jdbc-page-store-table-name option, Name of the page sotre
+            messages table
+
+            With --jdbc-driver-class-name option, JDBC driver classname
+
+            With --safe option, It will print your data structure without
+            showing your data
+
+            With --jdbc option, It will activate jdbc
+
+            With --verbose option, Adds more information on the execution
+
+            With --journal option, The folder used for messages journal (default
+            from broker.xml)
+
+            With --output option, Output name for the file
+
+            With --bindings option, The folder used for bindings (default from
+            broker.xml)
+
+        exp
+            Export all message-data using an XML that could be interpreted by
+            any system.
+
+            With --jdbc-bindings-table-name option, Name of the jdbc bindigns
+            table
+
+            With --jdbc-message-table-name option, Name of the jdbc messages
+            table
+
+            With --paging option, The folder used for paging (default from
+            broker.xml)
+
+            With --jdbc-connection-url option, The connection used for the
+            database
+
+            With --jdbc-large-message-table-name option, Name of the large
+            messages table
+
+            With --f option, This will allow certain tools like print-data to be
+            performed ignoring any running servers. WARNING: Changing data
+            concurrently with a running broker may damage your data. Be careful
+            with this option.
+
+            With --large-messages option, The folder used for large-messages
+            (default from broker.xml)
+
+            With --broker option, This would override the broker configuration
+            from the bootstrap
+
+            With --jdbc-page-store-table-name option, Name of the page sotre
+            messages table
+
+            With --jdbc-driver-class-name option, JDBC driver classname
+
+            With --jdbc option, It will activate jdbc
+
+            With --verbose option, Adds more information on the execution
+
+            With --journal option, The folder used for messages journal (default
+            from broker.xml)
+
+            With --output option, Output name for the file
+
+            With --bindings option, The folder used for bindings (default from
+            broker.xml)
+
+        imp
+            Import all message-data using an XML that could be interpreted by
+            any system.
+
+            With --user option, User name used to import the data. (default
+            null)
+
+            With --legacy-prefixes option, Do not remove prefixes from legacy
+            imports
+
+            With --verbose option, Adds more information on the execution
+
+            With --host option, The host used to import the data (default
+            localhost)
+
+            With --port option, The port used to import the data (default 61616)
+
+            With --transaction option, If this is set to true you will need a
+            whole transaction to commit at the end. (default false)
+
+            With --input option, The input file name (default=exp.dmp)
+
+            With --password option, User name used to import the data. (default
+            null)
+
+            With --sort option, Sort the messages from the input (used for older
+            versions that won't sort messages)
+
+        decode
+            Decode a journal's internal format into a new journal set of files
+
+            With --verbose option, Adds more information on the execution
+
+            With --suffix option, The journal suffix (default amq)
+
+            With --paging option, The folder used for paging (default from
+            broker.xml)
+
+            With --prefix option, The journal prefix (default activemq-data)
+
+            With --file-size option, The journal size (default 10485760)
+
+            With --input option, The input file name (default=exp.dmp)
+
+            With --journal option, The folder used for messages journal (default
+            from broker.xml)
+
+            With --directory option, The journal folder (default journal folder
+            from broker.xml)
+
+            With --large-messages option, The folder used for large-messages
+            (default from broker.xml)
+
+            With --broker option, This would override the broker configuration
+            from the bootstrap
+
+            With --bindings option, The folder used for bindings (default from
+            broker.xml)
+
+        encode
+            Encode a set of journal files into an internal encoded data format
+
+            With --verbose option, Adds more information on the execution
+
+            With --directory option, The journal folder (default the journal
+            folder from broker.xml)
+
+            With --suffix option, The journal suffix (default amq)
+
+            With --paging option, The folder used for paging (default from
+            broker.xml)
+
+            With --prefix option, The journal prefix (default activemq-data)
+
+            With --file-size option, The journal size (default 10485760)
+
+            With --journal option, The folder used for messages journal (default
+            from broker.xml)
+
+            With --large-messages option, The folder used for large-messages
+            (default from broker.xml)
+
+            With --broker option, This would override the broker configuration
+            from the bootstrap
+
+            With --bindings option, The folder used for bindings (default from
+            broker.xml)
+
+        compact
+            Compacts the journal of a non running server
+
+            With --verbose option, Adds more information on the execution
+
+            With --paging option, The folder used for paging (default from
+            broker.xml)
+
+            With --journal option, The folder used for messages journal (default
+            from broker.xml)
+
+            With --large-messages option, The folder used for large-messages
+            (default from broker.xml)
+
+            With --broker option, This would override the broker configuration
+            from the bootstrap
+
+            With --bindings option, The folder used for bindings (default from
+            broker.xml)
+
+```
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2b5d8f3b/docs/user-manual/en/diverts.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/diverts.md b/docs/user-manual/en/diverts.md
index 7408f4b..5681e96 100644
--- a/docs/user-manual/en/diverts.md
+++ b/docs/user-manual/en/diverts.md
@@ -117,9 +117,9 @@ non-exclusive divert, again from the divert example:
 
 ```xml
 <divert name="order-divert">
-    <address>orders</address>
-    <forwarding-address>spyTopic</forwarding-address>
-    <exclusive>false</exclusive>
+   <address>orders</address>
+   <forwarding-address>spyTopic</forwarding-address>
+   <exclusive>false</exclusive>
 </divert>
 ```
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2b5d8f3b/docs/user-manual/en/duplicate-detection.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/duplicate-detection.md b/docs/user-manual/en/duplicate-detection.md
index c96c702..b3e9535 100644
--- a/docs/user-manual/en/duplicate-detection.md
+++ b/docs/user-manual/en/duplicate-detection.md
@@ -48,7 +48,7 @@ already received a message with that value of the header. If it has
 received a message with the same value before then it will ignore the
 message.
 
-> **Note**
+> **Note:**
 >
 > Using duplicate detection to move messages between nodes can give you
 > the same *once and only once* delivery guarantees as if you were using
@@ -118,7 +118,7 @@ configured by the parameter `persist-id-cache`, also in
 be persisted to permanent storage as they are received. The default
 value for this parameter is `true`.
 
-> **Note**
+> **Note:**
 >
 > When choosing a size of the duplicate id cache be sure to set it to a
 > larger enough size so if you resend messages all the previously sent

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2b5d8f3b/docs/user-manual/en/embedding-activemq.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/embedding-activemq.md b/docs/user-manual/en/embedding-activemq.md
index d309a58..3dcfb31 100644
--- a/docs/user-manual/en/embedding-activemq.md
+++ b/docs/user-manual/en/embedding-activemq.md
@@ -1,29 +1,30 @@
 # Embedding Apache ActiveMQ Artemis
 
-Apache ActiveMQ Artemis is designed as set of simple Plain Old Java Objects (POJOs).
-This means Apache ActiveMQ Artemis can be instantiated and run in any dependency
-injection framework such as Spring or Google Guice. It also means that if you have an application
that could use
-messaging functionality internally, then it can *directly instantiate*
-Apache ActiveMQ Artemis clients and servers in its own application code to perform that
-functionality. We call this *embedding* Apache ActiveMQ Artemis.
-
-Examples of applications that might want to do this include any
-application that needs very high performance, transactional, persistent
-messaging but doesn't want the hassle of writing it all from scratch.
-
-Embedding Apache ActiveMQ Artemis can be done in very few easy steps. Instantiate the
-configuration object, instantiate the server, start it, and you have a
-Apache ActiveMQ Artemis running in your virtual machine. It's as simple and easy as
-that.
+Apache ActiveMQ Artemis is designed as set of simple Plain Old Java Objects
+(POJOs).  This means Apache ActiveMQ Artemis can be instantiated and run in any
+dependency injection framework such as Spring or Google Guice. It also means
+that if you have an application that could use messaging functionality
+internally, then it can *directly instantiate* Apache ActiveMQ Artemis clients
+and servers in its own application code to perform that functionality. We call
+this *embedding* Apache ActiveMQ Artemis.
+
+Examples of applications that might want to do this include any application
+that needs very high performance, transactional, persistent messaging but
+doesn't want the hassle of writing it all from scratch.
+
+Embedding Apache ActiveMQ Artemis can be done in very few easy steps.
+Instantiate the configuration object, instantiate the server, start it, and you
+have a Apache ActiveMQ Artemis running in your virtual machine. It's as simple
+and easy as that.
 
 ## Simple Config File Embedding
 
-The simplest way to embed Apache ActiveMQ Artemis is to use the embedded wrapper
-classes and configure Apache ActiveMQ Artemis through its configuration files. There
-are two different helper classes for this depending on whether your
-using the Apache ActiveMQ Artemis Core API or JMS.
+The simplest way to embed Apache ActiveMQ Artemis is to use the embedded
+wrapper classes and configure Apache ActiveMQ Artemis through its configuration
+files. There are two different helper classes for this depending on whether
+your using the Apache ActiveMQ Artemis Core API or JMS.
 
-## Embeddeing Apache ActiveMQ Artemis Server
+## Embedding an Apache ActiveMQ Artemis Broker
 
 For instantiating a core Apache ActiveMQ Artemis Server, the steps are pretty
 simple. The example requires that you have defined a configuration file
@@ -38,9 +39,9 @@ EmbeddedActiveMQ embedded = new EmbeddedActiveMQ();
 
 embedded.start();
 
-ClientSessionFactory nettyFactory =  ActiveMQClient.createClientSessionFactory(
-                                        new TransportConfiguration(
-                                           InVMConnectorFactory.class.getName()));
+ServerLocator serverLocator =  ActiveMQClient.createServerLocator("vm://0");
+
+ClientSessionFactory factory =  serverLocator.createSessionFactory();
 
 ClientSession session = factory.createSession();
 
@@ -65,23 +66,22 @@ System.out.println("message = " + msgReceived.getBody().readString());
 session.close();
 ```
 
-The `EmbeddedActiveMQ` class has a few additional setter methods that
-allow you to specify a different config file name as well as other
-properties. See the javadocs for this class for more details.
+The `EmbeddedActiveMQ` class has a few additional setter methods that allow you
+to specify a different config file name as well as other properties. See the
+javadocs for this class for more details.
 
 ## POJO instantiation - Embedding Programmatically
 
-You can follow this step-by-step guide to programmatically embed the
-core, non-JMS Apache ActiveMQ Artemis Server instance:
+You can follow this step-by-step guide to programmatically embed the core,
+non-JMS Apache ActiveMQ Artemis Server instance:
 
-Create the configuration object - this contains configuration
-information for an Apache ActiveMQ Artemis instance. The setter methods of this class
-allow you to programmatically set configuration options as describe in
-the [Server Configuration](configuration-index.md) section.
+Create the configuration object - this contains configuration information for
+an Apache ActiveMQ Artemis instance. The setter methods of this class allow you
+to programmatically set configuration options as describe in the [Server
+Configuration](configuration-index.md) section.
 
-The acceptors are configured through `ConfigurationImpl`. Just add the
-`NettyAcceptorFactory` on the transports the same way you would through
-the main configuration file.
+The acceptors are configured through `Configuration`. Just add the acceptor URL
+the same way you would through the main configuration file.
 
 ```java
 import org.apache.activemq.artemis.core.config.Configuration;
@@ -90,12 +90,9 @@ import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl;
 ...
 
 Configuration config = new ConfigurationImpl();
-HashSet<TransportConfiguration> transports = new HashSet<TransportConfiguration>();
-
-transports.add(new TransportConfiguration(NettyAcceptorFactory.class.getName()));
-transports.add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
 
-config.setAcceptorConfigurations(transports);
+config.addAcceptorConfiguration("in-vm", "vm://0");
+config.addAcceptorConfiguration("tcp", "tcp://127.0.0.1:61616");
 ```
 
 You need to instantiate an instance of
@@ -123,8 +120,9 @@ server.start();
 
 ## Dependency Frameworks
 
-You may also choose to use a dependency injection framework such as
-The Spring Framework. See [Spring Integration](spring-integration.md) for more details on
+You may also choose to use a dependency injection framework such as The Spring
+Framework. See [Spring Integration](spring-integration.md) for more details on
 Spring and Apache ActiveMQ Artemis.
 
-Apache ActiveMQ Artemis standalone uses [Airline](https://github.com/airlift/airline) to
bootstrap.
+Apache ActiveMQ Artemis standalone uses
+[Airline](https://github.com/airlift/airline) to bootstrap.


Mime
View raw message