Skip to main content

The bin-transforms section of aerospike-pubsub-outbound.yml

Bins in Aerospike records correspond to the names of attributes in messages generated by the connector. For cases where the name of a bin does not match the name of the corresponding attribute, you can use the bin-transforms section of the /etc/aerospike-pubsub-outbound/aerospike-pubsub-outbound.yml YAML file to configure the transformations to apply on the names of bins.

The transforms can be specified as a mapping or a series of transforms to apply on the bin names. In case a bin name is specified in the mapping section then the transforms are not applied on the matched bin.


The map option lets you specify the name of one or more bins and the name of their corresponding attributes in published messages. For example, suppose that your Aerospike records contained these bins and messages include these attributes:


The entries for the map option in the bin-transforms section of your configuration file would look like this:

lastname: last_name
firstname: first_name
mobile: mobile_phone


If your Aerospike records include bins whose names do not match attribute names and that are not listed as entries for the map option, then you must use the transforms option to specify how to map bin names to attribute names.

The following transforms are supported:

  • lowercase Converts to lowercase.
  • uppercase Converts to uppercase
  • trim Trims leading and trailing whitespace.
  • regex Matches against a regex pattern and replaces all occurrences with a replacement. The regex and replacement use Java regex syntax.


This example shows a mapping of the bin name red-color to the attribute name red. It also shows transforms to apply to all other bin names.

red-color: red
- regex:
pattern: '-'
replacement: '_'
- uppercase

If an Aerospike record includes the bins red-color and blue-color, the corresponding attributes in the published message will have the names red and BLUE_COLOR, as shown in the table below:

Aerospike Bin NameTransformed name