You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Franz Bettag <fr...@bett.ag> on 2010/01/05 00:48:40 UTC

Thrift over AMQP on Java?

Hi,

i am doing a Java Project having to use existing Thrift-over-AMQP resources. Sadly i was unable
to find any documentation on how to get Thrift and AMQP working on Java (1.6).

If someone could gimme a link or something, that would enough to figure out the rest by mysqlf. :)

I am using thrift 0.2.0 (libjar) on rabbitmq 1.7.0 (and rabbitmq's amqp java lib).

Thanks in advance!


best regards,

franz

Re: Thrift over AMQP on Java?

Posted by Esteve Fernandez <es...@sindominio.net>.
Hi Franz!

> Hi,
>
> i am doing a Java Project having to use existing Thrift-over-AMQP resources.
> Sadly i was unable
> to find any documentation on how to get Thrift and AMQP working on Java (1.6).
>
> If someone could gimme a link or something, that would enough to figure out
> the rest by mysqlf. :)
>
> I am using thrift 0.2.0 (libjar) on rabbitmq 1.7.0 (and rabbitmq's amqp java
> lib).

Have you had a look at txAMQP[1]? It's written in Python (using the
event-driven framework Twisted), and it supports seamless integration with
txThrift (the Twisted port of Thrift, compatible with the rest of the Thrift
stack). It's been in development for over two years already (although its
first public release was in August 2008), so I'd say it's fairly mature and
has gained some widespread use.

I'm saying this, because you could borrow several ideas from it and apply them
to Java, it would be great if both projects could interoperate. txAMQP +
txThrift uses the SOA-over-ESB pattern [2], which is fairly standard.

The only problem I see here is that both the standard Thrift and AMQP Java
libraries are blocking, so it means that a mechanism for supporting
asynchronous messaging delivery has to be built (a basic_deliver may happen at
any time). You can either use threads and multiple Thrift clients, or add
support for an event-driven Java framework in Thrift and AMQP.

I have some ideas of how to integrate Apache MINA [3] (a very popular
asynchronous framework in Java) with Thrift and AMQP, let me know if you're
interested.

Cheers.

1 - http://launchpad.net/txamqp
2 - http://www.openamq.org/tutorial:soa Although this tutorial uses OpenAMQ,
txAMQP supports Qpid and RabbitMQ too, this link just describes the SOA
pattern
3 - http://mina.apache.org/