Kind: Interface
Source: packages/microservices/listener-metadata-explorer.ts
Part of: Microservices
MessageRequestProperties describes the request and reply message patterns associated with a microservice listener. It groups the inbound requestPattern with the corresponding outbound replyPattern, allowing metadata exploration tools to identify request-response communication contracts.
Properties
| Property | Type |
|---|---|
requestPattern | PatternMetadata |
replyPattern | PatternMetadata |
Diagram
mermaidgraph LR Listener[Microservice Listener Metadata] --> Properties[MessageRequestProperties] Properties --> Request[requestPattern: PatternMetadata] Properties --> Reply[replyPattern: PatternMetadata] Request --> Incoming[Incoming request message] Reply --> Outgoing[Reply message]
Usage
tsimport type { MessageRequestProperties } from './listener-metadata-explorer';
const messageRequest: MessageRequestProperties = {
requestPattern: {
pattern: 'users.get',
},
replyPattern: {
pattern: 'users.get.reply',
},
};
// Use the metadata when inspecting or documenting listener contracts.
console.log(
`Request pattern: ${messageRequest.requestPattern.pattern}`,
);
console.log(
`Reply pattern: ${messageRequest.replyPattern.pattern}`,
);
AI Coding Instructions
- Keep
requestPatternandreplyPatternpaired when representing request-response message handlers. - Use valid
PatternMetadataobjects for both fields; do not substitute raw strings unless the metadata type explicitly permits them. - Preserve the distinction between request and reply patterns when inspecting listener metadata or generating documentation.
- Update consumers of listener metadata if the shape or semantics of either pattern changes.
Was this page helpful?