Class: TopicSpecification

TopicSpecification

new TopicSpecification()

The specification of a topic.

A topic is specified in terms of its type and a map of optional property settings which can alter the default behavior of the topic.

Properties
Name Description
PUBLISH_VALUES_ONLY Topic property indicating whether a topic should publish only values.

By default, topics with a topic DataTypes.DataType that supports deltas will publish a delta when doing so is more efficient than publishing the value. Setting this property to 'true' disables this behavior so that deltas are never published. This would result in more data being transmitted, but would allow the client to only have to process values and not deltas.

For topic DataTypes that do not have delta support this value is irrelevant as only values would ever be published.

VALIDATE_VALUES Topic property indicating whether a topic should validate inbound values.

By default, the server does not validate received values before sending them on to clients. Invalid or corrupt values will be stored in the topic and passed on to clients. If this property is set to 'true', the server will perform additional validation on values to check that it is a valid instance of the data type, and if it is not then it will return an error to the updater and not update the topic.

If this value is not set (or set to something other than 'true'), no server validation of inbound values is performed. This is the recommended setting as there is a performance overhead to validation.

Properties:
Name Type Description
type diffusion.topics.TopicType The topic type.
properties Object A map of the topic properties. This may be empty depending upon the level of detail requested.
Since:
  • 5.7