10. Replication DestinationΒΆ
An AMPS replication target is defined within the Replication
section
of an AMPS configuration file. Within the Replication
section, there
are one or more Destination
sections, each specifying a unique
replication target. Table 10.1
contains a listing of the parameters for the Destination
section in the Replication
section of an AMPS configuration file.
Element | Description |
---|---|
Destination
|
Required parent tag, which defines a unique replication target. |
SyncType
|
Defines how synchronization of ack messages is
handled, either sync or async . |
Transport
|
The message type and URI where messages will be
replicated. Requires a AMPS supports multiple To provide failover, use multiple Type The InetAddr A Transport for a replication destination can contain
one or more When a single When more than one If no ReconnectTimeout A list of intervals that specifies how long AMPS will
attempt to connect to a given This configuration item can contain a single interval,
which will be used for all Authenticator A Authentication A Entitlement A Certificate A PrivateKey A Ciphers A |
Group
|
The group that the downstream destination is a member
of. The There is no built in default for this value. AMPS
requires that a destination have a If a |
Name |
The name of the destination. This name appears in the
AMPS logs when AMPS logs a message about this
destination. The 60East recommends setting the For example, if you have three servers in the
There is no default for this value. If a |
Topic |
Defines the topic name to replicate. Requires a
Name and MessageType . See the following table
(Table 10.2)
for details. |
PassThrough |
Specifies source instances to pass through to this
destination. The value of this element is a regular
expression which is matched against the group name of
the instance that sent the replication message to this
instance. When the regular expression matches, the
replication message is eligible for passthrough, and
will be sent to the destination if the Topic
specifications match the message. |
Compression |
Specifies whether to use compression for this
destination. When set to Default: |
AckConflationInterval |
Specifies the interval to use for conflating acknowledgement messages from this destination. This value must be an interval of less than 1 second. See the User Guide chapter on acknowledgement messages for details on this setting. Default: |
Table 10.1: Replication Destination
A replication destination can contain any number of Topic definition
elements. For simplicity in working with the configuration file, 60East
recommends using a few Topic
elements with regular expression
patterns over large numbers of individual topic declarations.
Element | Description |
---|---|
Name
|
The name of the topic to replicate. The When |
MessageType
|
The message type of the topic to replicate. |
Filter |
A content filter to apply to the topics. When present, only messages that match the filter are replicated. This filter follows the standard AMPS filter syntax. |
IncludeValidation |
The set of configuration checks to validate for this topic. Default: All validation options listed below are included by default. |
ExcludeValidation |
The set of configuration checks to exclude for this topic. If the same
check appears in both Default: None of the validation options listed below are excluded by default. |
Table 10.2: Replication Destination : Topic Definition
AMPS supports the following automatic configuration validation checks:
Check | Validates |
---|---|
txlog |
The topic is contained in the transaction log of the remote instance. |
replicate |
The topic is replicated from the remote instance back to this instance. |
sow |
If the topic is a SOW topic in this instance, it must also be a SOW topic in the remote instance. |
cascade |
The remote instance must enforce the same set of validation checks for this topic as this instance does. |
queue |
If the topic is a queue in this instance, it must also be a queue in the remote instance. This option cannot be excluded. |
keys |
If the topic is a SOW topic in this
instance, it must also be a SOW
topic in the remote instance and the
SOW in the remote instance must use
the same Key definitions. |
replicate_filter |
If this topic uses a replication filter, the remote instance must use the same replication filter for replication back to this instance. |
queue_passthrough |
If the topic is a queue in this instance, the remote instance must support passthrough from this group. |
queue_underlying |
If the topic is a queue in this instance, it must use the same underlying topic definition and filters in the remote instance. This option cannot be excluded. |
Table 10.3: Replication Configuration Validation
<Replication>
<Destination>
<Name>amps-2</Name>
<Group>Data-Center-NYC-1</Group>
<Topic>
<Name>ORDER_STATE-Replication</Name>
<MessageType>xml</MessageType>
</Topic>
<Topic>
<Name>REFERENCE_INFO-.*</Name>
<MessageType>json</MessageType>
<Filter>/state = 'published'</Filter>
</Topic>
<SyncType>sync</SyncType>
<Compression>enabled</Compression>
<Transport>
<Type>amps-replication</Type>
<InetAddr>interface1.example.com:19005</InetAddr>
<InetAddr>interface2.example.com:19080</InetAddr>
<Authenticator>
<Module>my-credentials-store-module</Module>
</Authenticator>
</Transport>
<PassThrough>Data-Center-(ORD|HKG)-.*</PassThrough>
</Destination>
<Destination>
<Name>NYC-View-Server</Name>
<Group>Data-Center-NYC-1</Group>
<Topic>
<Name>ORDER_STATE</Name>
<MessageType>json</MessageType>
<ExcludeValidation>replicate,cascade,sow</ExcludeValidation>
</Topic>
<SyncType>async</SyncType>
<Compression>enabled</Compression>
<Transport>
<Type>amps-replication</Type>
<InetAddr>view-server-a.example.com:19005</InetAddr>
<InetAddr>view-server-b.example.com:19080</InetAddr>
</Transport>
</Destination>
</Replication>
Example 10.1: Replication Example