質問

We are using Apache Camel for our Integration layer.We have handfull of WebService we call them using camel-cxf component.Everthing is fine. Now our client wants to do a ping service before WebService call.If ping service fails sent WebSevice request to a different endpoint. Juste needed your suggestion,does camel have a component that acts as a TCP producer and do a ping service to TCP endpoint ?

Thanks!

役に立ちましたか?

解決

You can use either the Netty or Mina component for plain TCP or UDP connections (both producer and consumer).

Please note that a real PING is not TCP but an ICMP echo request which is something totally different.

If you want a quick test to make sure everything is fine before making the WS call - I think a very simple HTTP echo service should serve that purpose much better. The reason is that HTTP tend to travel other paths than generic TCP/UDP. I.e. proxies, firewalls, gateways and whatnot. To make sure you are able to get your request through, doing the test over the same protocol is probably better (although maybe somewhat slower). You might have very specific requirements - this is just a generic advice.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top