rabbitmq 公共交通例外

yqkkidmi  于 2023-01-13  发布在  RabbitMQ
关注(0)|答案(1)|浏览(179)

在应用程序中,公共交通系统会抛出哪些异常?
我正在使用带有RabbitMQ的大众运输系统。我想知道我们应该从大众运输系统中捕获哪些异常。
你有类似API的文档吗?(希望它能描述错误)

9wbgstp7

9wbgstp71#

以下是MassTransit可能抛出的异常列表:

MassTransit.MessageData.DecodeException: Thrown when the message body cannot be decoded.
MassTransit.MessageData.EncodingException: Thrown when the message body cannot be encoded.
MassTransit.MessageData.MissingContentTypeException: Thrown when the message does not have a content type.
MassTransit.MessageData.NotFoundException: Thrown when the message cannot be found in the message data store.
MassTransit.MessageData.OptimisticConcurrencyException: Thrown when the message data has been modified since it was last read.
MassTransit.MessageData.StoreException: Thrown when an error occurs while storing or retrieving the message data.
MassTransit.MessageData.TooLargeException: Thrown when the message size exceeds the maximum allowed size.
MassTransit.Pipeline.Filters.CircuitBreakerException: Thrown when the circuit breaker is open.
MassTransit.Pipeline.Filters.ConcurrencyException: Thrown when the filter concurrency limit is reached.
MassTransit.Pipeline.Filters.RetryException: Thrown when the filter retry limit is reached.

请注意,这不是一个详尽的列表,根据您的具体实现,MassTransit可能会抛出其他异常。
我建议您检查代码,看看是否添加了更多的异常,如果需要捕获它们,请进行检查。
记住例外不是口袋妖怪,你不必抓住他们所有:)
https://github.com/MassTransit/MassTransit/search?q=throw&type=commits

相关问题