I have a configuration that works for a single message. It even works for about 3 messages at a time, but when I increase the load to 10 messages it just stops without any errors. The flow is composed of the following endpoints:

1. dequeue: JMS dequeuer sends received messages to process
2. process: EIP pipeline transforms received messages in routingslip and sends the result to persist (replaced with outbox directory for testing) 3. routingslip: EIP static routing slip is composed of 2 XSLT transformers address and enhance-description (disabled for testing) 4. address: saxon derived XSLT transformer. Replaces the source resolver of the transformer.
5. enhance-description: similar to address but uses another xslt.
6. persist: stores the message using EJB3 (not used in test)

Attached is a PDF overview of the message id's as they are processed by each endpoint. The persist has been replaced by a file outbox, but that makes no difference. The enhance-description has also been disabled (no difference).

When I inspect the eip-component using the JConsole it always has a size of 10 after failing (capacity is 256). I don't know if that means anything though.


I'm a bit of a newby to servicemix, so if anybody could tell me how to solve this I'd be a happy man.

Currently the dequeue endpoint is synchronous, but I'd like to make it async if possible. But when I set synchronous="false", the messages are no longer sent to the process endpoint. The only diffence I see in the log is that in sync mode it uses the SedaFlow and in async mode it uses JCAFlow. I don't know what I need to change to make it work async.



dequeue unit

<beans xmlns:jms="http://servicemix.apache.org/jms/1.0";
        xmlns:ci="http://xxx/connector_inbound/1.0";
        xmlns:amqra="http://activemq.org/ra/1.0";
        xmlns:amqpool="http://jencks.org/amqpool/2.0";
        xmlns:jencks="http://jencks.org/2.0";>

        <jms:endpoint service="ci:xxx-dequeue"
                endpoint="endpoint" role="consumer" processorName="jca"
                targetService="ci:xxx-process"
                bootstrapContext="#bootstrapContext"
                resourceAdapter="#activeMQResourceAdapter"
                connectionFactory="#jmsFactory"
                defaultMep="http://www.w3.org/2004/08/wsdl/in-only";
                rollbackOnError="true" synchronous="true">
                <jms:activationSpec>
                        <amqra:activationSpec destination="xxx-inbound"
                                destinationType="javax.jms.Queue"/>
                </jms:activationSpec>
        </jms:endpoint>

        <!-- Transaction Manager -->
        <jencks:transactionManager id="transactionManager"
                defaultTransactionTimeoutSeconds="600"/>

        <!-- Work manager -->
        <jencks:workManager id="workManager" threadPoolSize="200"
                transactionManager="#transactionManager" />

        <!-- Bootstrap context for JCA -->
        <jencks:bootstrapContext id="bootstrapContext"
                workManager="#workManager"
                transactionManager="#transactionManager" />

        <!-- the JCA Resource Adapter -->
        <amqra:resourceAdapter id="activeMQResourceAdapter"
serverUrl="tcp://localhost:61616?jms.asyncDispatch=true&amp;jms.useAsyncSend=true&amp;jms.redeliveryPolicy.maximumRedeliveries=10&amp;jms.redeliveryPolicy.initialRedeliveryDelay=100L&amp;jms.redeliveryPolicy.useExponentialBackOff=true&amp;jms.redeliveryPolicy.backOffMultiplier=5" />

        <!-- JMS Xa-enabled pooled factory -->
        <amqpool:jcaPooledConnectionFactory name="jmsFactory"
                transactionManager="#transactionManager" maxConnections="10"
brokerURL="tcp://localhost:61616?jms.asyncDispatch=true&amp;jms.useAsyncSend=true&amp;jms.redeliveryPolicy.maximumRedeliveries=10&amp;jms.redeliveryPolicy.initialRedeliveryDelay=100L&amp;jms.redeliveryPolicy.useExponentialBackOff=true&amp;jms.redeliveryPolicy.backOffMultiplier=5" />

</beans>



process unit:

<beans xmlns:eip="http://servicemix.apache.org/eip/1.0";
        xmlns:ci="http://xxx/connector_inbound/1.0";
        xmlns:test="http://xxx/test/1.0";>

        <eip:pipeline service="ci:xxx-process"
                endpoint="endpoint">
                <eip:transformer>
                        <eip:exchange-target
                                service="ci:xxx-routingslip" />
                </eip:transformer>
                <eip:target>
                        <!-- store result in outbox directory -->
                        <eip:exchange-target
                                service="test:test-file-outbox" />
                </eip:target>
        </eip:pipeline>

        <eip:static-routing-slip service="ci:xxx-routingslip"
                endpoint="endpoint">
                <eip:targets>

                        <!-- Lookup UUID for supplier codes -->
                        <eip:exchange-target
                                service="ci:xxx-address" />

                        <!-- Lookup Enhance Description of products
                        <eip:exchange-target
                                service="ci:xxx-enhance-description" />
                        -->
                </eip:targets>
        </eip:static-routing-slip>

</beans>




Reply via email to