This week's book giveaway is in the
We're giving away four copies of
and have Sam Newman on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
EJB and other Java EE Technologies
How to send json via jms
Joined: Dec 23, 2010
Mar 05, 2013 01:06:17
I am using JMS in my architecture in many ways.
Latency and performance are very big factor in our architecture.
I've read that using jms with ObjectMessage in order to pass whole
object within the message takes lots of performances.
Alternative solution is converting to json,protobuff and having the message being sent as a bytemessage/text message.
Could you please make this clear for me:
in case I choose json. after converting from
to json should I send the message
or as ByteArray? (any difference?)
Is the the total time of converting String to json from the sender side and
vice versa on the consumer side will be less/more then just sending ObjectMessage?
Joined: Feb 05, 2010
Apr 02, 2013 06:52:29
You can JSON string as text message itself. Convert your object to JSON string using Json parsers and send it via text message. This is definitely better than ObjectMessage. Thanks
I agree. Here's the link:
subject: How to send json via jms
How to send message from Web Component
How to return JSON?
JMS client request/reply from WebSphere MQ Queue
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015