Add and Remove Gateway Senders and Receivers

Use the ALTER TABLE command to modify the gateway senders configured for a table. Use DROP commands to completely remove gateway sender and gateway receiver configurations.

Add Gateway Senders and Receivers

The ALTER TABLE command enables you to add or remove gateway sender configurations on an existing table. The list of gateway senders that you include in the ALTER TABLE command replaces any existing sender configuration for the table. For example, consider the statement:
ALTER TABLE test_table SET GATEWAYSENDER (cluster-2-sender, cluster-3-sender);

If the table "test_table" had no previous gateway sender configurations associated with it, then the ALTER TABLE command associates two new senders with the table. If "test_table" was originally configured with a different gateway sender configuration, that configuration is removed and replaced with the new configuration (senders "cluster-2-sender" and "cluster-3-sender").

Remove Gateway Senders and Receivers

To completely remove a gateway sender configuration from GemFire XD, use the DROP GATEWAYSENDER statement and specify the sender name:
DROP GATEWAYSENDER cluster-3-sender;
To completely remove a gateway receiver configuration from GemFire XD, use the DROP GATEWAYRECEIVER statement and specify the receiver name:
DROP GATEWAYRECEIVER test_receiver;
To remove all gateway senders from a table, stopping WAN replication for the table, use ALTER TABLE and specify no senders as in:
ALTER TABLE test_table SET GATEWAYSENDER ();

In all cases, the ALTER TABLE command only adds or removes gateway sender configurations for a particular table. The gateway sender configuration itself still remains in GemFire XD, and may be used with other tables.