mirror of https://github.com/apache/activemq.git
added another load test which uses concurrent consumers
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@644706 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ce1d85d1ee
commit
b1cbd4176e
|
@ -0,0 +1,39 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.activemq.soaktest.localBroker;
|
||||
|
||||
import org.apache.camel.CamelContext;
|
||||
import org.apache.camel.component.mock.MockEndpoint;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
|
||||
|
||||
/**
|
||||
* Runs a load test on a separate broker on localhost
|
||||
*
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
@ContextConfiguration
|
||||
public class LocalBrokerParallelProducerLoadTest extends AbstractJUnit38SpringContextTests {
|
||||
@Autowired
|
||||
protected CamelContext camelContext;
|
||||
|
||||
public void testRun() throws Exception {
|
||||
MockEndpoint.assertIsSatisfied(camelContext);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<!-- START SNIPPET: example -->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
|
||||
http://activemq.org/config/1.0 http://activemq.apache.org/schema/core/activemq-core-5.0.0.xsd
|
||||
">
|
||||
|
||||
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
|
||||
|
||||
<route>
|
||||
<from uri="dataset:myDataSet?preloadSize=50000"/>
|
||||
|
||||
<to uri="activemq:foo.example.A"/>
|
||||
|
||||
<!-- lets use concurrency -->
|
||||
<!--
|
||||
<thread coreSize="10" maxSize="20">
|
||||
</thread>
|
||||
-->
|
||||
</route>
|
||||
|
||||
<route>
|
||||
<from uri="activemq:foo.example.A?concurrentConsumers=5"/>
|
||||
<to uri="mock:results?expectedMessageCount=100000&reportGroup=5000&resultWaitTime=400000"/>
|
||||
</route>
|
||||
|
||||
</camelContext>
|
||||
|
||||
<bean id="myDataSet" class="org.apache.camel.component.dataset.SimpleDataSet">
|
||||
<property name="size" value="100000"/>
|
||||
<property name="reportCount" value="5000"/>
|
||||
</bean>
|
||||
|
||||
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
|
||||
</bean>
|
||||
</beans>
|
||||
<!-- END SNIPPET: example -->
|
Loading…
Reference in New Issue