You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jcamus <jc...@parkeon.com> on 2009/08/26 11:50:58 UTC

Camel : how to send file into a JMS queue?

How can I send a file into a JMS queue with Camel ?

I tried the following  :

camel-context.xml :
<when>
					<xpath>count(/test1) = 1</xpath>
					<to
					
uri="jbi:endpoint:http://esb.transfolio.parkeon.com/JMSConsumerService/endpointTest1"/>
				</when>

And JMS queue is defined like this :

<jms:consumer service="parkeon:JMSConsumerService"
		endpoint="endpointTest1" targetService="parkeon:filesender"
targetEndpoint="endpointTest1File"
		destinationName="test1" connectionFactory="#connectionFactory" />
	

But I have the following error :


org.apache.servicemix.camel.JbiException:
javax.jbi.messaging.MessagingException: Could not find route for exchange:
InOnly[
  id: ID:192.168.79.203-123560011ad-13:15
  status: Active
  role: provider
  in: <?xml version="1.0" encoding="UTF-8"?><test1>
<label>Just a test!</label>
</test1>
] for service: null and interface: null
        at
org.apache.servicemix.camel.CamelConsumerEndpoint.process(CamelConsumerEndpoint.java:118)
        at
org.apache.servicemix.camel.JbiEndpoint$JbiProducer.process(JbiEndpoint.java:94)
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:69)
        at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
        at
org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:50)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:80)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:189)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:133)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
        at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(StreamCachingInterceptor.java:87)
        at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:82)
        at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:52)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
        at
org.apache.servicemix.camel.CamelProviderEndpoint.handleActiveProviderExchange(CamelProviderEndpoint.java:94)
        at
org.apache.servicemix.camel.CamelProviderEndpoint.process(CamelProviderEndpoint.java:73)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:535)
        at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.jbi.messaging.MessagingException: Could not find route for
exchange: InOnly[
  id: ID:192.168.79.203-123560011ad-13:15

What is wrong in the route definition?


-- 
View this message in context: http://www.nabble.com/Camel-%3A-how-to-send-file-into-a-JMS-queue--tp25149724p25149724.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Camel : how to send file into a JMS queue?

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

You would have to define a <jms:provider/> endpoint to be able to send
exchanges as jms messages in a queue.  The <jms:consumer> endpoint is
used for reading messages from a queue, which is not what you're
trying to do here (if I understand things correctly)

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/8/26 jcamus <jc...@parkeon.com>:
>
> How can I send a file into a JMS queue with Camel ?
>
> I tried the following  :
>
> camel-context.xml :
> <when>
>                                        <xpath>count(/test1) = 1</xpath>
>                                        <to
>
> uri="jbi:endpoint:http://esb.transfolio.parkeon.com/JMSConsumerService/endpointTest1"/>
>                                </when>
>
> And JMS queue is defined like this :
>
> <jms:consumer service="parkeon:JMSConsumerService"
>                endpoint="endpointTest1" targetService="parkeon:filesender"
> targetEndpoint="endpointTest1File"
>                destinationName="test1" connectionFactory="#connectionFactory" />
>
>
> But I have the following error :
>
>
> org.apache.servicemix.camel.JbiException:
> javax.jbi.messaging.MessagingException: Could not find route for exchange:
> InOnly[
>  id: ID:192.168.79.203-123560011ad-13:15
>  status: Active
>  role: provider
>  in: <?xml version="1.0" encoding="UTF-8"?><test1>
> <label>Just a test!</label>
> </test1>
> ] for service: null and interface: null
>        at
> org.apache.servicemix.camel.CamelConsumerEndpoint.process(CamelConsumerEndpoint.java:118)
>        at
> org.apache.servicemix.camel.JbiEndpoint$JbiProducer.process(JbiEndpoint.java:94)
>        at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:69)
>        at
> org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
>        at
> org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:50)
>        at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:80)
>        at
> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:189)
>        at
> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:133)
>        at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
>        at
> org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(StreamCachingInterceptor.java:87)
>        at
> org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:82)
>        at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:52)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
>        at
> org.apache.servicemix.camel.CamelProviderEndpoint.handleActiveProviderExchange(CamelProviderEndpoint.java:94)
>        at
> org.apache.servicemix.camel.CamelProviderEndpoint.process(CamelProviderEndpoint.java:73)
>        at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)
>        at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)
>        at
> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:535)
>        at
> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
>        at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)
>        at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
>        at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
>        at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>        at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.jbi.messaging.MessagingException: Could not find route for
> exchange: InOnly[
>  id: ID:192.168.79.203-123560011ad-13:15
>
> What is wrong in the route definition?
>
>
> --
> View this message in context: http://www.nabble.com/Camel-%3A-how-to-send-file-into-a-JMS-queue--tp25149724p25149724.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>