The context :

i have a network broker type duplex.
and a route camel : move message to othe queue, and track the message in
database.


Below my configuration :

    <broker xmlns="http://activemq.apache.org/schema/core"; brokerName="DCFR"
dataDirectory="${activemq.base}/data">

        <!-- Destination specific policies using destination names or
wildcards -->
        <destinationPolicy>
            <policyMap>
                <policyEntries>
                    <policyEntry queue=">" memoryLimit="50mb"/>
                    <policyEntry topic=">" memoryLimit="50mb">
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>
        
        <destinations>
                <queue physicalName="AX.OUT"/>
        </destinations>

        <destinationInterceptors> 
                <virtualDestinationInterceptor> 
                <virtualDestinations>
          </virtualDestinations>
              </virtualDestinationInterceptor>
        </destinationInterceptors> 
        <managementContext>
            <managementContext createConnector="false"/>
        </managementContext>
                
        <networkConnectors>
                <networkConnector name="AX" conduitSubscriptions="true"
uri="static://(tcp://192.168.107.87:61616)" duplex="true">
                </networkConnector>
            </networkConnectors>

        <persistenceAdapter>
            <amqPersistenceAdapter syncOnWrite="false"
directory="${activemq.base}/data" maxFileLength="1 gb"/>
        </persistenceAdapter>
        <sslContext>
            <sslContext keyStore="file:${activemq.base}/conf/broker.ks"
keyStorePassword="password"
trustStore="file:${activemq.base}/conf/broker.ts"
trustStorePassword="password"/>
        </sslContext>
        
        <!--  The maximum about of space the broker will use before slowing
down producers -->
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="500 mb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="5 gb" name="foo"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="500 mb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>


        <!-- The transport connectors ActiveMQ will listen to -->
        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://DCFR:61616"/>
        </transportConnectors>

    </broker>

    
    <camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring";>

    <route errorHandlerRef="myDeadLetterChannel">
                <from uri="activemq:queue:AX.OUT"/>
                <to uri="activemq:queue:AX.IN"/>
                <setBody>
                        <simple> Declare @myDate varchar(50);set
@myDate='${date:now:yyyyMMddHHmmssSSS}';UPDATE InterfaceMonitor SET
CamelSentToAXTS =
convert(datetime,(stuff(stuff(stuff(stuff(stuff(stuff(@myDate,5,0,'-'),8,0,'-'),11,0,'
'),14,0,':'),17,0,':'),20,0,'.')),121), CamelSentToAX = CURRENT_TIMESTAMP
WHERE MessageGUId = '${in.header.MessageId}'</simple>
                </setBody>
                <to uri="jdbc:testdb"/>
        </route>
        
    </camelContext>

    
        <bean id="myDeadLetterChannel"
class="org.apache.camel.builder.DeadLetterChannelBuilder">
        <property name="defaultDeadLetterEndpointUri"
value="activemq:queue:DLQ.CAMEL.HUBAX"/>
        <!-- <property name="redeliveryPolicy" ref="myRedeliveryPolicy"/> -->
        </bean>

        <bean id="testdb" class="net.sourceforge.jtds.jdbcx.JtdsDataSource">
           <property name="serverName" value="10.33.202.64"/>
           <property name="portNumber" value="1433"/>
           <property name="databaseName" value="IP_MOM_GROUP_FIN_AXINTERFACES"/>
           <property name="user" value="appuser_talend"/>
           <property name="password" value="p...@$$w0rd"/>
        </bean> 


    <!-- configure the camel activemq component to use the current broker
-->
    <bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent" >
        <property name="connectionFactory">
          <bean class="org.apache.activemq.ActiveMQConnectionFactory">
            <!-- <property name="brokerURL"
value="vm://DCFR?create=false&amp;waitForStart=10000" /> -->
            <property name="brokerURL" value="vm://localhost?create=false"
/> 
            <property name="userName" value="${activemq.username}"/>
            <property name="password" value="${activemq.password}"/>
          </bean>
        </property>
    </bean>

    <jetty xmlns="http://mortbay.com/schemas/jetty/1.0";>
        <connectors>
            <nioConnector port="8161"/>
        </connectors>

        <handlers>
            <webAppContext contextPath="/admin"
resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
            <webAppContext contextPath="/demo"
resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
            <webAppContext contextPath="/fileserver"
resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
            <webAppContext contextPath="/console"
resourceBase="${activemq.base}/webapps/console" logUrlOnStart="true" />
        </handlers>
    </jetty>

</beans>



Gary Tully wrote:
> 
> can you post your configuration and some more context?
> The brokerName attribute is relevant to the vm: url you use, localhost
> is the default value.
> Also, try and enable full debug logging to see if you can extract more
> information.
> 
> 2009/11/10 titexe <tit...@yahoo.fr>:
>>
>> Hello,
>>
>> My broker can not do anything, nor send or receive messages.
>>
>> When I look at the console, there's only this error:
>>
>> 2009-11-10 09:35:21,205 [7638536 @ qtp0-34] WARN BrokerRegistry - Broker
>> localhost not started so using instead
>>
>>
>> Does someone can help me solve this painful problem ?
>>
>> Thank you in advance,
>>
>> titexe
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Broker-Blocked-%28WARN-%3A-Broker-localhost-not-started-so-using-DCFR-instead%29-tp26284252p26284252.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> http://blog.garytully.com
> 
> Open Source Integration
> http://fusesource.com
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Broker-Blocked-%28WARN-%3A-Broker-localhost-not-started-so-using-DCFR-instead%29-tp26284252p26285284.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to