Skip to main content
Loading

The format section of aerospike-jms-outbound.yml

The format section of the /etc/aerospike-jms-outbound/aerospike-jms-outbound.yml specifies the serialization format of the data output. The supported formats are:

Aerospike record metadataโ€‹

The Aerospike record metadata has the following fields

MetadataTypeDescriptionPresent in
msgstringWrite/Delete operation.Delete and Write
namespacestringNamespace of the Aerospike record.Delete and Write
setstringSet of the Aerospike record.Write
userKeylong, double, bytes or stringUser key of the Aerospike record.Write (only if user key is stored on server)
digestbytesDigest of the Aerospike record.Delete and Write
genintGeneration of the Aerospike record.Write
lutintLast update time of the Aerospike record.Write
expintExpiry of the Aerospike record.Write
durablebooleanWhether the delete is durable.Delete

WARNING

  • HyperLogLog bins are forwarded as is, as bytes or (for string-based formats) as Base64-encoded strings.

Avroโ€‹

Specifies that the data be serialized as Avro format. The Avro schema can be a map or a record. In the case of a map, just specifying the type of the map values is sufficient. In the case of a record, the exact field names and types need to be specified.

OptionRequiredDefaultExpected valueDescription
modeyesavroSelects avro format.
schemanoSchema of the data.
schema-filenoFile containing the schema of the data.
stringify-map-keysnotrueWhether the numeric keys in CDT maps should be converted to strings. See stringify map keys in avro

Either schema or schema-file has to be specified.

For more information about serializing data in the Avro format, see Avro Format.

Flat JSONโ€‹

Specifies that the data be serialized to Flat JSON format. The type information of bins is not part of the output.

OptionRequiredDefaultExpected valueDescription
modeyesflat-jsonSelects Flat JSON format.
metadata-keyyesThe Aerospike record metadata will be inserted into this top level key.
stringify-map-keysnotrueWhether the numeric keys in CDT maps should be converted to strings. See stringify map keys

Exampleโ€‹

format:
mode: flat-json
metadata-key: metadata

For more information about serializing data in the Flat JSON format, see Flat JSON Format.

JSONโ€‹

Specifies that the data be serialized to JSON format with the type information of bins.

OptionRequiredDefaultExpected valueDescription
modeyesjsonSelects JSON format.
stringify-map-keysnotrueWhether the numeric keys in CDT maps should be converted to strings. See stringify map keys

Stringify Map Keysโ€‹

Aerospike allows many data types as keys in collection data types (CDTs) Maps, but JSON only allows strings as keys in objects. As of now the JMS connector only permits for conversion of numeric types to string keys when converting Aerospike CDT maps.

An Aerospike CDT map with any other data type as the key will fail to be parsed in the JMS connector. Also, an Aerospike CDT map with numeric key, but stringify-map-keys set to false will fail to be parsed in the JMS connector.

Exampleโ€‹

format:
mode: json

For more information about serializing data in the JSON format, see JSON Format.

MessagePackโ€‹

Specifies that the data be serialized to MessagePack format with the type information about bins.

OptionRequiredExpected valueDescription
modeyesmessage-packSelects message pack format.

Exampleโ€‹

format:
mode: message-pack

For more information about serializing data in the MessagePack format, see MessagePack Format.

Customโ€‹

Specifies that the data be serialized with user provided custom code. See Format Transform.

Exampleโ€‹

format:
mode: custom
class: com.aerospike.connect.outbound.example.Formatter