You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by MichaelAtSAG <me...@gmail.com> on 2012/01/11 22:54:56 UTC

No consumers available on endpoint exception

Two Spring XML Context files:

Spring 1:
	<camelContext xmlns="http://camel.apache.org/schema/spring"
xmlns:evt="http://namespaces.softwareag.com/EDA/Event">
		<route id="Emit_EntryPoint">
			<from uri="file:src/data?noop=true" />
			<to uri="seda:Emit_InvLow" />
		</route>
	</camelContext>

Spring 2:
	<camelContext xmlns="http://camel.apache.org/schema/spring">

		<route id="Emit_InvLow">
			<from uri="direct:Emit_InvLow" />
			<log message="///Emitting PartInventoryLow" />
			<to uri="jmsEDA:topic:InvMgmt" />
			<log message="///Published to PartInventoryLow JMS " />
		</route>
	</camelContext>

Launch code:
import org.apache.camel.spring.Main;

/**
 * Launch ProductXYZ
 * 
 * @version
 */
public class ProductXYZ {
	/**
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {
		new Main().run(args);
	}

Error:
org.apache.camel.CamelExchangeException: No consumers available on endpoint:
Endpoint[direct://Emit_InvLow]. Exchange[PartInventoryLow.xml]

I believe this is due to the use of two camel context files. I then changed
the endpoint to use seda instead of direct, yet nothing happens when I do
this.

How do I connect the routes together?


--
View this message in context: http://camel.465427.n5.nabble.com/No-consumers-available-on-endpoint-exception-tp5138202p5138202.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: No consumers available on endpoint exception

Posted by MichaelAtSAG <me...@gmail.com>.
Component VM worked perfectly. Thanks!

--
View this message in context: http://camel.465427.n5.nabble.com/No-consumers-available-on-endpoint-exception-tp5138202p5140672.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: No consumers available on endpoint exception

Posted by Christian Müller <ch...@gmail.com>.
The Camel VM component is where you are looking for:
http://camel.apache.org/vm.html

Best,
Christian

On Wed, Jan 11, 2012 at 10:54 PM, MichaelAtSAG <me...@gmail.com>wrote:

> Two Spring XML Context files:
>
> Spring 1:
>        <camelContext xmlns="http://camel.apache.org/schema/spring"
> xmlns:evt="http://namespaces.softwareag.com/EDA/Event">
>                <route id="Emit_EntryPoint">
>                        <from uri="file:src/data?noop=true" />
>                        <to uri="seda:Emit_InvLow" />
>                </route>
>        </camelContext>
>
> Spring 2:
>        <camelContext xmlns="http://camel.apache.org/schema/spring">
>
>                <route id="Emit_InvLow">
>                        <from uri="direct:Emit_InvLow" />
>                        <log message="///Emitting PartInventoryLow" />
>                        <to uri="jmsEDA:topic:InvMgmt" />
>                        <log message="///Published to PartInventoryLow JMS
> " />
>                </route>
>        </camelContext>
>
> Launch code:
> import org.apache.camel.spring.Main;
>
> /**
>  * Launch ProductXYZ
>  *
>  * @version
>  */
> public class ProductXYZ {
>        /**
>         * @param args
>         * @throws Exception
>         */
>        public static void main(String[] args) throws Exception {
>                new Main().run(args);
>        }
>
> Error:
> org.apache.camel.CamelExchangeException: No consumers available on
> endpoint:
> Endpoint[direct://Emit_InvLow]. Exchange[PartInventoryLow.xml]
>
> I believe this is due to the use of two camel context files. I then changed
> the endpoint to use seda instead of direct, yet nothing happens when I do
> this.
>
> How do I connect the routes together?
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/No-consumers-available-on-endpoint-exception-tp5138202p5138202.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: No consumers available on endpoint exception

Posted by Hadrian Zbarcea <hz...@gmail.com>.
Fwiw, seda only works within the same context. vm works across contexts 
in the same jvm.

Hadrian

On 01/12/2012 09:36 AM, Ashwin Karpe wrote:
> Hi,
>
> The reason this does not work is that the "direct" endpoint cannot span
> Camel Contexts. If you moved the second route within the first context it
> should work.
>
> However, if you wish to keep things as they are you may use
>        - Seda or VM endpoints: if the Camel contexts are in the same JVM.
>        - JMS, Mina, Netty etc: if you wish to have the route work across
> different JVMs/execution environments.
>
> Hope this helps.
>
> Cheers,
>
> Ashwin...
>
> -----
> ---------------------------------------------------------
> Ashwin Karpe
> Apache Camel Committer&  Sr Principal Consultant
> FUSESource (a Progress Software Corporation subsidiary)
> http://fusesource.com
>
> Blog: http://opensourceknowledge.blogspot.com
> ---------------------------------------------------------
> --
> View this message in context: http://camel.465427.n5.nabble.com/No-consumers-available-on-endpoint-exception-tp5138202p5140082.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

-- 
Hadrian Zbarcea
Principal Software Architect
Talend, Inc
http://coders.talend.com/
http://camelbot.blogspot.com/

Re: No consumers available on endpoint exception

Posted by Ashwin Karpe <ak...@fusesource.com>.
Hi,

The reason this does not work is that the "direct" endpoint cannot span
Camel Contexts. If you moved the second route within the first context it
should work.

However, if you wish to keep things as they are you may use
      - Seda or VM endpoints: if the Camel contexts are in the same JVM.
      - JMS, Mina, Netty etc: if you wish to have the route work across
different JVMs/execution environments.

Hope this helps.

Cheers,

Ashwin... 

-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com 
---------------------------------------------------------
--
View this message in context: http://camel.465427.n5.nabble.com/No-consumers-available-on-endpoint-exception-tp5138202p5140082.html
Sent from the Camel - Users mailing list archive at Nabble.com.