Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use redis for broker? #29

Open
longpan opened this issue Dec 31, 2020 · 2 comments
Open

how to use redis for broker? #29

longpan opened this issue Dec 31, 2020 · 2 comments

Comments

@longpan
Copy link

longpan commented Dec 31, 2020

It seems that celery-java do not support the redis broker
this is my code:
` Celery client = Celery.builder()
.brokerUri("redis://:M2EzYmNiYzc3Y2IyZWFiNzRhMjkxOGU4ODJiY2YyOTJhOWVmMTQ5YjEwOGZkODFl@10.19.0.11:6379/3")
// .backendUri("rpc://:M2EzYmNiYzc3Y2IyZWFiNzRhMjkxOGU4ODJiY2YyOTJhOWVmMTQ5YjEwOGZkODFl@10.19.0.11:6379/3")
.build();

    try {

        System.out.println(client.submit("tasks.add", new Object[]{1, 2}).get());

// client.submit(TestTask.class, "sum", new Object[]{"a", "b"}).get();
} finally {

    }`

this is the errMsg:
Exception in thread "main" com.geneea.celery.UnsupportedProtocolException: Unsupported protocol: redis. Supported protocols are: amqp, amqps at com.geneea.celery.brokers.CeleryBrokers.createBroker(CeleryBrokers.java:46) at com.geneea.celery.Celery.lambda$new$0(Celery.java:64) at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:160) at com.geneea.celery.Celery.submit(Celery.java:144) at com.caih.api.admin.utils.celery.CeleryUtils.main(CeleryUtils.java:30)

@crabhi
Copy link
Owner

crabhi commented Dec 31, 2020 via email

@longpan
Copy link
Author

longpan commented Dec 31, 2020

Thank you for your answer.
By the way, is there a implement for redis broker ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants