Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EventHubConnectionConfig

Package version

Describes the connection config object that is created after parsing an EventHub connection string. It also provides some convenience methods for getting the address and audience for different entities.

Hierarchy

Index

Properties

connectionString

connectionString: string
property

{string} connectionString - The connection string.

endpoint

endpoint: string
property

{string} endpoint - The service bus endpoint "sb://.servicebus.windows.net/".

entityPath

entityPath: string
property

{string} entityPath - The name/path of the entity (event hub name) to which the connection needs to happen.

host

host: string
property

{string} host - The host ".servicebus.windows.net".

sharedAccessKey

sharedAccessKey: string
property

{string} sharedAccessKey - The secret value of the access key.

sharedAccessKeyName

sharedAccessKeyName: string
property

{string} sharedAccessKeyName - The name of the access key.

Optional webSocket

webSocket: WebSocketImpl
property

{WebSocketImpl} [webSocket] - The WebSocket constructor used to create an AMQP connection over a WebSocket. In browsers, the built-in WebSocket will be used by default. In Node, a TCP socket will be used if a WebSocket constructor is not provided.

Optional webSocketConstructorOptions

webSocketConstructorOptions: any
property

{any} [webSocketConstructorOptions] - Options to be passed to the WebSocket constructor

Optional webSocketEndpointPath

webSocketEndpointPath: undefined | string
property

{string} [webSocketEndpointPath] - The path for the endpoint that accepts an AMQP connection over WebSockets.

Methods

getManagementAddress

  • getManagementAddress(): string

getManagementAudience

  • getManagementAudience(): string

getReceiverAddress

  • getReceiverAddress(partitionId: string | number, consumergroup?: undefined | string): string
  • Provides the EventHub Receiver address:

    • "<hub-name>/ConsumerGroups/<consumer-group-name>/Partitions/<partition-id>"

    Parameters

    • partitionId: string | number

      The partitionId in the EventHub from which messages will be received.

    • Optional consumergroup: undefined | string

      The consumergoup in the EventHub from which the messages will be received. Default: $default.

    Returns string

getReceiverAudience

  • getReceiverAudience(partitionId: string | number, consumergroup?: undefined | string): string
  • Provides the EventHub Receiver audience.

    • "sb://<your-namespace>.servicebus.windows.net/<hub-name>/ConsumerGroups/<consumer-group-name>/Partitions/<partition-id>"

    Parameters

    • partitionId: string | number

      The partitionId in the EventHub from which messages will be received.

    • Optional consumergroup: undefined | string

      The consumergoup in the EventHub from which the messages will be received. Default: $default.

    Returns string

getSenderAddress

  • getSenderAddress(partitionId?: string | number): string

getSenderAudience

  • getSenderAudience(partitionId?: string | number): string
  • Provides the EventHub Sender audience in one of the following forms based on the input:

    • "sb://<yournamespace>.servicebus.windows.net/<hubName>"
    • "sb://<yournamespace>.servicebus.windows.net/<hubName>/Partitions/<partitionId>"

    Parameters

    • Optional partitionId: string | number

      The partitionId in the EventHub to which messages will be sent.

    Returns string

Object literals

ConnectionConfig

ConnectionConfig: object

Describes the ConnectionConfig module

module

ConnectionConfig

create

validate

Generated using TypeDoc