java.lang.Object
java.lang.Enum<TopicType>
com.pushtechnology.diffusion.client.topics.details.TopicType
All Implemented Interfaces:
Serializable, Comparable<TopicType>, Constable

public enum TopicType extends Enum<TopicType>
The topic type determines the type of the data values a topic publishes to subscribers.

Source Topics

Most topics are source topics. The characteristics of each type of source topic are summarized in the following table.
Topic type State Data type
STRING Single scalar value. String.
INT64 Single scalar value. 64-bit integer.
DOUBLE Single scalar value. Double precision floating point number.
BINARY Single scalar value. Arbitrary binary data.
RECORD_V2 Single composite value. RecordV2 – Diffusion-specific data type. A list of records, each composed of field values, with an optional schema.
JSON Single composite value. JSON, backed by CBOR-format binary.
TIME_SERIES Append-only log of events. TimeSeries.Event containing a value of a well-known data type.
Since:
5.0
Author:
DiffusionData Limited
See Also:
  • Enum Constant Details

    • JSON

      public static final TopicType JSON
      Topic that stores and publishes JSON (JavaScript Object Notation) values. Based on the JSON data type.

      Supports delta-streams.

      Since:
      5.7
    • BINARY

      public static final TopicType BINARY
      Topic that stores and publishes binary values. Based on the binary data type.

      Supports delta-streams.

      Since:
      5.7
    • RECORD_V2

      public static final TopicType RECORD_V2
      Topic that stores and publishes data in the form of records and fields. Based on the RecordV2 data type.

      Supports delta-streams.

      Since:
      6.0
    • DOUBLE

      public static final TopicType DOUBLE
      Topic that stores and publishes IEEE 754 double-precision floating point numbers. Based on the double data type.

      Supports null Double values.

      The topic does not support delta-streams — only complete values are transmitted.

      Since:
      6.0
    • INT64

      public static final TopicType INT64
      Topic that stores and publishes 64-bit integer values. Based on the int64 data type.

      Supports null Long values.

      The topic does not support delta-streams — only complete values are transmitted.

      Since:
      6.0
    • STRING

      public static final TopicType STRING
      Topic that stores and publishes String values. Based on the string data type.

      Supports null String values.

      Supports delta-streams.

      Since:
      6.0
    • TIME_SERIES

      public static final TopicType TIME_SERIES
      Time Series Topic.

      A time series is a sequence of events. Each event contains a value and has server-assigned metadata comprised of a sequence number, timestamp, and author.

      A time series topic allows sessions to access a time series that is maintained by the server. A time series topic has an associated event data type, such as Binary, String, or JSON, that determines the type of value associated with each event.

      Retained range

      The TIME_SERIES_SUBSCRIPTION_RANGE property configures the range of historic events retained by a time series topic. If the property is not specified, a time series topic will retain the ten most recent events.

      Subscription range

      The TIME_SERIES_SUBSCRIPTION_RANGE property configures a time series topic to send a range of historic events from the end of the time series to new subscribers. This is a convenient way to synchronize new subscribers without requiring the use of a range query.

      By default, new subscribers will be sent the latest event if delta streams are enabled and no events if delta streams are disabled. See the description of Subscription range in the time series feature documentation.

      Mandatory properties

      The TIME_SERIES_EVENT_VALUE_TYPE property must be provided when creating a time series topic.

      Since:
      6.0
      See Also:
    • UNKNOWN_TOPIC_TYPE

      public static final TopicType UNKNOWN_TOPIC_TYPE
      A topic type that is unsupported by the session.
      Since:
      6.1
  • Method Details

    • values

      public static TopicType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TopicType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null