12. Bootstrap InitializationΒΆ
Bootstrap initialization is defined directly at the root level of the AMPS configuration file.
For bootstrap initialization, the configuration defines one or more instances to use as a source of messages and the topics to be initialized. The configuration specifies whether the instance should initialize the transaction log, the full current SOW state, or both.
Element | Description |
---|---|
Transport
|
Required tag that specifies where to connect to retrieve initial message state for the instance. The
A If an |
DataType
|
Defines whether to retrieve messages from the transaction log, the current state of the SOW topics, or both. The options for this element can be specified as
|
Topic
|
Specifies a topic to be initialized. The bootstrap configuration may specify one or more topics to be initialized. This option must specify the following:
AMPS supports multiple |
A bootstrap initialization directive can contain any number of Topic
definitions. 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.
When a Bootstrap
directive contains multiple Topic
elements, messages
that match any of the Topic
elements will be replicated. When
matching a Topic
element, literal (non-regular expression) topic
names take priority over regular expression topic names.
For example, the following Bootstrap
directive will initialize any
topic that matches important
of the json
type and the exact topic name
audit-orders
of the xml
message type and customers
of the
nvfix
message type. For those topics, this instance will be
initialized with the current records in the SOW and the contents
of the transaction log on the source instance.
This instance will first attempt to bootstrap initialize
the topics using the instance at source.example.com
port 4100
. If that instance cannot be reached,
the instance will next attempt to use the instance at
backup.example.com
port 4444
.
<Bootstrap>
<Topic>
<Name>.?important.?</Name>
<MessageType>json</MessageType>
</Topic>
<Topic>
<Name>audit-orders</Name>
<MessageType>xml</MessageType>
</Topic>
<Topic>
<Name>customers</Name>
<MessageType>nvfix</MessageType>
</Topic>
<DataType>sow,txlog</DataType>
<Transport>
<InetAddr>source.example.com:4100</InetAddr>
<InetAddr>backup.example.com:4444</InetAddr>
<Type>amps-replication</Type>
</Transport>
</Bootstrap>