method RabbitMqBroker.prototype.request
Since 0.1.0
RabbitMqBroker.prototype.request<TReq, TRes>(
topic: string,
message: TReq,
options?: RequestOptions
): Promise<TRes>

Sends a request and awaits a single correlated reply.

Type Parameters

TReq

The request payload type

TRes

The reply payload type

Parameters

topic: string

Destination topic a responder is listening on

message: TReq

The request payload

optional
options: RequestOptions

Reply timeout behavior

Return Type

Promise<TRes>

The reply

Usage

import { RabbitMqBroker } from "messaging-plugin/src/index.ts";