method RedisStreamsBroker.prototype.respond
Since 0.1.0
RedisStreamsBroker.prototype.respond<TReq, TRes>(
topic: string,
handler: RequestHandler<TReq, TRes>,
): Promise<ISubscription>

Registers a responder whose result is returned to the requesting caller.

Type Parameters

TReq

The request payload type

TRes

The reply payload type

Parameters

topic: string

The request topic to respond on

Invoked per request; its result is returned to the caller

optional
options: SubscribeOptions

Consumer group behavior

Return Type

Promise<ISubscription>

The active subscription

Usage

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