Class RemoteStreamRegistry<M>

java.lang.Object
io.camunda.zeebe.transport.stream.impl.RemoteStreamRegistry<M>
Type Parameters:
M - the type of the properties of the stream.

public class RemoteStreamRegistry<M> extends Object
A registry for remote streams. The streams are typically between broker and the gateway, where the broker pushes data to the stream and the gateway consumes them.

A stream is uniquely identified by the streamId and the receiver. A stream has also an associated type and properties. Two streams with the same type and properties can consume the same data.

  • Constructor Details

  • Method Details

    • add

      public void add(org.agrona.concurrent.UnsafeBuffer streamType, UUID streamId, MemberId receiver, M properties)
      Adds a stream receiver that can receive data from the stream with the given streamType.
      Parameters:
      streamType - type of the stream
      streamId - id of the stream. The pair (receiver, streamId) must uniquely identify the stream.
      receiver - The id of the node that receives data from the stream
      properties - properties used by the producer to generate data to be pushed to the stream
    • remove

      public void remove(UUID streamId, MemberId receiver)
      Removes the stream.
      Parameters:
      streamId - id of the stream
      receiver - The id of the node that receives data from the stream
    • removeAll

      public void removeAll(MemberId receiver)
      Removes all stream from the given receiver
      Parameters:
      receiver - id of the node
    • get

      public Set<io.camunda.zeebe.transport.stream.impl.AggregatedRemoteStream<M>> get(org.agrona.concurrent.UnsafeBuffer streamType)
    • clear

      public void clear()