A topic that provides data in double precision floating point format (IEEE 754). The
data is transmitted in a binary form for increased efficiency. Double topics are stateful: each
topic stores a double value on the Diffusion™ server.
Why use a double topic?
A double topic enables you to explicitly type the data that you send through the topic as a
double precision floating point number.
Double topics support null data values.
The value of the topic is transmitted as Concise Binary Object Representation (CBOR). For more
information about CBOR, see http://cbor.io/.
The value of the topic is accessible both as a double and CBOR.
Properties of a double topic
When you create a double topic you can specify the following properties in the topic specification:
- If set to true, the latest value of the topic is not retained by
the Diffusion server or the client that publishes it.
New clients that subscribe do not receive an initial value. No value will be returned for fetch operations that select the topic.
For time series topics, if DONT_RETAIN_VALUE is set to true,
time series events are still retained, but the latest value is not stored separately.
The DONT_RETAIN_VALUE property is useful for applications like a
feed of news items, or for values that are only valid at the moment of publication.
You can combine this with VALIDATE_VALUES.
Using DONT_RETAIN_VALUE reduces the topic memory footprint, but disables delta streaming.
Using an update stream will send complete values to the server, instead of deltas.
Disabling delta streaming is likely to increase the bandwidth used unless subsequent values are unrelated.
This property replaces the obsolete stateless topic type which was removed in Diffusion 6.2.
- If set to true, when a session unsubscribes from
the topic, any updates for the topic that are still queued for the session are
There is a performance overhead to using this option as the client queue must be
scanned to find topic updates to remove, however it may prove useful for preventing
unwanted data being sent to sessions. This property is disabled by default.
- If set to true, the topic rejects updates that would
create invalid instances of the topic's data type.
If set to anything other than
true, no validation is performed and all values are streamed to
subscribing clients whether they are valid data or not.
Validation has a performance overhead and is disabled by default.
Note: If validation is disabled and the value provided is not valid, the client might
produce errors or other unexpected behavior. The exact error varies depending on the
client platform. To avoid this, use the client-side validation method provided by
the Diffusion API.
- Used to set a conflation policy for the topic. Conflation can
merge or discard topic updates to reduce server memory and network data usage.
The supported values are:
The default is "conflate".
See Using conflation for details of the policies.
- Used to set a security principal as the owner of the topic.
The principal receives READ_TOPIC, MODIFY_TOPIC
and UPDATE_TOPIC privileges.
The format of the property value is:
$Principal is "name"
where name is the name of the principal.
- Used to set a topic removal policy.
The property is an expression which defines the conditions which will trigger automatic removal
of the topic or of a set of topics specified with an optional selector.
See Removing topics automatically for details of the expression format.
- Used to disable persistence for a topic.
If set to "false", the topic will not be persisted, even if persistence
is enabled for the server.
Considerations when using a double topic
Deltas are not available for data published to double topics.