Summary: This page explains how to configure replication gateway targets of a space.
OverviewEach space that is replicating to another space (or spaces) is actually replicating to the local gateway of the target space, Here is an example of how this configuration should look:
Using pu.config
<?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="GigaSpaces.XAP" type="GigaSpaces.XAP.Configuration.GigaSpacesXAPConfiguration, GigaSpaces.Core"/> </configSections> <GigaSpaces.XAP> <ProcessingUnitContainer Type="GigaSpaces.XAP.ProcessingUnit.Containers.BasicContainer.BasicProcessingUnitContainer, GigaSpaces.Core"> <BasicContainer> <ScanAssemblies> .. </ScanAssemblies> <SpaceProxies> <add Name="Space" Url="/./myNYSpace"> <Gateway LocalGatewayName="NEWYORK" BulkSize="1000" MaxRedoLogCapacity="1000000"> <Targets> <add Name="LONDON"/> <add Name="HONGKONG" BulkSize="100"/> </Targets> </Gateway> </add> </SpaceProxies> </BasicContainer> </ProcessingUnitContainer> </GigaSpaces.XAP> </configuration> Code Construction When using code construction for creating a space, the gateway configuration should be part of the SpaceConfig object that is used to create the space: SpaceConfig spaceConfig = new SpaceConfig(); //... Configure all other space properties spaceConfig.GatewayConfig = new GatewayConfig(); spaceConfig.GatewayConfig.LocalGatewayName = "NEWYORK"; spaceConfig.GatewayConfig.BulkSize = 1000; spaceConfig.GatewayConfig.MaxRedoLogCapacity = 1000000; spaceConfig.GatewayConfig.GatewayTargets = new List<GatewayTargetConfig>(); //Configure london gateway target GatewayTargetConfig londonTarget = new GatewayTargetConfig(); londonTarget.Name = "LONDON"; spaceConfig.GatewayConfig.GatewayTargets.Add(londonTarget); //Configure hong-kong gateway target GatewayTargetConfig hongkongTarget = new GatewayTargetConfig(); hongkongTarget.Name = "HONGKONG"; hongkongTarget.BulkSize = 100; spaceConfig.GatewayConfig.GatewayTargets.Add(hongkongTarget); BasicProcessingUnitContainer container = //... obtain container reference container.CreateSpaceProxy("Space", "/./myNYSpace", spaceConfig); Each configuration can be configured for all gateways or specifically per each gateway as seen in the above example, max-redo-log-capacity is configured for all gateways while bulk-size is specifically overridden in the configuration of HONGKONG gateway target. A recommended reading regarding the replication redo-log is Controlling the Replication Redo Log. Configurable Parameters
If one of the gateway targets name matches the local-gateway-name, it will be filtered and removed from the list at deploy time. This may be helpful for creating symmetric configuration which is demonstrated at Multi-Site Replication (WAN) page. |
![]() |
GigaSpaces.com - Legal Notice - 3rd Party Licenses - Site Map - API Docs - Forum - Downloads - Blog - White Papers - Contact Tech Writing - Gen. by Atlassian Confluence |