File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to send json via jms

 
ray frid
Ranch Hand
Posts: 79
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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 java 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 String to json should I send the message
as test 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?

thanks, ray.
 
Amarnath Ramasamy
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

Regards,
Amarnath RC
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic