Skip to main content

The ordering key section of aerospike-pubsub-outbound.yml

The ordering-key section of the /etc/aerospike-pubsub-outbound/aerospike-pubsub-outbound.yml YAML file controls how Aerospike records are ordered to the destination.

Here is a list of the ordering key modes:

  • static Always order the records by a fixed value.
  • namespace Uses the namespace of each Aerospike record as the ordering key.
  • set Uses the set of each Aerospike record as the ordering key.
  • bin Uses the value of a bin in each Aerospike record as the ordering key.
  • digest Uses the digest of the Aerospike record as the ordering key.
note
  • If an ordering key for a record is missing, then the record is dispatched without an ordering key.
  • If an ordering key for a record is specified then a regional-endpoint should be specified for the record. Ordering works only when published to a regional endpoint service.

Static ordering key

Always order the records by a fixed value.

Here are the configuration options:

OptionRequiredExpected valueDescription
modeyesstaticSpecifies to publish messages with the value option as the ordering key.
valueyesThe value of the ordering key.

Example

ordering-key:
mode: static
value: red

Namespace ordering key

Uses the namespace of each Aerospike record as the ordering key.

Here are the configuration options:

OptionRequiredExpected valueDescription
modeyesnamespaceSpecifies to publish messages with the record namespace as the ordering key.

Example

ordering-key:
mode: namespace

Set name ordering key

Uses the set name of each Aerospike record as the ordering key.

Here are the configuration options:

OptionRequiredExpected valueDescription
modeyessetSpecifies to publish messages with the record set name as the ordering key.

Example

ordering-key:
mode: set

Bin value ordering key

Uses the value of a bin in each Aerospike record as the ordering key.

Here are the configuration options:

OptionRequiredExpected valueDescription
modeyesbinSpecifies to publish messages with the record bin value as specified in bin as the ordering key.
binyesThe bin value of the record to use as the ordering key.

Example

ordering-key:
mode: bin
bin: id # Order by value of bin "id".

Digest ordering key

Uses the digest of each Aerospike record as the ordering key.

Here are the configuration options:

OptionRequiredExpected valueDescription
modeyesdigestSpecifies to publish messages with the record digest as the ordering key.

Example

ordering-key:
mode: digest