Search code examples
javaamqpqpid

AMQP 1.0 library for Java with full peer-to-peer (brokerless) support?


Regarding the question above: Is there a Java library for AMQP 1.0 which fully supports peer-to-peer (point-to-point, brokerless) functionality?

The part that I am missing is the functionality for opening a local port for messages incoming directly without going through a broker.

So far I have used the SwiftMQ AMQP 1.0 Client library which is fine for sending and receiving through a broker (used RabbitMQ server here without any flaws) and also for sending directly to another endpoint.

The other endpoint is written in C#, using the AMQPNetLite library. I found out that the AMQPNetLite lib provided the mentioned functionality through the ContainerHost class (see also here).

My best guess is that the QPID Proton-J somehow supports what I am looking for, but documentation and examples are rare. The Python variant of the QPID Proton library also shows the Container class in this example. However, neither the Container class nor something that seems similar is not contained in the QPID Proton-J (Java) lib.

Yes, I also saw this question, which makes me doubt that what I search for exists at all...

Any help would be greatly appreciated.


Solution

  • There aren't any actively maintained Java peer-to-peer capable implementations that I'm aware of. The proton-j project has a rather old experimental API called reactor that can do that but is not maintained and likely has a fair amount of bugs. The vertx-proton project has a relatively naive server based implementation that might work for you but I don't know how actively maintained it is so you'd have to try it out and see how it goes.

    You could write your own although the AMQP protocol has many complexities so you need to weigh how important peer-to-peer is vs something like an embedded broker or simple message router. There is some basic AMQP server code here that be a start on writing your own proton-j based mechanism.