Main Content


Event stream name

Since R2022b

    This function requires Streaming Data Framework for MATLAB® Production Server™.



    name = identifyingName(stream) returns the name that uniquely identifies an event stream. If the stream provider is Kafka®, this name is the name of the topic that the stream is connected to.


    collapse all

    Assume that you have a Kafka server running at the network address that has a topic CoolingFan.

    Create an object for reading from and writing to the Kafka topic CoolingFan.

    ks = kafkaStream("",9092,"CoolingFan")
    ks = 
      KafkaStream with properties:
                      Topic: "CoolingFan"
                    GroupID: "425b8750-87ee-4d86-8e06-6f1a1ebfe009"
                      Order: EventTime
                       Host: ""
                       Port: 9092
          ConnectionTimeout: 30
             RequestTimeout: 61
          NumTimeoutRetries: 1
                      State: Idle
                 WindowSize: 0
                KeyVariable: "key"
                KeyEncoding: "utf16"
                    KeyType: "text"
               KeyByteOrder: "BigEndian"
               BodyEncoding: "utf8"
                 BodyFormat: "JSON"
                 ImportBody: 1
              ImportOptions: [0×0]
              ExportOptions: [1×1]
              PublishSchema: 1
                  ReadLimit: "Size"
        TimestampResolution: "Milliseconds"
                 WindowUnit: None
                       Name: "CoolingFan"

    Get the name of the Kafka topic.

    ans = 

    Input Arguments

    collapse all

    Object connected to an event stream, specified as a KafkaStream, InMemoryStream, or TestStream object.

    Version History

    Introduced in R2022b