Code Monkey home page Code Monkey logo

Comments (13)

mertkiray avatar mertkiray commented on August 23, 2024 1

Yeah, thanks for the help you saved me a day 👍
I will look for a solution and if I find I will open a PR :)

from rqueue.

sonus21 avatar sonus21 commented on August 23, 2024

Hi @mertkiray
Thanks for reporting issue.
Can you please confirm, if you don't have multiple JobX class in the codebase ?

This issue is likely happening due to the Class.forName is creating different class's object while the listener is expecting different type of object.

Also this can be verified by executing LRANGE command on Redis list rqueue-processing::delayed-queue-job

from rqueue.

mertkiray avatar mertkiray commented on August 23, 2024

@sonus21 I am pretty sure there is no multiple JobX class in the codebase. What can I provide to help you debug the problem?
This is an example entry in the list

{
  "@class": "com.github.sonus21.rqueue.core.RqueueMessage",
  "id": "delayed-queue-job8f333748-763b-4702-bc01-ef5f7255ef5b",
  "queueName": "delayed-queue-job",
  "message": "{\"msg\":\"{\\\"message\\\":\\\"test\\\",\\\"id\\\":\\\"1\\\"}\",\"name\":\"com.octovan.service.redis.queue.JobX\"}",
  "retryCount": null,
  "queuedTime": 1582738630242,
  "processAt": 0,
  "reEnqueuedAt": null,
  "failureCount": 0
}

from rqueue.

mertkiray avatar mertkiray commented on August 23, 2024

I think that it may be due to RedisTemplate defined in RedisUtil.class, any solution to overwrite the redistemplate used in the project to debug?

from rqueue.

sonus21 avatar sonus21 commented on August 23, 2024

No, we can't overwrite that. Can you provide a sample spring code to reproduce this issue?
Also if possible please share spring-messaging and spring-boot versions.

from rqueue.

mertkiray avatar mertkiray commented on August 23, 2024

Let me try to reproduce the issue.

spring-messaging version: 5.2.2.RELEASE
spring-boot versions: 2.2.2.RELEASE

from rqueue.

mertkiray avatar mertkiray commented on August 23, 2024

Hi @sonus21 ,
I was able to reproduce the issue

https://github.com/mertkiray/rqueue-bug

from rqueue.

sonus21 avatar sonus21 commented on August 23, 2024

Thanks, Let me check why this error is occurring. Something strange, I'll update you once I find the root cause.

from rqueue.

mertkiray avatar mertkiray commented on August 23, 2024

Sure waiting for your reply ^^

from rqueue.

sonus21 avatar sonus21 commented on August 23, 2024

Can you please remove devtool dependency and try? This is the culprit, I'm not sure exactly why that's causing this issue. We might have to raise bug to the spring team.

Working Dependencies

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.2.2.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>
	<groupId>test.rqueue</groupId>
	<artifactId>demo</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>demo</name>
	<description>Demo project for Spring Boot</description>

	<properties>
		<java.version>1.8</java.version>
	</properties>

	<dependencies>
		<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-actuator</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-redis</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-security</artifactId>
		</dependency>
		<dependency>
			<groupId>redis.clients</groupId>
			<artifactId>jedis</artifactId>
		</dependency>
		<dependency>
			<groupId>com.github.sonus21</groupId>
			<artifactId>rqueue-spring-boot-starter</artifactId>
			<version>1.3-RELEASE</version>
		</dependency>
	</dependencies>

</project>

from rqueue.

mertkiray avatar mertkiray commented on August 23, 2024

When I removed dev-tools, it worked! :)
But this is definitely an issue with dev-tools, how should we proceed?

from rqueue.

sonus21 avatar sonus21 commented on August 23, 2024

If you don't need devtools then you can remove and in production it's very unlikely you will be using. So this error should not come but you need to test in some test environment to confirm the theory.

Other people are also facing similar issues neo4j/neo4j-ogm#743

from rqueue.

sonus21 avatar sonus21 commented on August 23, 2024

@mertkiray
I can confirm this is a bug in Rqueue lib code. It will be fixed in version 2.0.1 due to release over this weekend. This is happening due to Class.forName uses different class loaders while dev tools provide different class loaders.

from rqueue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.