Open Closed

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

ElifKaya created


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)
  • 0
    liangshiwei created
    Support Team


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

    See the document:

    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.