Which one is better in performance for sending object message?
- Create ObjectMessage and send it.
- Serialize Object to xml, create TextMessage, and send xml content.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Convert your object to bytes and send it.
Serialization sucks…
XML Sucks
If you use ObjectMessage, make your objects externalizable and avoid writeObject inside the externalizable, than your conversion will fly.
Manual parsing to bytes is what would get you the best performance. And this is not just hornetQ (any JMS Server out there). Serialization sucks! (I”m also the author of JBoss Serialization, so I know what I”m talking about… not much for the JBoss name on it, but I know the inner works of serialization)
Someone would have to come up with a code generation serialization in order to make things fly.