@btravstack/amqp-client
@btravstack/amqp-client
Type Aliases
AmqpClientSettings
ts
type AmqpClientSettings = object;Defined in: amqp-client/src/index.ts:9
The deployment settings needed to open a publisher connection.
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
connectTimeoutMs? | readonly | number | amqp-client/src/index.ts:11 |
url | readonly | string | amqp-client/src/index.ts:10 |
AnyAmqpContract
ts
type AnyAmqpContract = Parameters<typeof TypedAmqpClient.create>[0]["contract"];Defined in: amqp-client/src/index.ts:6
A contract accepted by the underlying typed AMQP client.
Functions
amqpClient()
ts
function amqpClient<C, Settings, ClientId, SettingsId>(
port,
contract,
settings
): Provider<PortInstance<ClientId, TypedAmqpClient<C>>, ConnectionError, PortInstance<SettingsId, Settings> | Scope> & object;Defined in: amqp-client/src/index.ts:15
Bind a typed AMQP client to an application port for the lifetime of the DI scope.
Type Parameters
| Type Parameter |
|---|
C extends ContractDefinition |
Settings extends AmqpClientSettings |
ClientId extends string |
SettingsId extends string |
Parameters
| Parameter | Type |
|---|---|
port | PortClassOf<ClientId, TypedAmqpClient<C>> |
contract | C |
settings | PortClassOf<SettingsId, Settings> |
Returns
Provider<PortInstance<ClientId, TypedAmqpClient<C>>, ConnectionError, PortInstance<SettingsId, Settings> | Scope> & object