activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbekas <>
Subject The jmsMessage is not set yet, call the super's createMessageId
Date Sat, 11 Apr 2009 04:46:25 GMT

activemq 5.2.0

I'm trying to set a header on a JmsMessage based on content contained in the
message.  I then use a choice statement to route to the next destination. 
However, I receive the log message "The jmsMessage is not set yet, call the
super's createMessageId" when the header is tested.  

I'm testing the content in a bean, pseudo-coded as

public class PreProcessor {
  public void determineRouting(Exchange exchange) {
    Message message = exchange.getIn().getBody(Message.class);
    message.setHeader("route", "a");

My route configuration looks like this

Predicate isA = header("route").isEqualTo("a");
Predicate isB = header("route").isEqualTo("b");


Debugging where the log message happens, it appears that it occurs after my
PrePrecessor and before the choice:
	at org.apache.camel.component.jms.JmsMessage.copyFrom(
	at org.apache.camel.processor.Pipeline.process(

I've dug through the source and discovered that this log message is made if
the javax.jms.Message (aka jmsMessage) is not set on the
org.apache.camel.component.jms.JmsMessage in the exchange.  It is set on the
copy in my original Exchange object.  Judging from the code, it should be
copied when the Exchange is replicated, but that does not appear to be the

My processing is successful, so the log message is a nuisance more than
anything.  I'll have to tweak the log4j settings so that this message
doesn't pollute the logs a few million times a day.  

Obviously someone thought it was important to check and see if the original
JmsMessage was passed along the processing route or not.  Is this a bug?

I've tried various ways to prevent this, but without modifying camel source
code, it doesn't appear feasible.  

Thoughts or suggestions?

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message