Skip to content

requestClient.getResponse hugs when queue does not exists #2

@dpr-dev

Description

@dpr-dev
@Injectable()
export class OrderDetailsService {
  private readonly _client: RequestClient<
    GetOrderDetailsRequest,
    GetOrderDetailsResponse
  >;

  constructor(masstransit: MassTransitService) {
    this._client = masstransit.bus.requestClient<
      GetOrderDetailsRequest,
      GetOrderDetailsResponse
    >({
      exchange: 'order-details',
      requestType: new MessageType(
        'GetOrderDetailsRequest',
        'Contracts.Events.OrderProcessing.Requests',
      ),
      responseType: new MessageType(
        'GetOrderDetailsResponse',
        'Contracts.Events.OrderProcessing.Requests',
      ),
    });
  }

  public getResponse(req: GetOrderDetailsRequest) {
    return this._client.getResponse(req);
  }
}

an error occurred if the order-details queue does not exists but request will never rejected

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions