Skip to content

Allow configuration for FailureInfoStorage #1393

@RolandKoenig

Description

@RolandKoenig

Describe the suggested improvement

Is your improvement related to a problem? Please describe.

We encountered the problem that FailureInfoStorage collected a huge amount of DbUpdateExceptions as a result of a database outage (not the NServiceBus database). The problem on this case is:

  • DbUpdateException holds a reference to the originating DbContext (we are using EntityFramework Core)
  • FailureInfoStorage collects up to 10000 exceptions (10000 is a hardcoded value, see SqlServerTransportInfrastructure.SelectProcessStrategy)

Describe the suggested solution

I can imagine a few ways to solve this

  • Allow to configure maximum entries in FailureInfoStorage (10000 as default are far to many for this situation)
  • Allow to manipulate how exceptions are stored (do we even need those exception objects?)

Describe alternatives you've considered

The only alternative way I have in mind is to wrap all message handlers and catch DbUpdateExceptions there and throw a CustomException instead. I would consider that as workaround

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions