Connecting RabbitMQ with Java Actors

166 views
Skip to first unread message

harish...@gmail.com

unread,
Feb 25, 2016, 5:58:05 PM2/25/16
to Akka User List
Hi,
I have an akka actor-java based application. I need to consume RabbitMQ messages in akka java actors. Is there a library I can use?

Thanks.

Guido Medina

unread,
Feb 26, 2016, 8:12:04 AM2/26/16
to Akka User List
As far as my experience with RabbitMQ goes they provide which will start a loop thread and a handler function should be specified.
RMQ Java client: https://www.rabbitmq.com/java-client.html

Your handler function will just forward the message to your intended actor, and your handler should have a reference to the RMQ client so when your actor stops your handler also stops (Life-cycle)
The only challenge there you will face is if you implement some sort of ack.

Anyway when I google "akka rmq" I found this http://www.lightbend.com/activator/template/rabbitmq-akka-stream among other interesting projects.

HTH,

Guido.

Guido Medina

unread,
Feb 26, 2016, 8:13:18 AM2/26/16
to Akka User List
Correction of previous response: As far as my experience with RabbitMQ goes they provide a client which will start a loop thread and a handler function should be specified.

harish...@gmail.com

unread,
Mar 2, 2016, 10:20:08 AM3/2/16
to Akka User List
Thank you.

Pierre

unread,
Mar 3, 2016, 1:00:01 PM3/3/16
to Akka User List

tigerfoot

unread,
Mar 3, 2016, 4:16:12 PM3/3/16
to Akka User List
This is an Akka streams example but I have a simple project here:  https://github.com/gzoller/LateRabbit

In addition to providing a RabbitMQ source for streams, this project allows you to late-acknowledge messages you pull off the queue, which is a nice feature for streams.

ashutos...@games24x7.com

unread,
Mar 4, 2016, 3:31:47 AM3/4/16
to Akka User List
Hi TigerFoot,

Thing is all these git projects are written in scala. And I also have  the similar use case. Was looking for a client b/c this is fairly general use case.
Or I think the handler is the only way in AkkaJava.

Please share your comments....

Thanks and Regards,
Ashutosh Prakash Mishra.
Reply all
Reply to author
Forward
0 new messages