Open Closed

IDistributedEventBus throw exception when it can not connect to Kafka #3079


User avatar
0
ElifKaya created

Hello,

We publish message to Kafka by using IDistributedEventBus PublishAsync method. If Kafka is not running, application throw exception as "An internal error occurred during your request!". But we have to complete request even if Kafka is not running. We try that using AbpEventBusOptions but we can not find 5.1.1 version. How can handle this exception using ABP Framework.

ABP Framework version: v5.1.1

UI type: MVC

DB provider: EF Core

Tiered (MVC): yes

Exception message and stack trace:

Steps to reproduce the issue:"


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    We introduced Outbox & Inbox patterns instead of RetryStrategy in version 5.0

    See the document: https://docs.abp.io/en/abp/latest/Distributed-Event-Bus#outbox-inbox-for-transactional-events

    BTW, the request is completed even if Kafka is not running. this might make your data inconsistent, I think it's better to throw an exception, so you can fix the Kafka server.

    Anyway, you can use try-catch when publishing an event.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09