Skip to main content

# SubscribeOptions

    type SubscribeOptions = {
      filter?: SubscriptionFilter;
      resource: string;
      resourceId?: string;
    };

Options for subscribing to a WebSocket resource event.

Either `resourceId` or `filter` must be provided.

## Properties​

### filter?​

    optional filter?: SubscriptionFilter;

Key/value filter criteria applied against Kafka message headers. Cannot be combined with `resourceId`.

#### Example​

    { loanId: ['lo7ee116-ec80-4dbf-b387-14606d0e4807'] }

### resource​

    resource: string;

Name of the resource to subscribe to (case insensitive).

#### Example​

    'serviceOrder'

### resourceId?​

    optional resourceId?: string;

Unique identifier of the specific resource instance to subscribe to. Cannot be combined with `filter`.

#### Example​

    '1e65313c-db09-496c-85ba-bb0758623f93'