Namespace: metadata

diffusion. metadata

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.

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