camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Maurer <nor...@apache.org>
Subject Re: BlobMessages in Camel:
Date Fri, 05 Mar 2010 17:47:58 GMT
Just a guess but shouldn,t the bean Id of the activemq component be
activemq and not jms?

Bye
Norman

2010/3/5, bzaks1424 <bzaks1424@gmail.com>:
>
> When consuming a BlobMessage with two properties attached from ActiveMQ I'm
> using the following xml:
> XML:
> <camel:camelContext id="camel"
> xmlns="http://camel.apache.org/schema/spring">
> 	<route>
> 		<from ref="payloadQueue" />
> 		<to uri="bean:payloadQueueListener" />
> 	</route>
> </camel:camelContext>
> <bean id="jms"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
> 	<property name="brokerURL" value="tcp://localhost:61616" />
> </bean>
> <bean id="payloadQueue" factory-bean="camel" factory-method="getEndpoint">
> 	<constructor-arg ref="com.example.payload" />
> </bean>
>
> However - when I try to consume the message in my bean - everything is null!
> Code:
> @Service
> public class PayloadQueueListener implements MessageListener {
> 	@Override
> 	public void onMessage(Message message) {
> 			System.out.println(message);
> 	}
> }
>
> Output:
> ActiveMQMessage {commandId = 0, responseRequired = false, messageId = null,
> originalDestination = null, originalTransactionId = null, producerId = null,
> destination = null, transactionId = null, expiration = 0, timestamp = 0,
> arrival = 0, brokerInTime = 0, brokerOutTime = 0, correlationId = null,
> replyTo = null, persistent = true, type = null, priority = 4, groupID =
> null, groupSequence = 0, targetConsumerId = null, compressed = false, userID
> = null, content = null, marshalledProperties = null, dataStructure = null,
> redeliveryCounter = 0, size = 0, properties =
> {REMOTE_WORK_ITEM_PAYLOAD_FILENAME=test.tar.gz, REMOTE_WORK_ITEM_JOB_ID=0,
> CamelJmsDeliveryMode=2}, readOnlyProperties = false, readOnlyBody = false,
> droppable = false}
>
>
> How is it that the two properties are attached, but nothing else is? Where
> is my message ID? Where is my input stream? I don't fully understand camel -
> so I'm not sure why things aren't working.
> --
> View this message in context:
> http://old.nabble.com/BlobMessages-in-Camel%3A-tp27796936p27796936.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>

Mime
View raw message