Class Superstream

java.lang.Object
ai.superstream.Superstream

public class Superstream extends Object
  • Field Details

    • brokerConnection

      public io.nats.client.Connection brokerConnection
    • jetstream

      public io.nats.client.JetStream jetstream
    • superstreamJwt

      public String superstreamJwt
    • superstreamNkey

      public String superstreamNkey
    • descriptorAsBytes

      public byte[] descriptorAsBytes
    • descriptor

      public com.google.protobuf.Descriptors.Descriptor descriptor
    • natsConnectionID

      public String natsConnectionID
    • clientID

      public int clientID
    • accountName

      public String accountName
    • learningFactor

      public int learningFactor
    • learningFactorCounter

      public int learningFactorCounter
    • learningRequestSent

      public boolean learningRequestSent
    • ProducerSchemaID

      public String ProducerSchemaID
    • ConsumerSchemaID

      public String ConsumerSchemaID
    • SchemaIDMap

      public Map<String,com.google.protobuf.Descriptors.Descriptor> SchemaIDMap
    • config

      public Map<String,?> config
    • clientCounters

      public SuperstreamCounters clientCounters
  • Constructor Details

  • Method Details

    • close

      public void close()
    • registerClient

      public void registerClient(Map<String,?> configs)
    • sendClientTypeUpdateReq

      public void sendClientTypeUpdateReq(String clientType)
    • subscribeToUpdates

      public void subscribeToUpdates()
    • reportClientsUpdate

      public void reportClientsUpdate()
    • sendLearningMessage

      public void sendLearningMessage(byte[] msg)
    • sendRegisterSchemaReq

      public void sendRegisterSchemaReq()
    • jsonToProto

      public byte[] jsonToProto(byte[] msgBytes) throws IOException
      Throws:
      IOException
    • protoToJson

      public byte[] protoToJson(byte[] msgBytes, com.google.protobuf.Descriptors.Descriptor desc) throws IOException
      Throws:
      IOException
    • sendGetSchemaRequest

      public void sendGetSchemaRequest(String schemaID)
    • handleError

      public void handleError(String msg)
    • normalizeClientConfig

      public static Map<String,Object> normalizeClientConfig(Map<String,?> javaConfig)
    • initSuperstreamConfig

      public static Map<String,Object> initSuperstreamConfig(Map<String,Object> configs)
    • initSuperstreamProps

      public static Properties initSuperstreamProps(Properties properties)