Som Bhattacharyya
Som Bhattacharyya

Reputation: 4112

Using Camel to send messages from ActiveMQ Artemis to a Rest Service

I have a message server where we are getting messages in from clients across the world. We also have a rest service that has the API to take that information and save to the database. I do not want to write another windows service to listen on the queue and save to the database. Is there a way i can configure camel on the active mq server so i can make sure messages from a particular queue automatically call the intended Rest service.

Our Rest service is a .net application.

Upvotes: 0

Views: 1372

Answers (1)

Justin Bertram
Justin Bertram

Reputation: 35008

You can deploy Camel routes to your ActiveMQ Artemis broker. They just need to be packaged as a web application archive (i.e. WAR) which the embedded Jetty server can deploy. An example of how to do this will ship with the 2.7.0 version of Artemis in the examples/features/standard/camel directory. You can view it online before it's released. Even though the example isn't released yet the concept should still work in previous versions.

Camel should be able to work with your REST endpoint as described in the Camel documentation. For what it's worth, it doesn't matter that your REST service is implemented in .NET. It communicates via HTTP so any client on any platform in any language should be able to use it if it also speaks HTTP.

Upvotes: 1

Related Questions