8000 Consumer Message Lagging on High CPU Load · Issue #1587 · dotnetcore/CAP · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Consumer Message Lagging on High CPU Load #1587
Closed
@kl-tie

Description

@kl-tie

Hi, there was an issue with the message lag when our consumer app was currently having high CPU load on other processes that sometimes take up to 100% for a long period. The consumers stop consuming the message, and the message lag has been keep increasing until we have to restart the app. The consumers in our app are critical and need to be highly prioritized.

Could we make the consumers' thread have the highest priority than the other processes?

Our setups:

  • ASP.NET Core 6.0
  • DotNetCore.CAP 7.2.0
  • Redpanda 24.1.9 as Kafka broker
  • PostgreSQL 16

Reproduceable repo: https://github.com/kl-tie/dotnetcore-cap-test

Steps to reproduce:

  1. Clone the repo.
  2. Build the Docker image using the script inside docker-build.bat.
  3. Run Docker Compose file using docker-compose.yml.
  4. Open http://localhost:8080/topics/transaction?p=-1&s=50&o=-1#consumers for monitoring the message lag.
  5. Open http://localhost:1234/swagger/index.html and hit /api/stress-test/cpu endpoint to simulate the high CPU usage.
  6. The app will have 100% CPU utilization and all incoming messages will be stop processed. You can use the included DotNetCap.Publisher console app to produce a message.

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

      0