开发者

Apache Camel ESB for C# and Java EDA

开发者 https://www.devze.com 2022-12-31 04:52 出处:网络
We are looking at integrating some of our coarse grained business Services using an Event Driven Architecture (EDA) and the server side of these Services (REST) are implemented in both Java and .NET (

We are looking at integrating some of our coarse grained business Services using an Event Driven Architecture (EDA) and the server side of these Services (REST) are implemented in both Java and .NET (C#). We originally thought of using RabbitMQ (and AMQP protocol) as a neutral and open means (with good client support in these two languages), but it means having to support another runtime (Erlang) alongside Java and the CLR. We are also looking at Apache qPid as that has a Java broker implementation of the AMQP protocol which might eliminate that concern.

Does anyone have any experience of trying to use the richer Apache开发者_运维问答 Camel ESB on top of ActiveMQ to integrate Java and .NET Services in a Pub-Sub EDA manner? Have I missed any other possible suggestions as to a route through this?

Thanks


One of the ESB use-cases that Camel really shines is 'Routing'. As far as i know there is no .NET port of the camel routing engine. So you will not be able to use the routing capabilities of Camel on the .NET side. However, camel supports various exchange formats like json, xml and pojos. You should be able to achieve interoperability between Java and .NET using either xml or json as the exchange format.


I have created a java endpoint adapter for my .net application. The .net app publishes an xml or json message to a camel endpoint, TibcoEMS topic in my case. All of the routing/filtering/enrichment/... is handled inside camel. The exchange is then placed on another endpoint to be retrieved by the java app.


If all you are looking for is a messaging platform to support an EDA, then Camel is not strictly necessary. Camel is a framework to translate between different payload formats, do routing between web services, messaging, RSS feeds and about 160 others.

From your question above, ActiveMQ should be able to handle the use case that you are describing out of the box.

From a client perspective ActiveMQ has library support for both Java (JMS - the standard) and C++/C# (CMS/NMS - an almost exact copy of JMS). Other languages (Ruby, Python, Javascript etc.) are supported through the (pretty much also standard) STOMP protocol.

I have worked with ActiveMQ in a mixed .Net/Java environment and it does exactly what it says on the tin. All in a nice Java runtime that can be instrumented using your favourite monitoring tools via JMX.


Should work great! ActiveMQ is a java application, but there is a good working .NET client API for it. It should do most of your pub/sub needs. If you need more logic in the middle, such as routing, actually, ActiveMQ comes bundled with Camel, so that you can perform routing, transformations, conversions etc. right on the ActiveMQ instance, by configuring some XML (or by Java/Scala code).

There is no need to handle Camel with .NET directly, since communication should be done through ActiveMQ anyway. The ActiveMQ/Camel combo is really powerful for this kind of tasks - and it's free.

0

精彩评论

暂无评论...
验证码 换一张
取 消