Skip to main content
Loading

Configure Namespaces for Aerospike Connect for Elasticsearch

The namespaces section of the aerospike-elasticsearch-outbound.yaml file overrides settings for bin-name transformations, routing modes, and serialization formats.

OptionRequiredDescription
bin-transformsnoBin transforms for the namespace.
routingnoRouting for the namespace.
formatnoFormat for the namespace.
setsnoMap of set name to bin-transform, routing and format configuration.

The order of preference for picking the configuration for the bin-transforms, routing and format for a given record are:

  1. set, if configured
  2. namespace, if configured
  3. default
caution
  • If the route or format are not specified for a record, the record is skipped.
  • Set name is not shipped for a delete, which means set-specific routing can never be applied to a delete. In this case, the writes are routed according to set configuration, but the deletes are routed according to the namespace configuration. This can result in unintentionally routing writes and deletes to different destinations.

Example

This example implements the following rules:

NamespaceSetRoutingFormatBin TransformsAction
userscustomWrite record in custom format.
userspremiumcustom (with flat-json payload)uppercaseConvert all bin names to upper case and format them in custom format where a custom formatter receives flat-json payload.
usersblackListskipSkip sending data of blackList set to Elasticsearch.
placesSkip record, since routing or format information is missing.
...
format:
mode: custom
batch-formatter-class: com.aerospike.connect.outbound.transformer.examples.elasticsearch.ElasticsearchCustomJsonBatchFormatter

namespaces:
users:
sets:
blackList:
routing:
mode: skip
premium:
format:
mode: custom
batch-formatter-class: com.aerospike.connect.outbound.transformer.examples.elasticsearch.ElasticsearchCustomFlatJsonBatchFormatter
payload-format:
mode: flat-json
bin-transforms:
transforms:
- uppercase
...