我在用户apache camel和activemq的应用程序中收到以下错误:
无法解析端点:iasJms:// setStatus,原因是:没有组件 找到方案:iasJm
这是引起问题的路线声明:
rest("/setStatus")
.put("/{number}")
.route()
.from("direct:setStatusRest")
.setExchangePattern(ExchangePattern.InOnly)
.to("iasJms:setStatus");
这是我的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>
在我的pom.xml中,我添加了activemq-camel和activemq-pool的依赖项。
知道发生了什么?
答案 0 :(得分:1)
将id的名称更改为activemq而不是iasJms,并在路线中使用该名称。