A topic that provides data in 64-bit integer format. The data is transmitted in a
binary form for increased efficiency. Int64 topics are stateful: each topic stores a 64-bit
integer on the Diffusion™ server.
Why use an int64 topic?
An int64 topic enables you to explicitly type the data that you send through the topic as a
Int64 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 64-bit integer and CBOR.
Properties of an int64 topic
When you create an int64 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.
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 an int64 topic
Deltas are not available for data published to int64 topics.
validity of the values converted to an Int64 from a Number
or converted to a Number from an Int64 can only be
guaranteed for values up to 253 - 1. Converting between a
String and an Int64 has fully guaranteed precision.
The Publisher API provides the capability to create and update int64
topics using TopicDataFactory.newUniversalData.