Main Content

identifyingName

Event stream name

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

    Description

    example

    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.

    Examples

    collapse all

    Assume that you have a Kafka server running at the network address kafka.host.com:9092 that has a topic CoolingFan.

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

    ks = kafkaStream("kafka.host.com",9092,"CoolingFan")
    ks = 
    
      KafkaStream with properties:
    
                      Topic: "CoolingFan"
                    GroupID: "425b8750-87ee-4d86-8e06-6f1a1ebfe009"
                      Order: EventTime
                       Host: "kafka.host.com"
                       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 matlab.io.stream.event.ImportOptions]
              ExportOptions: [1×1 matlab.io.stream.event.ExportOptions]
              PublishSchema: 1
                  ReadLimit: "Size"
        TimestampResolution: "Milliseconds"
                 WindowUnit: None
                       Name: "CoolingFan"

    Get the name of the Kafka topic.

    identifyingName(ks)
    ans = 
    
        "CoolingFan"

    Input Arguments

    collapse all

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

    Version History

    Introduced in R2022b