简体   繁体   中英

Camel and ActiveMQ: Failed to resolve endpoint

I'm getting the following error in an application that user apache camel and activemq:

Failed to resolve endpoint: iasJms://setStatus due to: No component found with scheme: iasJm

this is the declaration of the route that is causing the issue:

rest("/setStatus")
        .put("/{number}")
        .route()
            .from("direct:setStatusRest")
        .setExchangePattern(ExchangePattern.InOnly)
        .to("iasJms:setStatus");

And this is my camelContext.xml

<camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring">
    <propertyPlaceholder id="properties"
                         location="file:/etc/configmap/app.properties" propertiesParserRef="jasypt">
    </propertyPlaceholder>
</camelContext>

<bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory" init-method="start" destroy-method="stop">

    <property name="maxConnections" value="10" />
    <property name="maximumActiveSessionPerConnection" value="10" />

    <property name="connectionFactory" >
        <bean class="org.apache.activemq.ActiveMQConnectionFactory">
            <property name="brokerURL" value="tcp://127.0.0.1:8161" />
            <property name="userName" value="username"/>
            <property name="password" value="password"/>
        </bean>
    </property>
</bean>

<bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration">
    <property name="connectionFactory" ref="pooledConnectionFactory" />
    <property name="transacted" value="true" />
    <property name="concurrentConsumers" value="15" />
    <property name="deliveryPersistent" value="true" />
    <property name="requestTimeout" value="10000" />
    <property name="cacheLevelName"  value="CACHE_CONSUMER" />
</bean>

<bean id="iasJms" class="org.apache.activemq.camel.component.ActiveMQComponent">
    <property name="configuration" ref="jmsConfig"/>
</bean>

In my pom.xml I added the dependencies for activemq-camel and activemq-pool.

Any idea of what's happening?

将id的名称更改为activemq而不是iasJms并在您的路由中使用它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM