In terms of JMS performance, I have read that ObjectMessage should be avoided for performance reasons.
How bad are ObjectMessage performance-wise?
Should I serialize to a BytesMessage and manually deserialize?
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.
The performance overhead of
ObjectMessageis because of thejava.ioserialization process. If you do that yourself and useByteMessage, you’re just doing what JMS would do itself, and you’ll be no better off.If you need to send java objects via JMS, you should use
ObjectMessage, that’s what the API provides. This allows the container to make some optimizations, e.g. JBoss will use its own proprietary serialization protocol, which is considerably faster than the standardjava.ioone.