简体   繁体   中英

Sending Java Objects over replica tcp sockets

I want to transfer Java POJOs via TCP.

Let A and B be the participants, and C1 be the main connection between them and C2 be another connection to be used if C1 fails.

I have two kinds of objects: reliable and non-reliable.

When C1 disconnects, each non-transmitted objects and new objects should be sent over C2. And if C1 established again it will be the main connection, the data will flow over C1.

The participants may need to recognize duplicate objects.

I don't know so much about ESBs. I looked at Apache Camel a bit.

Which techologies are there to accomplish the problem above? eg can Camel exactly do that? Is it overenginnering?

Which tags, buzzwords best meet the problem above? I asked for more googling.

Thanks.

Take a look at message brokers they are designed for that, such as Apache ActiveMQ or Apache ActiveMQ Artemis. They both allow to plugin custom protols to transfer data as Java Objects, JMS, Stomp, AMQP and so on.

As you want Java POJOs then JMS can do that as it supports javax.jms.ObjectMessage as the transport. Bear in mind that using POJOs is a tight coupling between the systems, and you would often need to have the same classes (eg Java JARs) between them so the POJOs can be serialized/unserialzed over the wire back to the JVM as Java POJOs.

Apache Camel works with JMS using the jms component which can make this easier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM