activemq - Sending JMS message over corrupted network -


I'm doing some simple tests with ActiveMQ so that it shows how it works on a non-static network . The first test is in a manufacturer who sends a message in a remote queue. The message object is like a message in which the serialactive content (a list of objects) inside the object.

Everything works well with a good network, but when I launch similar tests to simulate package loss, delays and corruption, error message when trying to extract the content of the message While taking:

2011-03-16 11: 59: 21791 Error [com.my.MessageConsumer] Failed to make body from bytes. Reason: java.io.StreamCorruptedException: Invalid handle value: 017E0007 javax.jms.JMSException: Failed to make body from bytes. Reason: java.io.StreamCorruptedException: Invalid handle value: 017E0007

It seems as if the message was corrupted while sending the remote queue, but is stored anyway, And when the consumer is consumed, see that the message is corrupt.

After this I will use a local queue and a network connector to forward messages in the remote queue, and I hope this will solve the problem, but I was surprised that there were manufacturers and destination There is no recognition between (at least one checksum or something like this) that guarantees the right delivery, am I doing something wrong or what is normal behavior?

I do not have the code right here, but it was very simple, just a message listener:

 public class myMessageConsumer implies MessageListener {public message (message message) {Try (if message message object message) {ObjectMessage myMessage = (object message) message; List dtoList = (list) myMessage.getObject (); }} Hold (Exception pre) {ex.printStackTrace (); }}}}  

If the exact code is required, then I will return it to the holidays, but it was absolutely fine.

The broker is not validating the content of each and every message, which processes this There will be a heavy waste of time and the message will slow down the dispatch and the customer received a bad message and to signal that a JMSEC was thrown that the message contents had been corrupted, to give your app a correct answer Enough Should be.

Comments