I’ve run into a strange situation while using the RecipientList EIP. We are 
running Camel inside Karaf and defining CamelContexts in blueprint files. We 
have two Karaf containers. The first one runs Bundle A and the second one runs 
ActiveMQ (simplified for example purposes). In the blueprint file for Bundle A 
we define the ActiveMQ component like this.

    <bean id="producerActivemqConnectionFactory" 
class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL" 
value="tcp://serverB:61616?trace=false&amp;soTimeout=60000&amp;connectionTimeout=60000"
 />
    </bean>

    <bean id="producerPooledConnectionFactory" 
class="org.apache.activemq.pool.PooledConnectionFactory" init-method="start" 
destroy-method="stop">
        <property name="maxConnections" value="4" />
        <property name="connectionFactory" 
ref="producerActivemqConnectionFactory" />
    </bean>

    <bean id="activemq" 
class="org.apache.activemq.camel.component.ActiveMQComponent">
        <property name="connectionFactory" 
ref="producerPooledConnectionFactory"/>
        <property name="transacted" value="false"/>
        <property name="cacheLevelName" value="CACHE_NONE"/>
    </bean>

If we were defined out Camel Route like this, everything works properly and the 
message gets sent to the AMQ server on Server B.

    <camel:camelContext id=“ctx" trace="false">
        <camel:route>
            <camel:from uri="direct:ingest"/>
            <camel:to uri=“activemq:queue:ingest.client”/>
        </camel:route>
    </camel:camelContext>

But if we use the recipient list EIP like below it resolves the activemq 
component to the base one and we receive the error message listed below.

    <camel:camelContext id=“ctx" trace="false">
        <camel:route>
            <camel:from uri="direct:ingest"/>
            <camel:recipientList>
                <camel:simple>activemq:queue:ingest.client</camel:simple>
            </camel:recipientList>
        </camel:route>
    </camel:camelContext>

WARN  | ActiveMQ Task-1  | FailoverTransport                | 146 - 
org.apache.activemq.activemq-osgi - 5.10.2 | Failed to connect to 
[tcp://localhost:61616] after: 80 attempt(s) continuing to retry.


Does the ReceipientList processor resolve components differently than 
everything else?

Chris

Reply via email to