From f91d7c51fd4c03ba363d8af1f7f3296442cdce53 Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Fri, 2 Feb 2024 11:15:16 -0600 Subject: [PATCH] ARTEMIS-4629 fix core bridge docs This fills in the gaps for some missing parameters in the core bridge documentation as well as fixes the example so it's actually valid according to the XSD. --- .../schema/artemis-configuration.xsd | 7 ++- docs/user-manual/core-bridges.adoc | 47 +++++++++++++++---- 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/artemis-server/src/main/resources/schema/artemis-configuration.xsd b/artemis-server/src/main/resources/schema/artemis-configuration.xsd index 9f6a784f14..f4d9d1d493 100644 --- a/artemis-server/src/main/resources/schema/artemis-configuration.xsd +++ b/artemis-server/src/main/resources/schema/artemis-configuration.xsd @@ -1327,8 +1327,7 @@ - Any message larger than this size (in bytes) is considered a large message (to be sent in - chunks). + Any message larger than this size (in bytes) is considered a large message (to be sent in chunks). Supports byte notation like "K", "Mb", "MiB", "GB", etc. @@ -1447,8 +1446,8 @@ - Upon reconnection this configures the number of time the same node on the topology will be retried - before resetting the server locator and using the initial connectors + configures the number of times reconnection attempts will be made to the same node on the topology + before reverting back to the initial connector(s) diff --git a/docs/user-manual/core-bridges.adoc b/docs/user-manual/core-bridges.adoc index 4fbbefefb7..f480bfe44b 100644 --- a/docs/user-manual/core-bridges.adoc +++ b/docs/user-manual/core-bridges.adoc @@ -30,27 +30,33 @@ To provide the same guarantee using a JMS bridge you would have to use XA which == Configuring Core Bridges Bridges are configured in `broker.xml`. -Let's kick off with an example (this is actually from the bridge example): +Let's kick off with an example: [,xml] ---- sausage-factory mincing-machine + true org.apache.activemq.artemis.jms.example.HatColourChangeTransformer - 1000 - true + 102400 + 30000 + 60000 + 2000 1.0 + 2000 -1 -1 false true 10000000 + 1048576 foouser foopassword + 10 PASS 1 @@ -79,6 +85,11 @@ forwarding-address:: This is the address on the target server that the message will be forwarded to. If a forwarding address is not specified, then the original address of the message will be retained. +ha:: +This optional parameter determines whether or not this bridge should support high availability. +True means it will connect to any available server in a cluster and support failover. +The default value is `false`. + filter-string:: An optional filter string can be supplied. If specified then only messages which match the filter expression specified in the filter string will be forwarded. @@ -89,10 +100,20 @@ An _optional_ transformer can be specified. This gives you the opportunity to transform the message's header or body before forwarding it. See the xref:transformers.adoc#transformers[transformer chapter] for more details about transformer-specific configuration. -ha:: -This optional parameter determines whether or not this bridge should support high availability. -True means it will connect to any available server in a cluster and support failover. -The default value is `false`. +min-large-message-size:: +Any message larger than this size (in bytes) is considered a large message (to be sent in chunks). +Supports byte notation like "K", "Mb", "MiB", "GB", etc. +Default is `102400` (i.e. 100KiB). + +check-period:: +Sets the period (in milliseconds) used to check if the bridge client has failed to receive pings from the server. +Use `-1` to disable this check. +Default is `30000`. + +connection-ttl:: +How long (in milliseconds) the remote server will keep the connection alive in the absence of any data arriving from the bridge. +This should be greater than the `check-period`. +Default is `60000`. retry-interval:: This optional parameter determines the period in milliseconds between subsequent reconnection attempts, if the connection to the target server has failed. @@ -109,6 +130,10 @@ If we set `retry-interval` to `1000` ms and we set `retry-interval-multiplier` t + The default value is `1.0` meaning each reconnect attempt is spaced at equal intervals. +max-retry-interval:: +This enforces a limit on `retry-interval` since it can grow due to `retry-interval-multiplier`. +Default is `2000`. + initial-connect-attempts:: This optional parameter determines the total number of initial connect attempts the bridge will make before giving up and shutting down. A value of `-1` signifies an unlimited number of attempts. @@ -133,6 +158,7 @@ The default value for this parameter is `true`. confirmation-window-size:: This optional parameter determines the `confirmation-window-size` to use for the connection used to forward messages to the target node. +Supports byte notation like "K", "Mb", "MiB", "GB", etc. This attribute is described in section xref:client-failover.adoc#reconnection-and-failover-attributes[Client failover attributes] + [WARNING] @@ -143,7 +169,8 @@ When using the bridge to forward messages to an address which uses the `BLOCK` ` producer-window-size:: This optional parameter determines the producer flow control through the bridge. Use `-1` to disable. -Default is `1048576` (i.e. 1MB). +Supports byte notation like "K", "Mb", "MiB", "GB", etc. +Default is `1048576` (i.e. 1MiB). user:: This optional parameter determines the user name to use when creating the bridge connection to the remote server. @@ -153,6 +180,10 @@ password:: This optional parameter determines the password to use when creating the bridge connection to the remote server. If it is not specified the default cluster password specified by `cluster-password` in `broker.xml` will be used. +reconnect-attempts-same-node:: +This configures the number of times reconnection attempts will be made to the same node on the topology before reverting back to the initial connector(s). +Default is `10`. + routing-type:: Bridges can apply a particular routing-type to the messages it forwards, strip the existing routing type, or simply pass the existing routing-type through. This is useful in situations where the message may have its routing-type set but you want to bridge it to an address using a different routing-type.