Options
All
  • Public
  • Public/Protected
  • All
Menu

Describes a stream layer.

Hierarchy

  • StreamLayerClient

Index

Constructors

Properties

catalogHrn: HRN
layerId: string
subscribtionNodeBaseUrl?: string
xCorrelationId?: string

Methods

  • getData(message: Message, abortSignal?: AbortSignal): Promise<Response>
  • Consumes data from a layer. Returns messages from a stream layer. If the data size is less than 1 MB, the data field will be populated. If the data size is greater than 1 MB, a data handle will be returned pointing to the object stored in the Blob store.

    Parameters

    • request: PollRequest

      The PollRequest instance of the configured request parameters.

    • Optional abortSignal: AbortSignal

      A signal object that allows you to communicate with a request (such as the fetch request) and, if required, abort it using the AbortController object.

      For more information, see the AbortController documentation.

    Returns Promise<Message[]>

    Messages [[StreamApi.Messages]] from a stream layer

  • seek(request: SeekRequest, abortSignal?: AbortSignal): Promise<Response>
  • Method allows to start reading data from a specified offset. The message pointer can be moved to any offset in the layer (topic). Message consumption will start from that offset. Once you seek to an offset, there is no returning to the initial offset, unless the initial offset is saved.

    Parameters

    • request: SeekRequest

      The SeekRequest instance of the configured request parameters.

    • Optional abortSignal: AbortSignal

      A signal object that allows you to communicate with a request (such as the fetch request) and, if required, abort it using the AbortController object.

      For more information, see the AbortController documentation.

    Returns Promise<Response>

    Response with status 200 if success.

  • subscribe(request: SubscribeRequest, abortSignal?: AbortSignal): Promise<string>
  • Enables message consumption from a specific stream layer. Use the base path returned from the API Lookup service. For mode = parallel, one unit of parallelism currently equals 1 MBps inbound or 2 MBps outbound, whichever is greater, rounded up to the nearest integer. The number of subscriptions within the same group cannot exceed the parallelism allowed. For more details see Get Data from a Stream Layer

    Parameters

    • request: SubscribeRequest

      The SubscribeRequest instance of the configured request parameters.

    • Optional abortSignal: AbortSignal

      A signal object that allows you to communicate with a request (such as the fetch request) and, if required, abort it using the AbortController object.

      For more information, see the AbortController documentation.

    Returns Promise<string>

    Subscription Id

Generated using TypeDoc