Namespace: metadata

diffusion. metadata

Deprecated

As of 6.0, the diffusion.metadata namespace is deprecated. Instead, use the RecordV2 Data Type for record-based values.

Metadata describes the type and structure of data that a topic allows.

Metadata can be used for adding topics, updating topics, and parsing updates received from subscriptions.

You can also re-use particular metadata instances across multiple topics, allowing you to define well-known formats that can be applied across your application.

Metadata is accessed via the diffusion singleton.

Deprecated:
  • Yes

Examples

// Creating a metadata instance
var meta = new diffusion.metadata.Integer();
// Using metadata to add topics
session.topics.add('my/topic', meta);
// Using metadata to parse updates
session.subscribe('my/topic').transform(meta).on('update', function(val) {
     // Do something with the integer value
});

Classes

Decimal
Integer
RecordContent
Stateless
String