Comments (10)
Hi Omar
Thanks for reporting this issue, 2 is the default concurrency, can you please try latest Rqueue version 2.7.0 and report this here if issue persist.
Also, you have set concurrency to 10-20, so it should scale this to 20 workers.
Also, you can add a debugger here to check why this is not polling upto 20 messages
The semaphore permits should be 20 and it should increase/decrease based on the listener message consumption pattern.
I just tried for one queue, with same concurrency for testing on latest version 2.7.0 see the screen recorder here.
from rqueue.
Hi Sonus,
I already use V 2.7.0 .I will try to debug the app from the point you mentioned and get back to you regarding it.
for now here is a copy of my pom.xml dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.github.sonus21</groupId>
<artifactId>rqueue-spring-boot-starter</artifactId>
<version>2.7.0-RELEASE</version>
</dependency>
and here is the output of java -showversion
command
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
from rqueue.
from rqueue.
Hi Sonus,
I tried to remove the bounding and set it to 20 without a lower bound .
I still have only two working consumers (consumer 1 & 2) .
I tried to debug the semaphore state and queueThreads size. the state was set to 20 and the queueThreadSize is always 0 or 1 or 2 . I tried to trace it back to why this thing happens but wasn't able to pinout the problem.
in one case while debugging there was 20 running job but they were more like idle running jobs and the queue only proceeded 2 jobs per time. I wasn't able to reproduce this case to further debug it.
here is my project if you wish to check it out.
debuq-rqueue.zip
from rqueue.
Hi Omar
If I understand correctly, you observed Rqueue is processing only 2 jobs once and you can't replicate this issue as now it's processing 20 jobs at a time?
On my machine, its processing ~20 jobs always and I have enqueued 1 million jobs.
Btw what do you mean by this line?
in one case while debugging there was 20 running job but they were more like idle running jobs and the queue only proceeded 2 jobs per time.
from rqueue.
Anyway, I've a theory that could potentially explain why this happens, your job is taking sub milli seconds to process(since it does nothing, if you add some work like sleep or some http call that takes time you can see the effect), around similar time is taken by message poller to poll the message.
So what's happening now is,
the time message poller takes to poll a message
~ the time your listener takes to execute a message
So there's no advantage of increasing the listener count. Here we need to increase message poller count that's currently not supported.
from rqueue.
Hi @OmarBish
Would you like to give a try to a new release candidate? You can also deploy to local maven to see if things are working as expected, branch https://github.com/sonus21/rqueue/tree/pause-unpause
And I'm removing Bug label from this as this does not seem to be a bug. I did some experiments to see how many jobs can be processed by Rqueue in a second, it seems it can process 6-8K jobs using 20 threads and 2 milliseconds as execution time.
You can also run this test on your machine to see what happens
from rqueue.
Hi @sonus21 ,
I also did some more testing and it turned out as you mentioned
the result of my tests were as follow:
- with thread sleep of 20 ms i have 2 concurrent threads
- with thread sleep of 200 ms i have 5-6 concurrent threads
- with thread sleep of 2000 ms i have the full capacity of the pool (20 thread)
I will run the test that you send and give you the results . also i will test the new release ^-^ .
thank you for your great support.
from rqueue.
Hi Omar
There's a bug in the code, so you need to try the latest code from pause-unpause branch. BatchSize was ignore and it's using default value(10).
Let me know the performance metrics, one thing I've observed on my system is it runs out of connection with local redis, so I get many errors and many jobs goes for retry. Not sure about your setup so I can't comment, how it's able to cope with the demand when your concurrency is high and batchsize is high too.
from rqueue.
One improved version 2.8.0 has been released to fix this issue at some extent.
from rqueue.
Related Issues (20)
- what is the sonatypeUsername and sonatypePassword? HOT 3
- Serialization support java time module HOT 1
- Deleted messages are kept in memory HOT 5
- Add static resource mapping handler when rqueue.web.url.prefix is set HOT 5
- Weighted priorisation with maximum concurrency HOT 2
- Question: Re-starting processing task when system restarts HOT 7
- Do you plan to use spring-cloud-sleuth to propagate the traceId? HOT 5
- Dashboard shows empty even thought Rqueue is working fine HOT 13
- Question: Integration scenario with multiple queues HOT 4
- rqueue workflow discussion HOT 4
- Support of jackson-databind 2.16.0 HOT 3
- Login/pass for queue dashboard HOT 4
- Lack of available threads HOT 2
- Service-Level Concurrency Control HOT 1
- IllegalArgumentException when accessing queue details HOT 1
- springboot 3.2 can not work HOT 5
- springboot 2.7 can not work HOT 9
- Typo in dashboard text HOT 2
- RQueue attempting to bootstrap despite being "disabled" HOT 1
- Best practice of initializing a queue (producer only) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rqueue.