activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Schneider <>
Subject Empty message body of type List in a Queue
Date Thu, 30 Oct 2008 10:19:55 GMT

Hi ActiveMQ forum,

 we are new to ActiveMQ and we have a problem (or a misunderstanding) with
messages having an object in the body instead of text (String). It seems
that the message body is not stored in the queue if it is of type List or
Map instead of String.

 We are using: ActiveMQ 5.1, persistence queues on Windows XP Pro SP 2, JVM

 Our routes are defined in a package given via activemq.xml:

    <!-- -->
    <camelContext id="camel"

 In this package we have to RouteBuilders which defines the two following

	public void configure() throws Exception {
		FlatpackDataFormat df = new FlatpackDataFormat();
		df.setDefinition(new ClassPathResource("definition.pzmap.xml"));


	public void configure() throws Exception {
			.process(new SimpleTextMessageProcessor());
 The SimpleTextMessageProcessor.process is like this:

	public void process(Exchange exchange) throws Exception {
		Logger logger =
		logger.debug("ENTRY: SimpleTextMessageProcessor.process");
		Message in = exchange.getIn();
		logger.debug("IN message: " + in);
		logger.debug("IN body: " + in.getBody());
 Here we are missing the body of the message which is null as the log of the
ActiveMQ console shows:

DEBUG sap                            - ENTRY:
DEBUG sap                            - IN message: JmsMessage:
ActiveMQMessage {commandId = 5, responseRequired = true, messageId
= ID:PC038-2832-1225357029453-2:1:1:1:1, originalDestination = null,
originalTransactionId = null, producerId = ID:PC038-2832-1225
357029453-2:1:1:1, destination = queue://import.norskeskog.text,
transactionId = null, expiration = 0, timestamp = 1225357033015,
arrival = 0, brokerInTime = 1225357033015, brokerOutTime = 1225357033031,
correlationId = null, replyTo = null, persistent = true,
 type = null, priority = 4, groupID = null, groupSequence = 0,
targetConsumerId = null, compressed = false, userID = null, content
 = null, marshalledProperties =
org.apache.activemq.util.ByteSequence@154c054, dataStructure = null,
redeliveryCounter = 0, size =
 0, properties = null, readOnlyProperties = true, readOnlyBody = true,
droppable = false}
DEBUG sap                            - IN body: null

 If we do not convert the Body to a List the body is not missing. But we
would like to have objects in our messages.

 We know the class ObjectMessage which maybe the solution for our problem,
but not sure how to use this class in our context.
 So, our quesition is how we can store objects in messages which are send to
persistence message queues in ActiveMQ?

Many thanks for your time!
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message