new Policy(overrides)
The default policy for amqp10 clients
Parameters:
Name | Type | Description |
---|---|---|
overrides |
object | override values for the default policy |
Members
connect :object
Type:
- object
Properties:
Name | Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | Options passed into the open performative on initial connection Properties
|
|||||||||||||||||||||||||||||||||
sslOptions |
object | Options used to initiate a TLS/SSL connection, with the exception of the following options all options in this object are passed directly to node's tls.connect method. Properties
|
|||||||||||||||||||||||||||||||||
saslMechanism |
string | null | Allows the sasl mechanism to be overriden by policy |
defaultSubjects
support subjects in link names with the following characteristics:
receiver: "amq.topic/news", means a filter on the ReceiverLink will be made
for messages send with a subject "news"
sender: "amq.topic/news", will automatically set "news" as the subject for
messages sent on this link, unless the user explicitly overrides
the subject.
Properties:
Type | Description |
---|---|
boolean |
receiverLink :object
Type:
- object
Properties:
Name | Type | Default | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
attach |
object | Options passed into the Properties
|
|||||||||||||||||||
credit |
function | A function that determines when (if ever) to refresh the receiver link's credit |
|||||||||||||||||||
creditQuantum |
number | Quantum used in pre-defined credit policy functions |
|||||||||||||||||||
decoder |
function | null | null | The optional decoder used for all incoming data |
||||||||||||||||||
reattach |
boolean | null | null | Whether the link should attempt reattach on detach |
reconnect :Object|null
Options related to the reconnect behavior of the client. If this value is null
reconnect
is effectively disabled
Type:
- Object | null
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
retries |
number | null |
<optional> |
How many times to attempt reconnection |
|
strategy |
string |
<optional> |
'fibonacci' | The algorithm used for backoff. Can be |
forever |
boolean |
<optional> |
Whether or not to attempt reconnection forever |
senderLink :object
Type:
- object
Properties:
Name | Type | Default | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
attach |
object | Options passed into the Properties
|
|||||||||||||||||||
callback |
string | Determines when a send should call its callback ('settle', 'sent', 'none') |
|||||||||||||||||||
encoder |
function | null | null | The optional encoder used for all outgoing sends |
||||||||||||||||||
reattach |
boolean | null | null | Whether the link should attempt reattach on detach |
session :object
Type:
- object
Properties:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | Options passed into the Properties
|
||||||||||||
window |
function | A function used to calculate how/when the flow control window should change |
||||||||||||
windowQuantum |
number | Quantum used in predefined window policies |
||||||||||||
enableSessionFlowControl |
boolean | Whether or not session flow control should be performed at all |
Methods
parseAddress(address) → {object}
Parses an address for use when connecting to an AMQP 1.0 broker
Parameters:
Name | Type | Description |
---|---|---|
address |
string | the address to parse |
Returns:
- Type
- object
parseLinkAddress(address) → {object}
Parses a link address used for creating Sender and Receiver links.
The resulting object has a required name
property (used as the source
address in the attach performative), as well as an optional subject
property
which (if specified) will automatically create a source filter.
Parameters:
Name | Type | Description |
---|---|---|
address |
string | the address to parse |
Returns:
- Type
- object