Class: Response

Response(request)

Response messages are sent by service instances upon receiving Request messages. Response messages are sent using the Client#sendResponse method of a client instance. Clients that are invoking the service (sending a request) will receive the response via the callback specified when invoking the Client#asyncRequest method.

Constructor

new Response(request)

Parameters:
Name Type Description
request Request

The Request message that this is a response for.

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>
Overrides:
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>
Overrides:
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:

request :Request

The Request message that this is a response for.

Type:
Source:

requestMessageId :String

Unique identifier (UUID) for the Request message that this message is a response for. This is used by the invoking Client to correlate an incoming Response message with the Request message that was initially sent by the client.

Type:
  • String
Source:

serviceId :string

The identifier of the service that sent this response (the service that the corresponding Request was routed to).

Type:
  • string
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: