Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending JSON objects through JMS?

Tags:

json

xml

jms

I want to host a service using JMS and send data to a client in json and xml format. How can we send data to a client in json and xml format?

like image 808
Neeson Avatar asked Jul 22 '26 07:07

Neeson


1 Answers

JMS is an interface specification, not a transport. You need to look to the specific implementation to understand that question.

I have used ActiveMQ to transport JSON and XML data to other clients; we used a header flagging the content type, and found that quite effective. Native Java, Ruby, and Perl libraries were used to communicate with ActiveMQ (via STOMP, or OpenWire).

I have also experimented with RabbitMQ, again over STOMP, and with using Apache Camel in conjunction with ActiveMQ to provide an HTTP interface to the queue, automatically bridging JSON posted via HTTP to a JMS consumer - and serving back a JSON response to the request.

like image 61
Daniel Pittman Avatar answered Jul 25 '26 04:07

Daniel Pittman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!