3 Replies Latest reply on Oct 14, 2012 9:06 AM by ataylor

    What is the Best Way for Sending Objects?

    mofarn

      I know Object Message will slow things down because of java serialization, but in my application i should produce and consume different objects with different types.

      What do you suggest me to do?

        • 1. Re: What is the Best Way for Sending Objects?
          ataylor

          what exactly are you asking?If you need to send objects then make them serializable and use ObjectMessage (and take the perf hit) if not use another type of message.

          • 2. Re: What is the Best Way for Sending Objects?
            mofarn

            Someone told me don't use Object Message, (beacuse serialization sucks!) And he said turn your objects to bytes (or make your own serialization) and then send it to queue. But i don't know how to do this?

            • 3. Re: What is the Best Way for Sending Objects?
              ataylor

              Someone told me don't use Object Message, (beacuse serialization sucks!) And he said turn your objects to bytes (or make your own serialization) and then send it to queue. But i don't know how to do this?

              Well thats not rewally a HornetQ/JMS question but a general java question, you can use a byte message to send but you would have to write your own serialization if you don't want to use the java serialization. google should tell you how to do this.