IMQClient.remoteCall() method

Sends a call to the remote service method.

Intended to be invoked as this.remoteCall<T>(...arguments) from a method decorated with remote(), which appends the method name for you.

Signature:

protected remoteCall<T>(...args: any[]): Promise<T>;

Parameters

Parameter

Type

Description

args

any[]

the method's own arguments, followed by the remote method name as the last element. An optional trailing IMQDelay (delivery delay) and IMQMetadata (tracing metadata) are consumed by the framework and never reach the service; on a delayed call, trailing undefined placeholders are dropped so service-side defaults still apply.

Returns:

Promise<T>

the service's response payload, cast to T

Remarks

IMQClient.start() must have completed first. Otherwise the request is sent but no reply router is installed, so the returned promise never settles.

Rejections are plain IMQRPCError objects, not Error instances — err instanceof Error is false, and err.stack describes the remote process. The code is IMQ_RPC_CALL_ERROR for a service-side failure and IMQ_RPC_CALL_TIMEOUT once IMQClientOptions.callTimeout elapses (plus any requested delay). With callTimeout unset — the default — a hung service leaves the promise pending indefinitely.

beforeCall and afterCall hook failures are logged as warnings and otherwise ignored.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.