EventHubConnectionConfig interface
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.
- Extends
Properties
| entity |
The name/path of the entity (event hub name) to which the connection needs to happen. |
Inherited Properties
| connection |
The connection string. |
| endpoint | The service bus endpoint "sb://<yournamespace>.servicebus.windows.net/". |
| host | The host "<yournamespace>.servicebus.windows.net". |
| shared |
The secret value of the access key. |
| shared |
The name of the access key. |
| web |
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. |
| web |
Options to be passed to the WebSocket constructor |
| web |
The path for the endpoint that accepts an AMQP connection over WebSockets. |
Methods
| get |
Provides the EventHub Management address.
|
| get |
Provides the EventHub Management audience.
|
| get |
Provides the EventHub Receiver address:
|
| get |
Provides the EventHub Receiver audience.
|
| get |
Provides the EventHub Sender address in one of the following forms based on the input:
|
| get |
Provides the EventHub Sender audience in one of the following forms based on the input:
|
Property Details
entityPath
The name/path of the entity (event hub name) to which the connection needs to happen.
entityPath: string
Property Value
string
Inherited Property Details
connectionString
The connection string.
connectionString: string
Property Value
string
Inherited From ConnectionConfig.connectionString
endpoint
The service bus endpoint "sb://<yournamespace>.servicebus.windows.net/".
endpoint: string
Property Value
string
Inherited From ConnectionConfig.endpoint
host
The host "<yournamespace>.servicebus.windows.net".
host: string
Property Value
string
Inherited From ConnectionConfig.host
sharedAccessKey
The secret value of the access key.
sharedAccessKey: string
Property Value
string
Inherited From ConnectionConfig.sharedAccessKey
sharedAccessKeyName
The name of the access key.
sharedAccessKeyName: string
Property Value
string
Inherited From ConnectionConfig.sharedAccessKeyName
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.
webSocket?: WebSocketImpl
Property Value
WebSocketImpl
Inherited From ConnectionConfig.webSocket
webSocketConstructorOptions
Options to be passed to the WebSocket constructor
webSocketConstructorOptions?: any
Property Value
any
Inherited From ConnectionConfig.webSocketConstructorOptions
webSocketEndpointPath
The path for the endpoint that accepts an AMQP connection over WebSockets.
webSocketEndpointPath?: string
Property Value
string
Inherited From ConnectionConfig.webSocketEndpointPath
Method Details
getManagementAddress()
Provides the EventHub Management address.
"<hub-name>/$management"
function getManagementAddress(): string
Returns
string
getManagementAudience()
Provides the EventHub Management audience.
"sb://<your-namespace>.servicebus.windows.net/<hub-name>/$management"
function getManagementAudience(): string
Returns
string
getReceiverAddress(string | number, string)
Provides the EventHub Receiver address:
"<hub-name>/ConsumerGroups/<consumer-group-name>/Partitions/<partition-id>"
function getReceiverAddress(partitionId: string | number, consumergroup?: string): string
Parameters
- partitionId
-
string | number
The partitionId in the EventHub from which messages will be received.
- consumergroup
-
string
The consumergoup in the EventHub from which the messages will
be received. Default: $default.
Returns
string
getReceiverAudience(string | number, string)
Provides the EventHub Receiver audience.
"sb://<your-namespace>.servicebus.windows.net/<hub-name>/ConsumerGroups/<consumer-group-name>/Partitions/<partition-id>"
function getReceiverAudience(partitionId: string | number, consumergroup?: string): string
Parameters
- partitionId
-
string | number
The partitionId in the EventHub from which messages will be received.
- consumergroup
-
string
The consumergoup in the EventHub from which the messages will
be received. Default: $default.
Returns
string
getSenderAddress(string | number)
Provides the EventHub Sender address in one of the following forms based on the input:
"<hubName>""<hubName>/Partitions/<partitionId>"
function getSenderAddress(partitionId?: string | number): string
Parameters
- partitionId
-
string | number
The partitionId in the EventHub to which messages will be sent.
Returns
string
getSenderAudience(string | number)
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>"
function getSenderAudience(partitionId?: string | number): string
Parameters
- partitionId
-
string | number
The partitionId in the EventHub to which messages will be sent.
Returns
string