dcsimg
Message size changes after resending it (JMS MQSeries)
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alicja_Matusewicz
Posted On:   Monday, April 2, 2001 02:58 AM

Currently I am writing a simple JMS application (using MQSeries). It forwards msgs from one queue to other queues without interpreting them. I just receive and resend the message like follows: message = queueReceiver.receive(); queueSender.send(message); But for some some types of messages it doesn't work: 1. TextMessage is cut, it has the size of Message type - 112 bytes (body of message is lost). When I explicitly cast to TextMessage then the message is OK (not corrupted). 2. BytesMessage and ObjectMessage is longer (extra 112 bytes). It seems that a next header is added. In this case casting to correct type doesn't help. What should I do to assure that the resent messages are not corrupted?    More>>

Currently I am writing a simple JMS application (using MQSeries). It forwards msgs from one queue to other queues without interpreting them.

I just receive and resend the message like follows:
message = queueReceiver.receive(); queueSender.send(message);

But for some some types of messages it doesn't work:
1. TextMessage is cut, it has the size of Message type - 112 bytes (body of message is lost). When I explicitly cast to TextMessage then the message is OK (not corrupted).
2. BytesMessage and ObjectMessage is longer (extra 112 bytes). It seems that a next header is added. In this case casting to correct type doesn't help.

What should I do to assure that the resent messages are not corrupted?

   <<Less
About | Sitemap | Contact