Class: Request

Request(destinationTopic)

Request messages are sent using the Client#asyncRequest method of a client instance. Request messages are used when invoking a method on a remote service. This communication is one-to-one where a client sends a request to a service instance and in turn receives a response.

Constructor

new Request(destinationTopic)

Parameters:
Name Type Description
destinationTopic String

The topic to publish the event to.

Source:

Extends

Members

brokerIds :Array.<String>

The set of broker identifiers that the message is to be routed to. Setting this value will limit which brokers the message will be delivered to. This can be used in conjunction with Message#clientIds.

Type:
  • Array.<String>
Inherited From:
Default Value:
  • []
Source:

clientIds :Array.<String>

The set of client identifiers that the message is to be routed to. Setting this value will limit which clients the message will be delivered to. This can be used in conjunction with Message#brokerIds.

Type:
  • Array.<String>
Inherited From:
Default Value:
  • []
Source:

destinationTenantGuids :Array.<String>

The set of tenant identifiers that the message is to be routed to. Setting this value will limit which clients the message will be delivered to. This can be used in conjunction with Message#brokerIds and Message#clientIds.

Type:
  • Array.<String>
Inherited From:
Default Value:
  • []
Source:

destinationTopic :String

The topic to publish the message to.

Type:
  • String
Inherited From:
Source:

messageId :String

Unique identifier for the message (UUID).

Type:
  • String
Inherited From:
Source:

messageType :Number

The numeric type of the message.

Type:
  • Number
Overrides:
Default Value:
  • null
Source:

otherFields :Object

Returns an object containing the set of additional fields associated with the message. These fields can be used to add "header" like values to the message without requiring modifications to be made to the payload.

Type:
  • Object
Inherited From:
Default Value:
  • {}
Source:

payload :Buffer|String

The application-specific payload of the message.

Type:
  • Buffer | String
Inherited From:
Default Value:
  • ''
Source:

replyToTopic :string

The topic that the Response to this request will be sent to.

Type:
  • string
Default Value:
  • ''
Source:

serviceId :string

The identifier of the service that this request will be routed to. If an identifier is not specified, the initial broker that receives the request will select the service to handle the request (round-robin by default).

Type:
  • string
Default Value:
  • ''
Source:

sourceBrokerId :string

The identifier of the DXL broker that the message's originating client is connected to (set by the initial broker).

Type:
  • string
Inherited From:
Default Value:
  • ''
Source:

sourceClientId :string

The identifier of the DXL client that sent the message (set by the broker that initially receives the message)

Type:
  • string
Inherited From:
Default Value:
  • ''
Source:

sourceTenantGuid :String

The tenant identifier of the DXL client that sent the message (set by the broker that initially receives the message).

Type:
  • String
Inherited From:
Default Value:
  • ''
Source:

version :Number

The version of the DXL message (used to determine the features that are available).

Type:
  • Number
Inherited From:
Default Value:
  • 2
Source: