Open Closed

Queue messages is "unacked" state when using RabbitMq with AbpRabbitMqBackgroundJobOptions #2945


User avatar
0
ElifKaya created

Hi,

Queues can not be moved from "unacked" to "ready" when I use AbpRabbitMqBackgroundJobOptions.

And also, I tried this from this link https://github.com/abpframework/abp/issues/7066. But it doesn't work.

 options.Connections.Default = new ConnectionFactory() { DispatchConsumersAsync = true };   // the result did not change ???
 

Can you explain this problem, please?

Thanks,

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

ABP Framework version: v5.1.1

UI type: / MVC /

DB provider: EF Core

Tiered (MVC) or Identity Server Separated (Angular): yes / no

Exception message and stack trace:

Steps to reproduce the issue:"


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

    Hi,

    Sorry, I didn't get it, can you explain it in detail?

  • User Avatar
    0
    ElifKaya created

    Hi,

    Sorry, I didn't get it, can you explain it in detail?

    I used AbpRabbitMqOptions to connect RabbitMq and also used AbpRabbitMqBackgroundJobOptions to push my message. I can connect RabbitMQ side and push my messages. But these message is "Unacked" state on queues. I should see "Ready" state.

    In the last example highlighted in red below, you can see that it remains "Unacked". There is no problem when I give my own integration directly to RabbitMq without using ABP integration. But when I use ABP, the status stays "Unacked" on runtime. It should be "Ready". When I stop debugging on Visual Studio, it goes into Ready state. This issue only happens when I use ABP integration.

    I found a similar issue to this here. But this solution didn't work for me. https://github.com/abpframework/abp/issues/7066

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    HI,

    Can you share a simple project with me, shiwei.liang@volosoft.com

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You should have a no-argument constructor.

  • User Avatar
    0
    ElifKaya created

    I saw an example constructor with parameters on Volo.ABP solution.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I'm sure you also saw that it also has a no-argument constructor too : )

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    The point is Job arg class must have a no-argument constructor, It can also have other constructors

  • User Avatar
    0
    ElifKaya created

    The point is Job arg class must have a no-argument constructor, It can also have other constructors

    Now, I understand what you mean, thank you : ) But, when I add to no-argument constructor, message can not be pushed "unacked" or "ready", it never pushed. If I remove no-argument constructor, I can show my message just "Unaked" state.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I guess it is already handled by the job handler

  • User Avatar
    0
    ElifKaya created

    Hi,

    I guess it is already handled by the job handler

    I solved this problem with below BackgroundJobs config. Does this solution affect the operation of the jogs that we will use outside of rabbitmq in the future? Thanks

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    In this way, the background job system has been disabled, Job handlers will not execute anymore.

  • User Avatar
    0
    ElifKaya created

    Hi,

    In this way, the background job system has been disabled, Job handlers will not execute anymore.

    Yes, when I set this property as a False, Job handlers does not execute. But, I could send my message to RabbitMq and then show its details. When I use as a True, I can not push my message in RabbitMq. Why can't I push a message while the BackgroundJob is still running? Can you share a working sample code with me?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    When I use as a True, I can not push my message in RabbitMq.

    Sorry, I didn't get it, I think the message is already handled by the job handler, so you can't see the ready message on the Rabbitmq website. it has been consumed

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    You can place breakpoints on Job handler classes for debugging.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11