mirror of https://github.com/apache/activemq.git
AMQ-2420 AMQ-2423 AMQ-2422 AMQ-2419 AMQ-2425 AMQ-2424
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@818985 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
41b7acb0ba
commit
7290d95b88
|
@ -1,93 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-parent</artifactId>
|
||||
<version>5.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>activemq-book</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>ActiveMQ User Guide</name>
|
||||
<description>The ActiveMQ User Guide which generates HTML, PDF and man pages.</description>
|
||||
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.agilejava.docbkx</groupId>
|
||||
<artifactId>docbkx-maven-plugin</artifactId>
|
||||
<version>2.0.9</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>generate-pdf</goal>
|
||||
<goal>generate-html</goal>
|
||||
<!-- Commenting out for now due to bug in docbx plugin
|
||||
<goal>generate-manpages</goal>
|
||||
-->
|
||||
</goals>
|
||||
<phase>generate-sources</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.docbook</groupId>
|
||||
<artifactId>docbook-xml</artifactId>
|
||||
<version>4.4</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<configuration>
|
||||
<foCustomization>${basedir}/src/styles/docbook-fo.xsl</foCustomization>
|
||||
<includes>activemq.xml</includes>
|
||||
|
||||
<!-- lets use separate pages per chapter for HTML -->
|
||||
<chunkedOutput>true</chunkedOutput>
|
||||
|
||||
<entities>
|
||||
<entity>
|
||||
<name>version</name>
|
||||
<value>${activemq-version}</value>
|
||||
</entity>
|
||||
</entities>
|
||||
|
||||
<!--<xincludeSupport>true</xincludeSupport>-->
|
||||
|
||||
<!--
|
||||
<sourceDirectory>target/docbkx</sourceDirectory>
|
||||
<preProcess>
|
||||
<ant target="generate-manual" inheritAll="true" />
|
||||
</preProcess>
|
||||
-->
|
||||
<!--<htmlStylesheet>http://agilejava.com/downloads/kubrick-docbkx.css</htmlStylesheet>-->
|
||||
<headerRule>0</headerRule>
|
||||
<footerRule>0</footerRule>
|
||||
<draftMode>0</draftMode>
|
||||
<bodyFontFamily>Helvetica</bodyFontFamily>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -1,140 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
|
||||
[
|
||||
<!ENTITY introduction SYSTEM "introduction.xml">
|
||||
<!ENTITY installation SYSTEM "installation.xml">
|
||||
<!ENTITY java-client SYSTEM "java-client.xml">
|
||||
<!ENTITY running-broker SYSTEM "running-broker.xml">
|
||||
]>
|
||||
<book>
|
||||
<bookinfo>
|
||||
<title>Apache ActiveMQ</title>
|
||||
<subtitle>User Guide</subtitle>
|
||||
<releaseinfo>&version;</releaseinfo>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>James</firstname>
|
||||
<surname>Strachan</surname>
|
||||
</author>
|
||||
|
||||
<author>
|
||||
<firstname>Brian</firstname>
|
||||
<surname>McCallister</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
<legalnotice>
|
||||
<para>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</para>
|
||||
|
||||
<para>http://www.apache.org/licenses/LICENSE-2.0</para>
|
||||
|
||||
<para>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.</para>
|
||||
</legalnotice>
|
||||
</bookinfo>
|
||||
|
||||
<toc></toc>
|
||||
|
||||
&introduction;
|
||||
|
||||
&installation;
|
||||
|
||||
&running-broker;
|
||||
|
||||
&java-client;
|
||||
|
||||
<chapter id="destination-concepts">
|
||||
<title>Destinations in ActiveMQ</title>
|
||||
<para>Discuss the types of destinations and their behavior</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="basic-configuration">
|
||||
<title>Basic Configuration</title>
|
||||
<para>In which we discuss the basic layout and concepts of the xbean XML</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="destination-policies">
|
||||
<title>Destination Policy Configuration</title>
|
||||
<para>In which we discuss destination policies.</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="persistence">
|
||||
<title>Persistence</title>
|
||||
<para>
|
||||
In which we discuss persistence in the general sense, probably use sections for the
|
||||
different options.
|
||||
</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="transports">
|
||||
<title>Transports</title>
|
||||
<para>In which we discuss transports.</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="networks-of-brokers">
|
||||
<title>Networks of Brokers</title>
|
||||
<para>In which we discuss networks of brokers.</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="using-jmx">
|
||||
<title>Using JMX</title>
|
||||
<para>What is doable, and how, via JMX</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="web-console">
|
||||
<title>Web Console</title>
|
||||
<para>Setting up and using the web console.</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="jms-bridge">
|
||||
<title>The JMS to JMS Bridge</title>
|
||||
<para>Using the JMS to JMS Bridge</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="authentication">
|
||||
<title>Authentication</title>
|
||||
<para>Yea!</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="deployment-example-small">
|
||||
<title>A Small Deployment</title>
|
||||
<para>...</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="deployment-example-multisite">
|
||||
<title>A Multi-Site Deployment Example</title>
|
||||
<para>...</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="message-converters">
|
||||
<title>Using Message Converters</title>
|
||||
<para>...</para>
|
||||
</chapter>
|
||||
|
||||
</book>
|
Binary file not shown.
Before Width: | Height: | Size: 7.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 36 KiB |
|
@ -1,25 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
<chapter id="installation">
|
||||
<title>Installing Apache ActiveMQ</title>
|
||||
|
||||
<para>The first thing you need to do is install Apache ActiveMQ from a
|
||||
binary distribution.</para>
|
||||
|
||||
<para></para>
|
||||
</chapter>
|
|
@ -1,45 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
<chapter id="introduction">
|
||||
<title>Introduction</title>
|
||||
|
||||
<para><ulink url="http://activemq.apache.org/">Apache ActiveMQ</ulink> is
|
||||
the most popular and powerful open source Message Broker available today.
|
||||
Its hosted at Apache and is distributed under the Apache Software License
|
||||
(2.0).</para>
|
||||
|
||||
<para>ActiveMQ supports different <ulink
|
||||
url="http://activemq.apache.org/cross-language-clients.html">cross
|
||||
language clients</ulink> from many different languages such as Java, C# /
|
||||
.Net, C, C++, Ruby, Python, Perl, PHP together with different protocols
|
||||
like OpenWire, Stomp, REST, Ajax/Cometd, XMPP. ActiveMQ also provides a
|
||||
whole raft of powerful <ulink
|
||||
url="http://activemq.apache.org/features.html">features</ulink> like
|
||||
Message Groups, Exclusive Queues, Master/Slave, Networks of Brokers and so
|
||||
forth.</para>
|
||||
|
||||
<section>
|
||||
<title>Architecture</title>
|
||||
|
||||
<para>Like most Message Orientated Middleware (<acronym>MOM</acronym>)
|
||||
providers ActiveMQ is based on the idea of one or more <emphasis>Message
|
||||
Brokers</emphasis> running on the network which act as a message router
|
||||
and optional persistence store, then <emphasis>Clients</emphasis>
|
||||
connect to one or more Message Broker.</para>
|
||||
</section>
|
||||
</chapter>
|
|
@ -1,25 +0,0 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<chapter id="java-client">
|
||||
<title>Using the Java Client</title>
|
||||
|
||||
<para>Apache ActiveMQ fully supports the JMS 1.1 and J2EE 1.4
|
||||
specifications so feel free to follow any documentation you have on JMS or
|
||||
J2EE for more background.</para>
|
||||
|
||||
<para></para>
|
||||
</chapter>
|
|
@ -1,29 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
<chapter id="running-broker">
|
||||
<title>Running a Broker</title>
|
||||
|
||||
<para>The most typical deployment of Apache ActiveMQ is for brokers to be
|
||||
run on the network as a stand alone processes then messaging clients
|
||||
connect to one or more brokers. So we will describe how to go about
|
||||
running brokers, then in the <link linkend="java-client">next
|
||||
chapter</link> we will describe how to connect to a broker from a
|
||||
client.</para>
|
||||
|
||||
<para></para>
|
||||
</chapter>
|
|
@ -1,428 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<!--
|
||||
This XSL is based heavily on the Spring Frameworks' XSL script
|
||||
-->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY admon_gfx_path "src/docbkx/images/admons/">
|
||||
<!ENTITY copyright "©">
|
||||
]>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
version="1.0">
|
||||
|
||||
<xsl:import href="urn:docbkx:stylesheet"/>
|
||||
|
||||
<!--###################################################
|
||||
Custom Title Page
|
||||
################################################### -->
|
||||
|
||||
<xsl:template name="book.titlepage.recto">
|
||||
<fo:block>
|
||||
<fo:table table-layout="fixed" width="175mm">
|
||||
<fo:table-column column-width="175mm"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align="center">
|
||||
<fo:block>
|
||||
<fo:external-graphic src="file:src/docbkx/images/logo.jpeg"/>
|
||||
</fo:block>
|
||||
<fo:block font-family="Helvetica" font-size="22pt" padding-before="10mm">
|
||||
<xsl:value-of select="bookinfo/subtitle"/>
|
||||
</fo:block>
|
||||
<fo:block font-family="Helvetica" font-size="12pt" padding="10mm">
|
||||
Version <xsl:value-of select="bookinfo/releaseinfo"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align="center">
|
||||
<fo:block font-family="Helvetica" font-size="14pt" padding="10mm">
|
||||
<xsl:value-of select="bookinfo/pubdate"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align="center">
|
||||
<fo:block font-family="Helvetica" font-size="12pt" padding="10mm">
|
||||
<xsl:text>Copyright ©right; 2004-2007, Apache Software Foundation</xsl:text>
|
||||
</fo:block>
|
||||
<!--<fo:block>-->
|
||||
<!--<fo:external-graphic src="file:src/docbkx/images/asf-logo.gif"/>-->
|
||||
<!--</fo:block>-->
|
||||
<fo:block font-family="Helvetica" font-size="10pt" padding="1mm">
|
||||
<xsl:apply-templates select="bookinfo/legalnotice/*"/>
|
||||
<!--<xsl:value-of select="bookinfo/legalnotice"/>-->
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Prevent blank pages in output -->
|
||||
<xsl:template name="book.titlepage.before.verso">
|
||||
</xsl:template>
|
||||
<xsl:template name="book.titlepage.verso">
|
||||
</xsl:template>
|
||||
<xsl:template name="book.titlepage.separator">
|
||||
</xsl:template>
|
||||
|
||||
<!--###################################################
|
||||
Header
|
||||
################################################### -->
|
||||
|
||||
<!-- More space in the center header for long text -->
|
||||
<xsl:attribute-set name="header.content.properties">
|
||||
<xsl:attribute name="font-family">
|
||||
<xsl:value-of select="$body.font.family"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">-5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">-5em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
Custom Footer
|
||||
################################################### -->
|
||||
<xsl:template name="footer.content">
|
||||
<xsl:param name="pageclass" select="''"/>
|
||||
<xsl:param name="sequence" select="''"/>
|
||||
<xsl:param name="position" select="''"/>
|
||||
<xsl:param name="gentext-key" select="''"/>
|
||||
<xsl:variable name="Version">
|
||||
<xsl:if test="//releaseinfo">
|
||||
<xsl:text>Apache ActiveMQ (</xsl:text>
|
||||
<xsl:value-of select="//releaseinfo"/>
|
||||
<xsl:text>)</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$sequence='blank'">
|
||||
<xsl:if test="$position = 'center'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<!-- for double sided printing, print page numbers on alternating sides (of the page) -->
|
||||
<xsl:when test="$double.sided != 0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$sequence = 'even' and $position='left'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$sequence = 'odd' and $position='right'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position='center'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<!-- for single sided printing, print all page numbers on the right (of the page) -->
|
||||
<xsl:when test="$double.sided = 0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$position='center'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position='right'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!--###################################################
|
||||
Extensions
|
||||
################################################### -->
|
||||
|
||||
<!-- These extensions are required for table printing and other stuff -->
|
||||
<xsl:param name="use.extensions">1</xsl:param>
|
||||
<xsl:param name="tablecolumns.extension">0</xsl:param>
|
||||
<xsl:param name="callout.extensions">1</xsl:param>
|
||||
<!-- FOP provide only PDF Bookmarks at the moment -->
|
||||
<xsl:param name="fop1.extensions">1</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Table Of Contents
|
||||
################################################### -->
|
||||
|
||||
<!-- Generate the TOCs for named components only -->
|
||||
<xsl:param name="generate.toc">
|
||||
book toc
|
||||
</xsl:param>
|
||||
|
||||
<!-- Show only Sections up to level 3 in the TOCs -->
|
||||
<!--<xsl:param name="toc.section.depth">2</xsl:param>-->
|
||||
|
||||
<!-- Dot and Whitespace as separator in TOC between Label and Title-->
|
||||
<!--<xsl:param name="autotoc.label.separator" select="'. '"/>-->
|
||||
|
||||
|
||||
<!--###################################################
|
||||
Paper & Page Size
|
||||
################################################### -->
|
||||
|
||||
<!-- Paper type, no headers on blank pages, no double sided printing -->
|
||||
<xsl:param name="paper.type" select="'A4'"/>
|
||||
<xsl:param name="double.sided">0</xsl:param>
|
||||
<xsl:param name="headers.on.blank.pages">0</xsl:param>
|
||||
<xsl:param name="footers.on.blank.pages">0</xsl:param>
|
||||
|
||||
<!-- Space between paper border and content (chaotic stuff, don't touch) -->
|
||||
<xsl:param name="page.margin.top">5mm</xsl:param>
|
||||
<xsl:param name="region.before.extent">10mm</xsl:param>
|
||||
<xsl:param name="body.margin.top">10mm</xsl:param>
|
||||
|
||||
<xsl:param name="body.margin.bottom">15mm</xsl:param>
|
||||
<xsl:param name="region.after.extent">10mm</xsl:param>
|
||||
<xsl:param name="page.margin.bottom">0mm</xsl:param>
|
||||
|
||||
<xsl:param name="page.margin.outer">18mm</xsl:param>
|
||||
<xsl:param name="page.margin.inner">18mm</xsl:param>
|
||||
|
||||
<!-- No intendation of Titles -->
|
||||
<xsl:param name="title.margin.left">0pc</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Fonts & Styles
|
||||
################################################### -->
|
||||
|
||||
<!-- Left aligned text and no hyphenation -->
|
||||
<xsl:param name="alignment">justify</xsl:param>
|
||||
<xsl:param name="hyphenate">false</xsl:param>
|
||||
|
||||
<!-- Default Font size -->
|
||||
<xsl:param name="body.font.master">11</xsl:param>
|
||||
<xsl:param name="body.font.small">8</xsl:param>
|
||||
|
||||
<!-- Line height in body text -->
|
||||
<xsl:param name="line-height">1.4</xsl:param>
|
||||
|
||||
<!-- Monospaced fonts are smaller than regular text -->
|
||||
<xsl:attribute-set name="monospace.properties">
|
||||
<xsl:attribute name="font-family">
|
||||
<xsl:value-of select="$monospace.font.family"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="font-size">0.8em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
Tables
|
||||
################################################### -->
|
||||
|
||||
<!-- The table width should be adapted to the paper size -->
|
||||
<xsl:param name="default.table.width">17.4cm</xsl:param>
|
||||
|
||||
<!-- Some padding inside tables -->
|
||||
<xsl:attribute-set name="table.cell.padding">
|
||||
<xsl:attribute name="padding-left">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-top">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">4pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Only hairlines as frame and cell borders in tables -->
|
||||
<xsl:param name="table.frame.border.thickness">0.1pt</xsl:param>
|
||||
<xsl:param name="table.cell.border.thickness">0.1pt</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Labels
|
||||
################################################### -->
|
||||
|
||||
<!-- Label Chapters and Sections (numbering) -->
|
||||
<xsl:param name="chapter.autolabel">1</xsl:param>
|
||||
<xsl:param name="section.autolabel" select="1"/>
|
||||
<xsl:param name="section.label.includes.component.label" select="1"/>
|
||||
|
||||
<!--###################################################
|
||||
Titles
|
||||
################################################### -->
|
||||
|
||||
<!-- Chapter title size -->
|
||||
<xsl:attribute-set name="chapter.titlepage.recto.style">
|
||||
<xsl:attribute name="text-align">left</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.8"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Why is the font-size for chapters hardcoded in the XSL FO templates?
|
||||
Let's remove it, so this sucker can use our attribute-set only... -->
|
||||
<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
|
||||
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
xsl:use-attribute-sets="chapter.titlepage.recto.style">
|
||||
<xsl:call-template name="component.title">
|
||||
<xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
|
||||
</xsl:call-template>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Sections 1, 2 and 3 titles have a small bump factor and padding -->
|
||||
<xsl:attribute-set name="section.title.level1.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.5"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="section.title.level2.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.25"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="section.title.level3.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.0"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Titles of formal objects (tables, examples, ...) -->
|
||||
<xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing">
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="hyphenate">false</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
Programlistings
|
||||
################################################### -->
|
||||
|
||||
<!-- Verbatim text formatting (programlistings) -->
|
||||
<xsl:attribute-set name="monospace.verbatim.properties">
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.small * 1.0"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="verbatim.properties">
|
||||
<xsl:attribute name="space-before.minimum">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.optimum">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">1em</xsl:attribute>
|
||||
<xsl:attribute name="border-color">#444444</xsl:attribute>
|
||||
<xsl:attribute name="border-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-width">0.1pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-top">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-left">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">0.5em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Shade (background) programlistings -->
|
||||
<xsl:param name="shade.verbatim">1</xsl:param>
|
||||
<xsl:attribute-set name="shade.verbatim.style">
|
||||
<xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
Callouts
|
||||
################################################### -->
|
||||
|
||||
<!-- Use images for callouts instead of (1) (2) (3) -->
|
||||
<xsl:param name="callout.graphics">0</xsl:param>
|
||||
<xsl:param name="callout.unicode">1</xsl:param>
|
||||
|
||||
<!-- Place callout marks at this column in annotated areas -->
|
||||
<xsl:param name="callout.defaultcolumn">90</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Admonitions
|
||||
################################################### -->
|
||||
|
||||
<!-- Use nice graphics for admonitions -->
|
||||
<xsl:param name="admon.graphics">'1'</xsl:param>
|
||||
<xsl:param name="admon.graphics.path">&admon_gfx_path;</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Misc
|
||||
################################################### -->
|
||||
|
||||
<!-- Placement of titles -->
|
||||
<xsl:param name="formal.title.placement">
|
||||
figure after
|
||||
example before
|
||||
equation before
|
||||
table before
|
||||
procedure before
|
||||
</xsl:param>
|
||||
|
||||
<!-- Format Variable Lists as Blocks (prevents horizontal overflow) -->
|
||||
<xsl:param name="variablelist.as.blocks">1</xsl:param>
|
||||
|
||||
<!-- The horrible list spacing problems -->
|
||||
<xsl:attribute-set name="list.block.spacing">
|
||||
<xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
colored and hyphenated links
|
||||
################################################### -->
|
||||
<xsl:template match="ulink">
|
||||
<fo:basic-link external-destination="{@url}"
|
||||
xsl:use-attribute-sets="xref.properties"
|
||||
text-decoration="underline"
|
||||
color="blue">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(child::node())=0">
|
||||
<xsl:value-of select="@url"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:basic-link>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -1,168 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-parent</artifactId>
|
||||
<version>5.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>activemq-camel-loadtest</artifactId>
|
||||
<packaging>bundle</packaging>
|
||||
<name>ActiveMQ :: Camel :: Load Test</name>
|
||||
<description>Load testing of the ActiveMQ broker using Camel</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- ActiveMQ Dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-camel</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.xbean</groupId>
|
||||
<artifactId>xbean-spring</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jta_1.0.1B_spec</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-j2ee-management_1.0_spec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jacc_1.1_spec</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${pom.groupId}</groupId>
|
||||
<artifactId>activeio-core</artifactId>
|
||||
<optional>false</optional>
|
||||
</dependency>
|
||||
<!-- Camel dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-core</artifactId>
|
||||
<type>test-jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-spring</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-spring</artifactId>
|
||||
<type>test-jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-pool</groupId>
|
||||
<artifactId>commons-pool</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- =============================== -->
|
||||
<!-- Testing Dependencies -->
|
||||
<!-- =============================== -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Configure which tests are included/excuded -->
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<forkMode>pertest</forkMode>
|
||||
<childDelegation>false</childDelegation>
|
||||
<!-- <useFile>true</useFile> -->
|
||||
<argLine>-Xmx512M</argLine>
|
||||
|
||||
<systemProperties>
|
||||
<property>
|
||||
<name>org.apache.activemq.default.directory.prefix</name>
|
||||
<value>target/</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
|
||||
<includes>
|
||||
<include>**/*Test.*</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<!-- lets by default exclude tests requiring local broker -->
|
||||
<exclude>**/localBroker/**.*</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<configuration>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>${basedir}/activemq-data</directory>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -1,37 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* 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;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
@ContextConfiguration
|
||||
public class LoadTest extends AbstractJUnit38SpringContextTests {
|
||||
@Autowired
|
||||
protected CamelContext camelContext;
|
||||
|
||||
public void testRun() throws Exception {
|
||||
MockEndpoint.assertIsSatisfied(camelContext);
|
||||
}
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* 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 java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import org.apache.camel.Exchange;
|
||||
import org.apache.camel.Processor;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
public class CounterBean implements InitializingBean, Processor {
|
||||
private static final transient Log LOG = LogFactory.getLog(CounterBean.class);
|
||||
protected static final long SAMPLES = Integer.parseInt(System.getProperty("SAMPLES", "" + 10000));
|
||||
protected static final long SAMPLE_DURATION = Integer.parseInt(System.getProperty("SAMPLES_DURATION", "" + 1000 * 5));
|
||||
final AtomicLong counter = new AtomicLong();
|
||||
|
||||
public void process(Exchange exchange) throws Exception {
|
||||
counter.incrementAndGet();
|
||||
}
|
||||
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
Thread thread = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
LOG.info("Starting to monitor consumption");
|
||||
|
||||
for (int i = 0; i < SAMPLES; i++) {
|
||||
try {
|
||||
Thread.sleep(SAMPLE_DURATION);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
LOG.warn("Caught: " + e, e);
|
||||
}
|
||||
|
||||
long count = counter.getAndSet(0);
|
||||
LOG.info(" Total: " + (1000.0 * count / SAMPLE_DURATION) + " messages per second.");
|
||||
}
|
||||
}
|
||||
};
|
||||
thread.setDaemon(false);
|
||||
thread.start();
|
||||
}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* 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 LocalBrokerConsumeTest extends AbstractJUnit38SpringContextTests {
|
||||
@Autowired
|
||||
protected CamelContext camelContext;
|
||||
|
||||
public void testRun() throws Exception {
|
||||
Thread.sleep(100000);
|
||||
//MockEndpoint.assertIsSatisfied(camelContext);
|
||||
}
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* 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 LocalBrokerLoadTest extends AbstractJUnit38SpringContextTests {
|
||||
@Autowired
|
||||
protected CamelContext camelContext;
|
||||
|
||||
public void testRun() throws Exception {
|
||||
MockEndpoint.assertIsSatisfied(camelContext);
|
||||
}
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* 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);
|
||||
}
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# The logging properties used during tests..
|
||||
#
|
||||
log4j.rootLogger=INFO, stdout
|
||||
|
||||
#
|
||||
# Uncomment the next line to see the camel dataset endpoint at work
|
||||
#
|
||||
#log4j.logger.org.apache.camel.component.dataset=DEBUG
|
||||
log4j.logger.org.apache.activemq.spring=WARN
|
||||
|
||||
# CONSOLE appender not used by default
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
|
||||
|
||||
# File appender
|
||||
log4j.appender.out=org.apache.log4j.FileAppender
|
||||
log4j.appender.out.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
|
||||
log4j.appender.out.file=target/activemq-test.log
|
||||
log4j.appender.out.append=true
|
|
@ -1,63 +0,0 @@
|
|||
<?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://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
|
||||
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
|
||||
">
|
||||
|
||||
<camelContext xmlns="http://camel.apache.org/schema/spring">
|
||||
|
||||
<route>
|
||||
<!-- sends messages every 10 milliseconds -->
|
||||
<from uri="dataset:myDataSet?produceDelay=10"/>
|
||||
<to uri="activemq:test.queue"/>
|
||||
</route>
|
||||
|
||||
<route>
|
||||
<from uri="activemq:test.queue"/>
|
||||
<to uri="dataset:myDataSet?produceDelay=10"/>
|
||||
</route>
|
||||
|
||||
</camelContext>
|
||||
|
||||
<bean id="myDataSet" class="org.apache.camel.component.dataset.SimpleDataSet">
|
||||
<property name="size" value="10000"/>
|
||||
<property name="reportCount" value="100"/>
|
||||
</bean>
|
||||
|
||||
<!-- lets create an embedded broker for this test -->
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" dataDirectory="target/activemq">
|
||||
|
||||
<transportConnectors>
|
||||
<transportConnector uri="tcp://localhost:61616"/>
|
||||
</transportConnectors>
|
||||
|
||||
</broker>
|
||||
|
||||
<!-- Lets connect the Camel ActiveMQ component to the embedded broker.
|
||||
See http://activemq.apache.org/camel/activemq.html for more information.
|
||||
-->
|
||||
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
|
||||
<property name="brokerURL" value="tcp://localhost:61616" />
|
||||
</bean>
|
||||
</beans>
|
||||
<!-- END SNIPPET: example -->
|
|
@ -1,47 +0,0 @@
|
|||
<?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://camel.apache.org/schema/spring http://camel.apache.org/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://camel.apache.org/schema/spring">
|
||||
|
||||
<route>
|
||||
<from uri="activemq:TEST?concurrentConsumers=1"/>
|
||||
<process ref="counter"/>
|
||||
<!--<to uri="mock:results?expectedMessageCount=100000&reportGroup=5000&resultWaitTime=400000"/>-->
|
||||
</route>
|
||||
|
||||
</camelContext>
|
||||
|
||||
<bean id="counter" class="org.apache.activemq.soaktest.localBroker.CounterBean"/>
|
||||
|
||||
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
|
||||
<property name="brokerURL" value="tcp://localhost:61616"/>
|
||||
<property name="usePooledConnection" value="false"/>
|
||||
<property name="useSingleConnection" value="false"/>
|
||||
<property name="acknowledgementModeName" value="AUTO_ACKNOWLEDGE"/>
|
||||
<property name="transacted" value="false"/>
|
||||
</bean>
|
||||
</beans>
|
||||
<!-- END SNIPPET: example -->
|
|
@ -1,65 +0,0 @@
|
|||
<?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://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
|
||||
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
|
||||
">
|
||||
|
||||
<camelContext xmlns="http://camel.apache.org/schema/spring">
|
||||
|
||||
<route>
|
||||
<from uri="dataset:myDataSet"/>
|
||||
|
||||
<!-- lets use concurrency -->
|
||||
<to uri="activemq:foo.example.A"/>
|
||||
<!--
|
||||
<thread coreSize="1" daemon="true" keepAliveTime="1000" maxSize="1" priority="1" stackSize="1000">
|
||||
</thread>
|
||||
-->
|
||||
</route>
|
||||
|
||||
<route>
|
||||
<from uri="activemq:foo.example.A"/>
|
||||
<to uri="mock:results?expectedCount=10000&reportGroup=100&resultWaitTime=400000"/>
|
||||
<!--
|
||||
<resequencer>
|
||||
<simple>header.camelDataSetIndex</simple>
|
||||
<to uri="dataset:myDataSet"/>
|
||||
</resequencer>
|
||||
-->
|
||||
</route>
|
||||
|
||||
</camelContext>
|
||||
|
||||
<bean id="myDataSet" class="org.apache.camel.component.dataset.SimpleDataSet">
|
||||
<property name="size" value="10000"/>
|
||||
<property name="reportCount" value="100"/>
|
||||
</bean>
|
||||
|
||||
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
|
||||
<!--
|
||||
<property name="useSingleConnection" value="true"/>
|
||||
<property name="usePooledConnection" value="false"/>
|
||||
-->
|
||||
</bean>
|
||||
</beans>
|
||||
<!-- END SNIPPET: example -->
|
|
@ -1,65 +0,0 @@
|
|||
<?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://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
|
||||
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
|
||||
">
|
||||
|
||||
<camelContext xmlns="http://camel.apache.org/schema/spring">
|
||||
|
||||
<route>
|
||||
<from uri="dataset:myDataSet?preloadSize=50000"/>
|
||||
|
||||
<to uri="activemq:foo.example.A"/>
|
||||
<!-- lets use concurrency -->
|
||||
<!--
|
||||
<to uri="activemq:foo.example.A"/>
|
||||
<thread coreSize="10" maxSize="20">
|
||||
</thread>
|
||||
-->
|
||||
|
||||
</route>
|
||||
|
||||
<route>
|
||||
<from uri="activemq:foo.example.A?concurrentConsumers=20"/>
|
||||
<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">
|
||||
<!--<property name="brokerURL" value="tcp://localhost:61616?wireFormat.tightEncodingEnabled=false"/>-->
|
||||
<property name="brokerURL" value="tcp://localhost:61616?wireFormat.tightEncodingEnabled=false&jms.dispatchAsync=true"/>
|
||||
<property name="deliveryPersistent" value="false"/>
|
||||
<property name="acknowledgementModeName" value="DUPS_OK_ACKNOWLEDGE"/>
|
||||
<!--<property name="transacted" value="true"/>-->
|
||||
<property name="transacted" value="true"/>
|
||||
<!--
|
||||
-->
|
||||
</bean>
|
||||
</beans>
|
||||
<!-- END SNIPPET: example -->
|
|
@ -1,123 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-parent</artifactId>
|
||||
<version>5.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>activemq-groups</artifactId>
|
||||
<packaging>bundle</packaging>
|
||||
<name>ActiveMQ :: Groups</name>
|
||||
<description>A JMS based collaboration framework</description>
|
||||
|
||||
<properties>
|
||||
<activemq.osgi.import.pkg>*</activemq.osgi.import.pkg>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.xbean</groupId>
|
||||
<artifactId>xbean-spring</artifactId>
|
||||
<version>3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring</artifactId>
|
||||
<version>2.5.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.14</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Configure which tests are included/excuded -->
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<forkMode>pertest</forkMode>
|
||||
<childDelegation>false</childDelegation>
|
||||
<useFile>true</useFile>
|
||||
<argLine>-Xmx512M</argLine>
|
||||
|
||||
<systemProperties>
|
||||
<property>
|
||||
<name>org.apache.activemq.default.directory.prefix</name>
|
||||
<value>target/</value>
|
||||
</property>
|
||||
<!-- Uncomment the following if you want to configure custom logging (using src/test/resources/log4j.properties)
|
||||
while running mvn:test
|
||||
Note: if you want to see log messages on the console window remove
|
||||
"redirectTestOutputToFile" from the parent pom
|
||||
-->
|
||||
<!--
|
||||
<property>
|
||||
<name>log4j.configuration</name>
|
||||
<value>file:target/test-classes/log4j.properties</value>
|
||||
</property>
|
||||
-->
|
||||
</systemProperties>
|
||||
<excludes>
|
||||
<exclude>**/GroupStateTest.*</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -1,33 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups;
|
||||
|
||||
/**
|
||||
* Default implementation of a MapChangedListener
|
||||
*
|
||||
*/
|
||||
public class DefaultMapChangedListener implements GroupStateChangedListener{
|
||||
|
||||
public void mapInsert(Member owner, Object key, Object value) {
|
||||
}
|
||||
|
||||
public void mapRemove(Member owner, Object key, Object value,boolean expired) {
|
||||
}
|
||||
|
||||
public void mapUpdate(Member owner, Object key, Object oldValue,Object newValue) {
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups;
|
||||
|
||||
|
||||
/**
|
||||
* A listener for message communication
|
||||
*
|
||||
*/
|
||||
public interface GroupMessageListener {
|
||||
|
||||
/**
|
||||
* Called when a message is delivered to the <CODE>Group</CODE> from another member
|
||||
* @param sender the member who sent the message
|
||||
* @param replyId the id to use to respond to a message
|
||||
* @param message the message object
|
||||
*/
|
||||
void messageDelivered(Member sender, String replyId, Object message);
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups;
|
||||
|
||||
/**
|
||||
*Get notifications about changes to the state of the map
|
||||
*
|
||||
*/
|
||||
public interface GroupStateChangedListener {
|
||||
|
||||
/**
|
||||
* Called when a key/value pair is inserted into the map
|
||||
* @param owner
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
void mapInsert(Member owner,Object key, Object value);
|
||||
|
||||
/**
|
||||
* Called when a key value is updated in the map
|
||||
* @param owner
|
||||
* @param Key
|
||||
* @param oldValue
|
||||
* @param newValue
|
||||
*/
|
||||
void mapUpdate(Member owner,Object Key,Object oldValue,Object newValue);
|
||||
|
||||
/**
|
||||
* Called when a key value is removed from the map
|
||||
* @param owner
|
||||
* @param key
|
||||
* @param value
|
||||
* @param expired
|
||||
*/
|
||||
void mapRemove(Member owner,Object key, Object value,boolean expired);
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups;
|
||||
|
||||
/**
|
||||
* thrown when updating a key to map that the local client doesn't own
|
||||
*
|
||||
*/
|
||||
public class GroupUpdateException extends RuntimeException {
|
||||
private static final long serialVersionUID = -7584658017201604560L;
|
||||
|
||||
/**
|
||||
* @param message
|
||||
*/
|
||||
public GroupUpdateException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -1,163 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups;
|
||||
|
||||
import java.io.Externalizable;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInput;
|
||||
import java.io.ObjectOutput;
|
||||
import javax.jms.Destination;
|
||||
import org.apache.activemq.util.IdGenerator;
|
||||
|
||||
/**
|
||||
*<P>
|
||||
* A <CODE>Member</CODE> holds information about a member of the group
|
||||
*
|
||||
*/
|
||||
public class Member implements Externalizable {
|
||||
private String name;
|
||||
private String id;
|
||||
private String hostname;
|
||||
private long startTime;
|
||||
private int coordinatorWeight;
|
||||
private Destination inBoxDestination;
|
||||
private transient long timeStamp;
|
||||
|
||||
|
||||
/**
|
||||
* Default constructor - only used by serialization
|
||||
*/
|
||||
public Member() {
|
||||
}
|
||||
/**
|
||||
* @param name
|
||||
*/
|
||||
public Member(String name) {
|
||||
this.name = name;
|
||||
this.hostname = IdGenerator.getHostName();
|
||||
this.startTime=System.currentTimeMillis();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the name
|
||||
*/
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the id
|
||||
*/
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
void setId(String id) {
|
||||
this.id=id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the hostname
|
||||
*/
|
||||
public String getHostname() {
|
||||
return this.hostname;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the startTime
|
||||
*/
|
||||
public long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the inbox destination
|
||||
*/
|
||||
public Destination getInBoxDestination() {
|
||||
return this.inBoxDestination;
|
||||
}
|
||||
|
||||
void setInBoxDestination(Destination dest) {
|
||||
this.inBoxDestination=dest;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the timeStamp
|
||||
*/
|
||||
long getTimeStamp() {
|
||||
return this.timeStamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param timeStamp the timeStamp to set
|
||||
*/
|
||||
void setTimeStamp(long timeStamp) {
|
||||
this.timeStamp = timeStamp;
|
||||
}
|
||||
/**
|
||||
* @return the coordinatorWeight
|
||||
*/
|
||||
public int getCoordinatorWeight() {
|
||||
return this.coordinatorWeight;
|
||||
}
|
||||
/**
|
||||
* @param coordinatorWeight the coordinatorWeight to set
|
||||
*/
|
||||
public void setCoordinatorWeight(int coordinatorWeight) {
|
||||
this.coordinatorWeight = coordinatorWeight;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String toString() {
|
||||
return this.name+"["+this.id+"]@"+this.hostname;
|
||||
}
|
||||
|
||||
|
||||
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
|
||||
this.coordinatorWeight=in.readInt();;
|
||||
this.name = in.readUTF();
|
||||
this.id = in.readUTF();
|
||||
this.hostname = in.readUTF();
|
||||
this.startTime=in.readLong();
|
||||
this.inBoxDestination=(Destination) in.readObject();
|
||||
this.coordinatorWeight=in.readInt();
|
||||
}
|
||||
|
||||
public void writeExternal(ObjectOutput out) throws IOException {
|
||||
out.writeInt(this.coordinatorWeight);
|
||||
out.writeUTF(this.name != null ? this.name : "");
|
||||
out.writeUTF(this.id != null ? this.id : "");
|
||||
out.writeUTF(this.hostname != null ? this.hostname : "");
|
||||
out.writeLong(this.startTime);
|
||||
out.writeObject(this.inBoxDestination);
|
||||
out.writeInt(this.coordinatorWeight);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.id.hashCode();
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
boolean result = false;
|
||||
if (obj instanceof Member) {
|
||||
Member other = (Member)obj;
|
||||
result = this.id.equals(other.id);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups;
|
||||
|
||||
/**
|
||||
* A listener for membership changes to a group
|
||||
*
|
||||
*/
|
||||
public interface MemberChangedListener {
|
||||
|
||||
/**
|
||||
* Notification a member has started
|
||||
* @param member
|
||||
*/
|
||||
void memberStarted(Member member);
|
||||
|
||||
/**
|
||||
* Notification a member has stopped
|
||||
* @param member
|
||||
*/
|
||||
void memberStopped(Member member);
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups.command;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Return information about map update
|
||||
*
|
||||
*/
|
||||
public class AsyncMapRequest implements RequestCallback{
|
||||
private final Object mutex = new Object();
|
||||
|
||||
private Set<String> requests = new HashSet<String>();
|
||||
|
||||
public void add(String id, MapRequest request) {
|
||||
request.setCallback(this);
|
||||
this.requests.add(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wait for requests
|
||||
* @param timeout
|
||||
* @return
|
||||
*/
|
||||
public boolean isSuccess(long timeout) {
|
||||
long deadline = System.currentTimeMillis() + timeout;
|
||||
while (!this.requests.isEmpty()) {
|
||||
synchronized (this.mutex) {
|
||||
try {
|
||||
this.mutex.wait(timeout);
|
||||
} catch (InterruptedException e) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
timeout = Math.max(deadline - System.currentTimeMillis(), 0);
|
||||
}
|
||||
return this.requests.isEmpty();
|
||||
}
|
||||
|
||||
|
||||
public void finished(String id) {
|
||||
this.requests.remove(id);
|
||||
|
||||
}
|
||||
}
|
|
@ -1,106 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups.command;
|
||||
|
||||
import java.io.Externalizable;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInput;
|
||||
import java.io.ObjectOutput;
|
||||
import org.apache.activegroups.Member;
|
||||
|
||||
/**
|
||||
* Used to pass information around
|
||||
*
|
||||
*/
|
||||
public class ElectionMessage implements Externalizable{
|
||||
public static enum MessageType{ELECTION,ANSWER,COORDINATOR};
|
||||
private Member member;
|
||||
private MessageType type;
|
||||
|
||||
/**
|
||||
* @return the member
|
||||
*/
|
||||
public Member getMember() {
|
||||
return this.member;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param member the member to set
|
||||
*/
|
||||
public void setMember(Member member) {
|
||||
this.member = member;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the type
|
||||
*/
|
||||
public MessageType getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type the type to set
|
||||
*/
|
||||
public void setType(MessageType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if election message
|
||||
*/
|
||||
public boolean isElection() {
|
||||
return this.type != null && this.type.equals(MessageType.ELECTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if answer message
|
||||
*/
|
||||
public boolean isAnswer() {
|
||||
return this.type != null && this.type.equals(MessageType.ANSWER);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if coordinator message
|
||||
*/
|
||||
public boolean isCoordinator() {
|
||||
return this.type != null && this.type.equals(MessageType.COORDINATOR);
|
||||
}
|
||||
|
||||
|
||||
public ElectionMessage copy() {
|
||||
ElectionMessage result = new ElectionMessage();
|
||||
result.member=this.member;
|
||||
result.type=this.type;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public void readExternal(ObjectInput in) throws IOException,
|
||||
ClassNotFoundException {
|
||||
this.member=(Member) in.readObject();
|
||||
this.type=(MessageType) in.readObject();
|
||||
}
|
||||
|
||||
public void writeExternal(ObjectOutput out) throws IOException {
|
||||
out.writeObject(this.member);
|
||||
out.writeObject(this.type);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "ElectionMessage: "+ this.member + "{"+this.type+ "}";
|
||||
}
|
||||
}
|
|
@ -1,210 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups.command;
|
||||
|
||||
import java.io.Externalizable;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInput;
|
||||
import java.io.ObjectOutput;
|
||||
import org.apache.activegroups.Member;
|
||||
|
||||
/**
|
||||
* Holds information about an EntryKey
|
||||
*
|
||||
*/
|
||||
public class EntryKey<K> implements Externalizable {
|
||||
private Member owner;
|
||||
private K key;
|
||||
private boolean locked;
|
||||
private boolean removeOnExit;
|
||||
private boolean releaseLockOnExit;
|
||||
private long expiration;
|
||||
private long lockExpiration;
|
||||
|
||||
/**
|
||||
* Default constructor - for serialization
|
||||
*/
|
||||
public EntryKey() {
|
||||
}
|
||||
|
||||
public EntryKey(Member owner, K key) {
|
||||
this.owner = owner;
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.key != null ? this.key.hashCode() : super.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the owner
|
||||
*/
|
||||
public Member getOwner() {
|
||||
return this.owner;
|
||||
}
|
||||
|
||||
public void setOwner(Member member) {
|
||||
this.owner=member;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the key
|
||||
*/
|
||||
public K getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the share
|
||||
*/
|
||||
public boolean isLocked() {
|
||||
return this.locked;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param share the share to set
|
||||
*/
|
||||
public void setLocked(boolean locked) {
|
||||
this.locked = locked;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the removeOnExit
|
||||
*/
|
||||
public boolean isRemoveOnExit() {
|
||||
return this.removeOnExit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param removeOnExit
|
||||
* the removeOnExit to set
|
||||
*/
|
||||
public void setRemoveOnExit(boolean removeOnExit) {
|
||||
this.removeOnExit = removeOnExit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the expiration
|
||||
*/
|
||||
public long getExpiration() {
|
||||
return expiration;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param expiration the expiration to set
|
||||
*/
|
||||
public void setExpiration(long expiration) {
|
||||
this.expiration = expiration;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lockExpiration
|
||||
*/
|
||||
public long getLockExpiration() {
|
||||
return lockExpiration;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lockExpiration the lockExpiration to set
|
||||
*/
|
||||
public void setLockExpiration(long lockExpiration) {
|
||||
this.lockExpiration = lockExpiration;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the releaseLockOnExit
|
||||
*/
|
||||
public boolean isReleaseLockOnExit() {
|
||||
return releaseLockOnExit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param releaseLockOnExit the releaseLockOnExit to set
|
||||
*/
|
||||
public void setReleaseLockOnExit(boolean releaseLockOnExit) {
|
||||
this.releaseLockOnExit = releaseLockOnExit;
|
||||
}
|
||||
|
||||
public void setTimeToLive(long ttl) {
|
||||
if (ttl > 0 ) {
|
||||
this.expiration=ttl+System.currentTimeMillis();
|
||||
}else {
|
||||
this.expiration =0l;
|
||||
}
|
||||
}
|
||||
|
||||
public void setLockLeaseTime(long ttl) {
|
||||
if(ttl > 0) {
|
||||
this.lockExpiration=ttl+System.currentTimeMillis();
|
||||
}else {
|
||||
this.lockExpiration=0l;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isExpired() {
|
||||
return isExpired(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public boolean isExpired(long currentTime) {
|
||||
return this.expiration > 0 && this.expiration < currentTime;
|
||||
}
|
||||
|
||||
public boolean isLockExpired() {
|
||||
return isLockExpired(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public boolean isLockExpired(long currentTime) {
|
||||
return this.lockExpiration > 0 && this.lockExpiration < currentTime;
|
||||
}
|
||||
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
boolean result = false;
|
||||
if (obj instanceof EntryKey) {
|
||||
EntryKey other = (EntryKey) obj;
|
||||
result = other.key.equals(this.key);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public void writeExternal(ObjectOutput out) throws IOException {
|
||||
out.writeObject(this.owner);
|
||||
out.writeObject(this.key);
|
||||
out.writeBoolean(isLocked());
|
||||
out.writeBoolean(isRemoveOnExit());
|
||||
out.writeBoolean(isReleaseLockOnExit());
|
||||
out.writeLong(getExpiration());
|
||||
out.writeLong(getLockExpiration());
|
||||
}
|
||||
|
||||
public void readExternal(ObjectInput in) throws IOException,
|
||||
ClassNotFoundException {
|
||||
this.owner = (Member) in.readObject();
|
||||
this.key = (K) in.readObject();
|
||||
this.locked = in.readBoolean();
|
||||
this.removeOnExit=in.readBoolean();
|
||||
this.releaseLockOnExit=in.readBoolean();
|
||||
this.expiration=in.readLong();
|
||||
this.lockExpiration=in.readLong();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "key:"+this.key;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,204 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups.command;
|
||||
|
||||
import java.io.Externalizable;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInput;
|
||||
import java.io.ObjectOutput;
|
||||
|
||||
/**
|
||||
* Used to pass information around
|
||||
*
|
||||
*/
|
||||
public class EntryMessage implements Externalizable{
|
||||
public static enum MessageType{INSERT,DELETE,SYNC};
|
||||
private EntryKey key;
|
||||
private Object value;
|
||||
private Object oldValue;
|
||||
private MessageType type;
|
||||
private boolean mapUpdate;
|
||||
private boolean expired;
|
||||
private boolean lockExpired;
|
||||
private boolean lockUpdate;
|
||||
|
||||
/**
|
||||
* @return the owner
|
||||
*/
|
||||
public EntryKey getKey() {
|
||||
return this.key;
|
||||
}
|
||||
/**
|
||||
* @param key
|
||||
*/
|
||||
public void setKey(EntryKey key) {
|
||||
this.key = key;
|
||||
}
|
||||
/**
|
||||
* @return the value
|
||||
*/
|
||||
public Object getValue() {
|
||||
return this.value;
|
||||
}
|
||||
/**
|
||||
* @param value the value to set
|
||||
*/
|
||||
public void setValue(Object value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the oldValue
|
||||
*/
|
||||
public Object getOldValue() {
|
||||
return this.oldValue;
|
||||
}
|
||||
/**
|
||||
* @param oldValue the oldValue to set
|
||||
*/
|
||||
public void setOldValue(Object oldValue) {
|
||||
this.oldValue = oldValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the type
|
||||
*/
|
||||
public MessageType getType() {
|
||||
return this.type;
|
||||
}
|
||||
/**
|
||||
* @param type the type to set
|
||||
*/
|
||||
public void setType(MessageType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the mapUpdate
|
||||
*/
|
||||
public boolean isMapUpdate() {
|
||||
return this.mapUpdate;
|
||||
}
|
||||
/**
|
||||
* @param mapUpdate the mapUpdate to set
|
||||
*/
|
||||
public void setMapUpdate(boolean mapUpdate) {
|
||||
this.mapUpdate = mapUpdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the expired
|
||||
*/
|
||||
public boolean isExpired() {
|
||||
return expired;
|
||||
}
|
||||
/**
|
||||
* @param expired the expired to set
|
||||
*/
|
||||
public void setExpired(boolean expired) {
|
||||
this.expired = expired;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lockExpired
|
||||
*/
|
||||
public boolean isLockExpired() {
|
||||
return lockExpired;
|
||||
}
|
||||
/**
|
||||
* @param lockExpired the lockExpired to set
|
||||
*/
|
||||
public void setLockExpired(boolean lockExpired) {
|
||||
this.lockExpired = lockExpired;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lockUpdate
|
||||
*/
|
||||
public boolean isLockUpdate() {
|
||||
return lockUpdate;
|
||||
}
|
||||
/**
|
||||
* @param lockUpdate the lockUpdate to set
|
||||
*/
|
||||
public void setLockUpdate(boolean lockUpdate) {
|
||||
this.lockUpdate = lockUpdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if insert message
|
||||
*/
|
||||
public boolean isInsert() {
|
||||
return this.type != null && this.type.equals(MessageType.INSERT);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if delete message
|
||||
*/
|
||||
public boolean isDelete() {
|
||||
return this.type != null && this.type.equals(MessageType.DELETE);
|
||||
}
|
||||
|
||||
public boolean isSync() {
|
||||
return this.type != null && this.type.equals(MessageType.SYNC);
|
||||
}
|
||||
|
||||
|
||||
public EntryMessage copy() {
|
||||
EntryMessage result = new EntryMessage();
|
||||
result.key=this.key;
|
||||
result.value=this.value;
|
||||
result.oldValue=this.oldValue;
|
||||
result.type=this.type;
|
||||
result.mapUpdate=this.mapUpdate;
|
||||
result.expired=this.expired;
|
||||
result.lockExpired=this.lockExpired;
|
||||
result.lockUpdate=this.lockUpdate;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void readExternal(ObjectInput in) throws IOException,
|
||||
ClassNotFoundException {
|
||||
this.key=(EntryKey) in.readObject();
|
||||
this.value=in.readObject();
|
||||
this.oldValue=in.readObject();
|
||||
this.type=(MessageType) in.readObject();
|
||||
this.mapUpdate=in.readBoolean();
|
||||
this.expired=in.readBoolean();
|
||||
this.lockExpired=in.readBoolean();
|
||||
this.lockUpdate=in.readBoolean();
|
||||
}
|
||||
|
||||
public void writeExternal(ObjectOutput out) throws IOException {
|
||||
out.writeObject(this.key);
|
||||
out.writeObject(this.value);
|
||||
out.writeObject(this.oldValue);
|
||||
out.writeObject(this.type);
|
||||
out.writeBoolean(this.mapUpdate);
|
||||
out.writeBoolean(this.expired);
|
||||
out.writeBoolean(this.lockExpired);
|
||||
out.writeBoolean(this.lockUpdate);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "EntryMessage: "+this.type + "[" + this.key + "," + this.value +
|
||||
"]{update=" + this.mapUpdate + "}";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
/**
|
||||
* 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 VIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.activegroups.command;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Holds information about the Value in the Map
|
||||
*
|
||||
*/
|
||||
public class EntryValue<V> {
|
||||
private EntryKey key;
|
||||
private V value;
|
||||
|
||||
|
||||
public EntryValue(EntryKey key, V value){
|
||||
this.key=key;
|
||||
this.value=value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the owner
|
||||
*/
|
||||
public EntryKey getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the key
|
||||
*/
|
||||
public V getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* set the value
|
||||
* @param value
|
||||
*/
|
||||
public void setValue(V value) {
|
||||
this.value=value;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.value != null ? this.value.hashCode() : super.hashCode();
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
boolean result = false;
|
||||
if (obj instanceof EntryValue) {
|
||||
EntryValue other = (EntryValue)obj;
|
||||
result = (this.value==null && other.value==null) ||
|
||||
(this.value != null && other.value != null && this.value.equals(other.value));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups.command;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Return information about map update
|
||||
*
|
||||
*/
|
||||
public class MapRequest {
|
||||
private static final Log LOG = LogFactory.getLog(MapRequest.class);
|
||||
private final AtomicBoolean done = new AtomicBoolean();
|
||||
private Object response;
|
||||
private RequestCallback callback;
|
||||
|
||||
public Object get(long timeout) {
|
||||
synchronized (this.done) {
|
||||
if (this.done.get() == false && this.response == null) {
|
||||
try {
|
||||
this.done.wait(timeout);
|
||||
} catch (InterruptedException e) {
|
||||
LOG.warn("Interrupted in get("+timeout+")",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public void put(String id,Object response) {
|
||||
this.response = response;
|
||||
cancel();
|
||||
RequestCallback callback = this.callback;
|
||||
if (callback != null) {
|
||||
callback.finished(id);
|
||||
}
|
||||
}
|
||||
|
||||
public void cancel() {
|
||||
this.done.set(true);
|
||||
synchronized (this.done) {
|
||||
this.done.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
public void setCallback(RequestCallback callback) {
|
||||
this.callback=callback;
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups.command;
|
||||
|
||||
|
||||
/**
|
||||
* Return information about map update
|
||||
*
|
||||
*/
|
||||
public interface RequestCallback{
|
||||
/**
|
||||
* Optionally called when a request is finished
|
||||
* @param id
|
||||
*/
|
||||
void finished(String id);
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Shared state, messaging and membership information between members of a distributed group
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,37 +0,0 @@
|
|||
## ------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# The logging properties used for eclipse testing, We want to see debug output on the console.
|
||||
#
|
||||
log4j.rootLogger=INFO, out
|
||||
|
||||
|
||||
|
||||
# CONSOLE appender not used by default
|
||||
log4j.appender.out=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.out.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
|
||||
#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
|
||||
|
||||
# File appender
|
||||
log4j.appender.fout=org.apache.log4j.FileAppender
|
||||
log4j.appender.fout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.fout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
|
||||
log4j.appender.fout.file=target/amq-testlog.log
|
||||
log4j.appender.fout.append=true
|
||||
|
|
@ -1,155 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.activemq.ActiveMQConnection;
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
||||
|
||||
public class GroupMemberTest extends TestCase {
|
||||
protected BrokerService broker;
|
||||
protected String bindAddress = ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL;
|
||||
|
||||
|
||||
public void testCoordinatorSelection() throws Exception{
|
||||
Group group = new Group(null,"");
|
||||
List<Member>list = new ArrayList<Member>();
|
||||
final int number =10;
|
||||
Member choosen = null;
|
||||
for (int i =0;i< number;i++) {
|
||||
Member m = new Member("group"+i);
|
||||
m.setId(""+i);
|
||||
if (number/2==i) {
|
||||
m.setCoordinatorWeight(10);
|
||||
choosen=m;
|
||||
}
|
||||
list.add(m);
|
||||
}
|
||||
Member c = group.selectCordinator(list);
|
||||
assertEquals(c,choosen);
|
||||
}
|
||||
/**
|
||||
* Test method for
|
||||
* {@link org.apache.activemq.group.Group#addMemberChangedListener(org.apache.activemq.group.MemberChangedListener)}.
|
||||
* @throws Exception
|
||||
*/
|
||||
public void testGroup() throws Exception {
|
||||
|
||||
final int number = 10;
|
||||
List<Group>groupMaps = new ArrayList<Group>();
|
||||
ConnectionFactory factory = createConnectionFactory();
|
||||
for (int i =0; i < number; i++) {
|
||||
Connection connection = factory.createConnection();
|
||||
Group map = new Group(connection,"map"+i);
|
||||
map.setHeartBeatInterval(200);
|
||||
map.setMinimumGroupSize(i+1);
|
||||
map.start();
|
||||
groupMaps.add(map);
|
||||
}
|
||||
|
||||
int coordinatorNumber = 0;
|
||||
for (Group map:groupMaps) {
|
||||
if (map.isCoordinator()) {
|
||||
coordinatorNumber++;
|
||||
}
|
||||
}
|
||||
for(Group map:groupMaps) {
|
||||
map.stop();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void testWeightedGroup() throws Exception {
|
||||
|
||||
final int number = 10;
|
||||
List<Group>groupMaps = new ArrayList<Group>();
|
||||
Group last = null;
|
||||
ConnectionFactory factory = createConnectionFactory();
|
||||
for (int i =0; i < number; i++) {
|
||||
Connection connection = factory.createConnection();
|
||||
Group map = new Group(connection,"map"+i);
|
||||
if(i ==number/2) {
|
||||
map.setCoordinatorWeight(10);
|
||||
last=map;
|
||||
}
|
||||
|
||||
map.setMinimumGroupSize(i+1);
|
||||
map.start();
|
||||
groupMaps.add(map);
|
||||
}
|
||||
Thread.sleep(2000);
|
||||
int coordinator = 0;
|
||||
Group groupCoordinator = null;
|
||||
for (Group map:groupMaps) {
|
||||
if (map.isCoordinator()) {
|
||||
coordinator++;
|
||||
groupCoordinator=map;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
assertNotNull(groupCoordinator);
|
||||
assertEquals(1,coordinator);
|
||||
assertEquals(last.getName(),groupCoordinator.getName());
|
||||
|
||||
for(Group map:groupMaps) {
|
||||
map.stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
if (broker == null) {
|
||||
broker = createBroker();
|
||||
}
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
protected void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
if (broker != null) {
|
||||
broker.stop();
|
||||
}
|
||||
}
|
||||
|
||||
protected ActiveMQConnectionFactory createConnectionFactory()throws Exception {
|
||||
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(
|
||||
ActiveMQConnection.DEFAULT_BROKER_URL);
|
||||
return cf;
|
||||
}
|
||||
|
||||
protected BrokerService createBroker() throws Exception {
|
||||
BrokerService answer = new BrokerService();
|
||||
configureBroker(answer);
|
||||
answer.start();
|
||||
return answer;
|
||||
}
|
||||
|
||||
protected void configureBroker(BrokerService answer) throws Exception {
|
||||
answer.setPersistent(false);
|
||||
answer.addConnector(bindAddress);
|
||||
answer.setDeleteAllMessagesOnStartup(true);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,230 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.JMSException;
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.activemq.ActiveMQConnection;
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
||||
public class GroupMessageTest extends TestCase {
|
||||
protected BrokerService broker;
|
||||
protected String bindAddress = ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL;
|
||||
|
||||
public void testGroupBroadcast() throws Exception {
|
||||
final int number = 10;
|
||||
final AtomicInteger count = new AtomicInteger();
|
||||
List<Group> groups = new ArrayList<Group>();
|
||||
ConnectionFactory factory = createConnectionFactory();
|
||||
for (int i = 0; i < number; i++) {
|
||||
Connection connection = factory.createConnection();
|
||||
Group group = new Group(connection, "group" + i);
|
||||
group.setMinimumGroupSize(i+1);
|
||||
group.start();
|
||||
groups.add(group);
|
||||
group.addGroupMessageListener(new GroupMessageListener() {
|
||||
public void messageDelivered(Member sender, String replyId,
|
||||
Object message) {
|
||||
synchronized (count) {
|
||||
if (count.incrementAndGet() == number) {
|
||||
count.notifyAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
groups.get(0).broadcastMessage("hello");
|
||||
synchronized (count) {
|
||||
if (count.get() < number) {
|
||||
count.wait(5000);
|
||||
}
|
||||
}
|
||||
assertEquals(number, count.get());
|
||||
for (Group map : groups) {
|
||||
map.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public void testsendMessage() throws Exception {
|
||||
final int number = 10;
|
||||
final AtomicInteger count = new AtomicInteger();
|
||||
List<Group> groups = new ArrayList<Group>();
|
||||
ConnectionFactory factory = createConnectionFactory();
|
||||
for (int i = 0; i < number; i++) {
|
||||
Connection connection = factory.createConnection();
|
||||
Group group = new Group(connection, "group" + i);
|
||||
group.setMinimumGroupSize(i+1);
|
||||
group.start();
|
||||
groups.add(group);
|
||||
group.addGroupMessageListener(new GroupMessageListener() {
|
||||
public void messageDelivered(Member sender, String replyId,
|
||||
Object message) {
|
||||
synchronized (count) {
|
||||
count.incrementAndGet();
|
||||
count.notifyAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
groups.get(0).sendMessage("hello");
|
||||
synchronized (count) {
|
||||
if (count.get() == 0) {
|
||||
count.wait(5000);
|
||||
}
|
||||
}
|
||||
// wait a while to check that only one got it
|
||||
Thread.sleep(2000);
|
||||
assertEquals(1, count.get());
|
||||
for (Group map : groups) {
|
||||
map.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public void testSendToSingleMember() throws Exception {
|
||||
ConnectionFactory factory = createConnectionFactory();
|
||||
Connection connection1 = factory.createConnection();
|
||||
Connection connection2 = factory.createConnection();
|
||||
Group group1 = new Group(connection1, "group1");
|
||||
final AtomicBoolean called = new AtomicBoolean();
|
||||
group1.addGroupMessageListener(new GroupMessageListener() {
|
||||
public void messageDelivered(Member sender, String replyId,
|
||||
Object message) {
|
||||
synchronized (called) {
|
||||
called.set(true);
|
||||
called.notifyAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
group1.start();
|
||||
Group group2 = new Group(connection2, "group2");
|
||||
group2.setMinimumGroupSize(2);
|
||||
group2.start();
|
||||
Member member1 = group2.getMemberByName("group1");
|
||||
group2.sendMessage(member1, "hello");
|
||||
synchronized (called) {
|
||||
if (!called.get()) {
|
||||
called.wait(5000);
|
||||
}
|
||||
}
|
||||
assertTrue(called.get());
|
||||
group1.stop();
|
||||
group2.stop();
|
||||
}
|
||||
|
||||
public void testSendRequestReply() throws Exception {
|
||||
ConnectionFactory factory = createConnectionFactory();
|
||||
Connection connection1 = factory.createConnection();
|
||||
Connection connection2 = factory.createConnection();
|
||||
final int number = 1000;
|
||||
final AtomicInteger requestCount = new AtomicInteger();
|
||||
final AtomicInteger replyCount = new AtomicInteger();
|
||||
final List<String> requests = new ArrayList<String>();
|
||||
final List<String> replies = new ArrayList<String>();
|
||||
for (int i = 0; i < number; i++) {
|
||||
requests.add("request" + i);
|
||||
replies.add("reply" + i);
|
||||
}
|
||||
final Group group1 = new Group(connection1, "group1");
|
||||
final AtomicBoolean finished = new AtomicBoolean();
|
||||
group1.addGroupMessageListener(new GroupMessageListener() {
|
||||
public void messageDelivered(Member sender, String replyId,
|
||||
Object message) {
|
||||
if (!replies.isEmpty()) {
|
||||
String reply = replies.remove(0);
|
||||
try {
|
||||
group1.sendMessageResponse(sender, replyId, reply);
|
||||
} catch (JMSException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
group1.start();
|
||||
final Group group2 = new Group(connection2, "group2");
|
||||
group2.setMinimumGroupSize(2);
|
||||
group2.addGroupMessageListener(new GroupMessageListener() {
|
||||
public void messageDelivered(Member sender, String replyId,
|
||||
Object message) {
|
||||
if (!requests.isEmpty()) {
|
||||
String request = requests.remove(0);
|
||||
try {
|
||||
group2.sendMessage(sender, request);
|
||||
} catch (JMSException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}else {
|
||||
synchronized (finished) {
|
||||
finished.set(true);
|
||||
finished.notifyAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
group2.start();
|
||||
Member member1 = group2.getMemberByName("group1");
|
||||
group2.sendMessage(member1, requests.remove(0));
|
||||
synchronized (finished) {
|
||||
if (!finished.get()) {
|
||||
finished.wait(10000);
|
||||
}
|
||||
}
|
||||
assertTrue(finished.get());
|
||||
group1.stop();
|
||||
group2.stop();
|
||||
}
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
if (broker == null) {
|
||||
broker = createBroker();
|
||||
}
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
protected void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
if (broker != null) {
|
||||
broker.stop();
|
||||
}
|
||||
}
|
||||
|
||||
protected ActiveMQConnectionFactory createConnectionFactory()
|
||||
throws Exception {
|
||||
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(
|
||||
ActiveMQConnection.DEFAULT_BROKER_URL);
|
||||
return cf;
|
||||
}
|
||||
|
||||
protected BrokerService createBroker() throws Exception {
|
||||
BrokerService answer = new BrokerService();
|
||||
configureBroker(answer);
|
||||
answer.start();
|
||||
return answer;
|
||||
}
|
||||
|
||||
protected void configureBroker(BrokerService answer) throws Exception {
|
||||
answer.setPersistent(false);
|
||||
answer.addConnector(bindAddress);
|
||||
answer.setDeleteAllMessagesOnStartup(true);
|
||||
}
|
||||
}
|
|
@ -1,548 +0,0 @@
|
|||
/**
|
||||
* 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.activegroups;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.activemq.ActiveMQConnection;
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
||||
|
||||
public class GroupStateTest extends TestCase {
|
||||
protected BrokerService broker;
|
||||
protected Connection connection1;
|
||||
protected Connection connection2;
|
||||
protected String bindAddress = ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL;
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
* {@link org.apache.activemq.group.Group#addMemberChangedListener(org.apache.activemq.group.MemberChangedListener)}.
|
||||
* @throws Exception
|
||||
*/
|
||||
public void testAddMemberChangedListener() throws Exception {
|
||||
final AtomicInteger counter = new AtomicInteger();
|
||||
Group map1 = new Group(connection1,"map1");
|
||||
map1.addMemberChangedListener(new MemberChangedListener(){
|
||||
|
||||
public void memberStarted(Member member) {
|
||||
synchronized(counter) {
|
||||
counter.incrementAndGet();
|
||||
counter.notifyAll();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void memberStopped(Member member) {
|
||||
synchronized(counter) {
|
||||
counter.decrementAndGet();
|
||||
counter.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
map1.start();
|
||||
synchronized(counter) {
|
||||
if (counter.get()<1) {
|
||||
counter.wait(5000);
|
||||
}
|
||||
}
|
||||
assertEquals(1, counter.get());
|
||||
Group map2 = new Group(connection2,"map2");
|
||||
map2.start();
|
||||
synchronized(counter) {
|
||||
if (counter.get()<2) {
|
||||
counter.wait(5000);
|
||||
}
|
||||
}
|
||||
assertEquals(2, counter.get());
|
||||
map2.stop();
|
||||
synchronized(counter) {
|
||||
if (counter.get()>=2) {
|
||||
counter.wait(Group.DEFAULT_HEART_BEAT_INTERVAL*3);
|
||||
}
|
||||
}
|
||||
assertEquals(1, counter.get());
|
||||
map1.stop();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
* {@link org.apache.activemq.group.Group#addMapChangedListener(org.apache.activemq.group.MapChangedListener)}.
|
||||
* @throws Exception
|
||||
*/
|
||||
public void testAddMapChangedListener() throws Exception {
|
||||
final AtomicBoolean called1 = new AtomicBoolean();
|
||||
final AtomicBoolean called2 = new AtomicBoolean();
|
||||
|
||||
Group map1 = new Group(connection1,"map1");
|
||||
|
||||
map1.addMapChangedListener(new DefaultMapChangedListener() {
|
||||
public void mapInsert(Member owner,Object Key, Object Value) {
|
||||
synchronized(called1) {
|
||||
called1.set(true);
|
||||
called1.notifyAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
map1.start();
|
||||
|
||||
Group map2 = new Group(connection2,"map2");
|
||||
|
||||
map2.addMapChangedListener(new DefaultMapChangedListener() {
|
||||
public void mapInsert(Member owner,Object Key, Object Value) {
|
||||
synchronized(called2) {
|
||||
called2.set(true);
|
||||
called2.notifyAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
map2.start();
|
||||
|
||||
|
||||
map1.put("test", "blob");
|
||||
synchronized(called1) {
|
||||
if (!called1.get()) {
|
||||
called1.wait(5000);
|
||||
}
|
||||
}
|
||||
synchronized(called2) {
|
||||
if (!called2.get()) {
|
||||
called2.wait(5000);
|
||||
}
|
||||
}
|
||||
assertTrue(called1.get());
|
||||
assertTrue(called2.get());
|
||||
map1.stop();
|
||||
map2.stop();
|
||||
}
|
||||
|
||||
public void testGetImplicitWriteLock() throws Exception {
|
||||
Group map1 = new Group(connection1, "map1");
|
||||
final AtomicBoolean called = new AtomicBoolean();
|
||||
map1.start();
|
||||
Group map2 = new Group(connection2, "map2");
|
||||
map2.setAlwaysLock(true);
|
||||
map2.setMinimumGroupSize(2);
|
||||
map2.start();
|
||||
map2.put("test", "foo");
|
||||
try {
|
||||
map1.put("test", "bah");
|
||||
fail("Should have thrown an exception!");
|
||||
} catch (GroupUpdateException e) {
|
||||
}
|
||||
map1.stop();
|
||||
map2.stop();
|
||||
}
|
||||
|
||||
public void testExpireImplicitWriteLock() throws Exception {
|
||||
Group map1 = new Group(connection1, "map1");
|
||||
final AtomicBoolean called = new AtomicBoolean();
|
||||
map1.start();
|
||||
Group map2 = new Group(connection2, "map2");
|
||||
map2.setAlwaysLock(true);
|
||||
map2.setLockTimeToLive(1000);
|
||||
map2.setMinimumGroupSize(2);
|
||||
map2.start();
|
||||
map2.put("test", "foo");
|
||||
try {
|
||||
map1.put("test", "bah");
|
||||
fail("Should have thrown an exception!");
|
||||
} catch (GroupUpdateException e) {
|
||||
}
|
||||
Thread.sleep(2000);
|
||||
map1.put("test", "bah");
|
||||
map1.stop();
|
||||
map2.stop();
|
||||
}
|
||||
|
||||
public void XtestExpireImplicitLockOnExit() throws Exception {
|
||||
Group map1 = new Group(connection1, "map1");
|
||||
final AtomicBoolean called = new AtomicBoolean();
|
||||
map1.start();
|
||||
Group map2 = new Group(connection2, "map2");
|
||||
map2.setAlwaysLock(true);
|
||||
map2.setMinimumGroupSize(2);
|
||||
map2.start();
|
||||
map2.put("test", "foo");
|
||||
try {
|
||||
map1.put("test", "bah");
|
||||
fail("Should have thrown an exception!");
|
||||
} catch (GroupUpdateException e) {
|
||||
}
|
||||
map2.stop();
|
||||
map1.put("test", "bah");
|
||||
map1.stop();
|
||||
|
||||
}
|
||||
|
||||
public void testGetExplicitWriteLock() throws Exception {
|
||||
Group map1 = new Group(connection1, "map1");
|
||||
map1.setAlwaysLock(true);
|
||||
final AtomicBoolean called = new AtomicBoolean();
|
||||
map1.start();
|
||||
Group map2 = new Group(connection2, "map2");
|
||||
map2.setAlwaysLock(true);
|
||||
map2.setMinimumGroupSize(2);
|
||||
map2.start();
|
||||
map2.put("test", "foo");
|
||||
map2.lock("test");
|
||||
try {
|
||||
map1.put("test", "bah");
|
||||
fail("Should have thrown an exception!");
|
||||
} catch (GroupUpdateException e) {
|
||||
}
|
||||
map2.unlock("test");
|
||||
map1.lock("test");
|
||||
try {
|
||||
map2.lock("test");
|
||||
fail("Should have thrown an exception!");
|
||||
} catch (GroupUpdateException e) {
|
||||
}
|
||||
map1.stop();
|
||||
map2.stop();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test method for {@link org.apache.activemq.group.Group#clear()}.
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public void testClear() throws Exception {
|
||||
Group map1 = new Group(connection1,"map1");
|
||||
final AtomicBoolean called = new AtomicBoolean();
|
||||
map1.addMapChangedListener(new DefaultMapChangedListener() {
|
||||
public void mapInsert(Member owner,Object Key, Object Value) {
|
||||
synchronized(called) {
|
||||
called.set(true);
|
||||
called.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
public void mapRemove(Member owner, Object key, Object value,boolean expired) {
|
||||
synchronized(called) {
|
||||
called.set(true);
|
||||
called.notifyAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
map1.start();
|
||||
Group map2 = new Group(connection2,"map2");
|
||||
map2.start();
|
||||
map2.put("test","foo");
|
||||
synchronized(called) {
|
||||
if (!called.get()) {
|
||||
called.wait(5000);
|
||||
}
|
||||
}
|
||||
assertTrue(called.get());
|
||||
called.set(false);
|
||||
assertTrue(map1.isEmpty()==false);
|
||||
map2.clear();
|
||||
synchronized(called) {
|
||||
if (!called.get()) {
|
||||
called.wait(5000);
|
||||
}
|
||||
}
|
||||
assertTrue(map1.isEmpty());
|
||||
map1.stop();
|
||||
map2.stop();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test a new map is populated for existing values
|
||||
*/
|
||||
public void testMapUpdatedOnStart() throws Exception {
|
||||
Group map1 = new Group(connection1,"map1");
|
||||
final AtomicBoolean called = new AtomicBoolean();
|
||||
|
||||
map1.start();
|
||||
map1.put("test", "foo");
|
||||
Group map2 = new Group(connection2,"map2");
|
||||
map2.addMapChangedListener(new DefaultMapChangedListener() {
|
||||
public void mapInsert(Member owner,Object Key, Object Value) {
|
||||
synchronized(called) {
|
||||
called.set(true);
|
||||
called.notifyAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
map2.start();
|
||||
|
||||
synchronized(called) {
|
||||
if (!called.get()) {
|
||||
called.wait(5000);
|
||||
}
|
||||
}
|
||||
assertTrue(called.get());
|
||||
called.set(false);
|
||||
assertTrue(map2.containsKey("test"));
|
||||
assertTrue(map2.containsValue("foo"));
|
||||
map1.stop();
|
||||
map2.stop();
|
||||
}
|
||||
|
||||
public void testContainsKey() throws Exception {
|
||||
Group map1 = new Group(connection1,"map1");
|
||||
final AtomicBoolean called = new AtomicBoolean();
|
||||
map1.addMapChangedListener(new DefaultMapChangedListener() {
|
||||
public void mapInsert(Member owner,Object Key, Object Value) {
|
||||
synchronized(called) {
|
||||
called.set(true);
|
||||
called.notifyAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
map1.start();
|
||||
Group map2 = new Group(connection2,"map2");
|
||||
map2.start();
|
||||
map2.put("test","foo");
|
||||
synchronized(called) {
|
||||
if (!called.get()) {
|
||||
called.wait(5000);
|
||||
}
|
||||
}
|
||||
assertTrue(called.get());
|
||||
called.set(false);
|
||||
assertTrue(map1.containsKey("test"));
|
||||
map1.stop();
|
||||
map2.stop();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
* {@link org.apache.activemq.group.Group#containsValue(java.lang.Object)}.
|
||||
* @throws Exception
|
||||
*/
|
||||
public void testContainsValue() throws Exception {
|
||||
Group map1 = new Group(connection1,"map1");
|
||||
final AtomicBoolean called = new AtomicBoolean();
|
||||
map1.addMapChangedListener(new DefaultMapChangedListener() {
|
||||
public void mapInsert(Member owner,Object Key, Object Value) {
|
||||
synchronized(called) {
|
||||
called.set(true);
|
||||
called.notifyAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
map1.start();
|
||||
Group map2 = new Group(connection2,"map2");
|
||||
map2.start();
|
||||
map2.put("test","foo");
|
||||
synchronized(called) {
|
||||
if (!called.get()) {
|
||||
called.wait(5000);
|
||||
}
|
||||
}
|
||||
assertTrue(called.get());
|
||||
called.set(false);
|
||||
assertTrue(map1.containsValue("foo"));
|
||||
map1.stop();
|
||||
map2.stop();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link org.apache.activemq.group.GroupMap#entrySet()}.
|
||||
* @throws Exception
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
* {@link org.apache.activemq.group.Group#get(java.lang.Object)}.
|
||||
* @throws Exception
|
||||
*/
|
||||
public void testGet() throws Exception {
|
||||
Group map1 = new Group(connection1,"map1");
|
||||
final AtomicBoolean called = new AtomicBoolean();
|
||||
map1.addMapChangedListener(new DefaultMapChangedListener() {
|
||||
public void mapInsert(Member owner,Object Key, Object Value) {
|
||||
synchronized(called) {
|
||||
called.set(true);
|
||||
called.notifyAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
map1.start();
|
||||
Group map2 = new Group(connection2,"map2");
|
||||
map2.start();
|
||||
map2.put("test","foo");
|
||||
synchronized(called) {
|
||||
if (!called.get()) {
|
||||
called.wait(5000);
|
||||
}
|
||||
}
|
||||
assertTrue(called.get());
|
||||
assertTrue(map1.get("test").equals("foo"));
|
||||
map1.stop();
|
||||
map2.stop();
|
||||
}
|
||||
|
||||
public void testPut() throws Exception {
|
||||
Group map1 = new Group(connection1,"map1");
|
||||
map1.start();
|
||||
Group map2 = new Group(connection2,"map2");
|
||||
map2.setMinimumGroupSize(2);
|
||||
map2.start();
|
||||
Object value = map1.put("foo", "blob");
|
||||
assertNull(value);
|
||||
value = map1.put("foo", "blah");
|
||||
assertEquals(value, "blob");
|
||||
map1.stop();
|
||||
map2.stop();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
* {@link org.apache.activemq.group.Group#remove(java.lang.Object)}.
|
||||
*/
|
||||
public void testRemove() throws Exception{
|
||||
Group map1 = new Group(connection1,"map1");
|
||||
final AtomicBoolean called = new AtomicBoolean();
|
||||
map1.addMapChangedListener(new DefaultMapChangedListener() {
|
||||
public void mapInsert(Member owner,Object Key, Object Value) {
|
||||
synchronized(called) {
|
||||
called.set(true);
|
||||
called.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
public void mapRemove(Member owner, Object key, Object value,boolean expired) {
|
||||
synchronized(called) {
|
||||
called.set(true);
|
||||
called.notifyAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
map1.start();
|
||||
Group map2 = new Group(connection2,"map2");
|
||||
map2.start();
|
||||
map2.put("test","foo");
|
||||
synchronized(called) {
|
||||
if (!called.get()) {
|
||||
called.wait(5000);
|
||||
}
|
||||
}
|
||||
assertTrue(called.get());
|
||||
called.set(false);
|
||||
assertTrue(map1.isEmpty()==false);
|
||||
map2.remove("test");
|
||||
synchronized(called) {
|
||||
if (!called.get()) {
|
||||
called.wait(5000);
|
||||
}
|
||||
}
|
||||
assertTrue(map1.isEmpty());
|
||||
|
||||
map1.stop();
|
||||
map2.stop();
|
||||
}
|
||||
|
||||
public void testExpire() throws Exception{
|
||||
final AtomicBoolean called1 = new AtomicBoolean();
|
||||
final AtomicBoolean called2 = new AtomicBoolean();
|
||||
|
||||
Group map1 = new Group(connection1,"map1");
|
||||
map1.setTimeToLive(1000);
|
||||
map1.addMapChangedListener(new DefaultMapChangedListener() {
|
||||
public void mapRemove(Member owner, Object key, Object value,boolean expired) {
|
||||
synchronized(called1) {
|
||||
called1.set(expired);
|
||||
called1.notifyAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
map1.start();
|
||||
|
||||
Group map2 = new Group(connection2,"map2");
|
||||
|
||||
map2.addMapChangedListener(new DefaultMapChangedListener() {
|
||||
public void mapRemove(Member owner, Object key, Object value,boolean expired) {
|
||||
synchronized(called2) {
|
||||
called2.set(expired);
|
||||
called2.notifyAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
map2.start();
|
||||
|
||||
|
||||
map1.put("test", "blob");
|
||||
synchronized(called1) {
|
||||
if (!called1.get()) {
|
||||
called1.wait(5000);
|
||||
}
|
||||
}
|
||||
synchronized(called2) {
|
||||
if (!called2.get()) {
|
||||
called2.wait(5000);
|
||||
}
|
||||
}
|
||||
assertTrue(called1.get());
|
||||
assertTrue(called2.get());
|
||||
map1.stop();
|
||||
map2.stop();
|
||||
}
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
if (broker == null) {
|
||||
broker = createBroker();
|
||||
}
|
||||
ConnectionFactory factory = createConnectionFactory();
|
||||
connection1 = factory.createConnection();
|
||||
connection1.start();
|
||||
connection2 = factory.createConnection();
|
||||
connection2.start();
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
protected void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
connection1.close();
|
||||
connection2.close();
|
||||
if (broker != null) {
|
||||
broker.stop();
|
||||
}
|
||||
}
|
||||
|
||||
protected ActiveMQConnectionFactory createConnectionFactory()throws Exception {
|
||||
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(
|
||||
ActiveMQConnection.DEFAULT_BROKER_URL);
|
||||
return cf;
|
||||
}
|
||||
|
||||
protected BrokerService createBroker() throws Exception {
|
||||
BrokerService answer = new BrokerService();
|
||||
configureBroker(answer);
|
||||
answer.start();
|
||||
return answer;
|
||||
}
|
||||
|
||||
protected void configureBroker(BrokerService answer) throws Exception {
|
||||
answer.setPersistent(false);
|
||||
answer.addConnector(bindAddress);
|
||||
answer.setDeleteAllMessagesOnStartup(true);
|
||||
}
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<artifactId>activemq-parent</artifactId>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<version>5.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>activemq-perftest</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>ActiveMQ :: Performance Test</name>
|
||||
<description>Performance Testing Framework for ActiveMQ</description>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.activemq.tooling</groupId>
|
||||
<artifactId>maven-activemq-perf-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.activemq.tooling</groupId>
|
||||
<artifactId>maven-activemq-memtest-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -1,585 +0,0 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<h2><a name="ActiveMQPerformanceModuleUsersManual-RunningMaven2PerformanceTest"></a>Running Maven 2 Performance Test</h2>
|
||||
|
||||
<p>This <span class="nobr"><a href="http://maven.apache.org" title="Visit page outside Confluence" rel="nofollow">Maven 2</a></span> plugin allows you to run performance tests easily using the Maven command line or run tests automatically in <span class="nobr"><a href="http://maven.apache.org/continuum/" title="Visit page outside Confluence" rel="nofollow">Continuum</a></span></p>
|
||||
|
||||
<h3><a name="ActiveMQPerformanceModuleUsersManual-Prerequisites"></a>Prerequisites</h3>
|
||||
|
||||
<p>Currently we have not released the plugin so you could well have to build it yourself first. Start with a complete build of Apache ActiveMQ and then do</p>
|
||||
<div class="code"><div class="codeContent">
|
||||
<pre class="code-java">cd tooling/maven-activemq-perf-plugin
|
||||
mvn clean install</pre>
|
||||
</div></div>
|
||||
<p>To run the following Maven goals make sure you are inside a Maven2 project directory where its POM is enabled with the Maven2 plugin such as the <span class="nobr"><a href="http://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-perftest/" title="Visit page outside Confluence" rel="nofollow">activemq-perftest module</a></span>.</p>
|
||||
|
||||
<h3><a name="ActiveMQPerformanceModuleUsersManual-Gettingstarted"></a>Getting started</h3>
|
||||
|
||||
<p>To get started try typing the following commands into separate shells from the <span class="nobr"><a href="http://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-perftest/" title="Visit page outside Confluence" rel="nofollow">activemq-perftest directory</a></span></p>
|
||||
<div class="code"><div class="codeContent">
|
||||
<pre class="code-java">mvn activemq-perf:broker -Durl=broker:tcp:<span class="code-comment">//localhost:61616
|
||||
</span>mvn activemq-perf:consumer
|
||||
mvn activemq-perf:producer</pre>
|
||||
</div></div>
|
||||
<p>If you run the broker on a different machine then change the producer and consumer commands to</p>
|
||||
<div class="code"><div class="codeContent">
|
||||
<pre class="code-java">mvn activemq-perf:consumer -Dfactory.brokerUrl=tcp:<span class="code-comment">//host:port
|
||||
</span>mvn activemq-perf:producer -Dfactory.brokerUrl=tcp:<span class="code-comment">//host:port</span></pre>
|
||||
</div></div>
|
||||
<p>where you switch host:port with the actual values.</p>
|
||||
|
||||
<p>When you run the producer & consumer, it generates an XML performance report in the current directory, so that you can graph and chart the results etc. See the <a href="/confluence/display/ACTIVEMQ/sample+report" title="sample report">sample report</a></p>
|
||||
|
||||
<h3><a name="ActiveMQPerformanceModuleUsersManual-Mavengoals"></a>Maven goals</h3>
|
||||
|
||||
<table border="1" class="confluenceTable"><tbody>
|
||||
<tr>
|
||||
<th class="confluenceTh"> Goal </th>
|
||||
<th class="confluenceTh"> Description </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> activemq-perf:broker </td>
|
||||
<td class="confluenceTd"> Starts broker using the activemq configuration file located in "src\main\resources\broker-conf" where the default config is activemq.xml. <br clear="all">
|
||||
Parameters: <br clear="all">
|
||||
1. -DconfigType - specifies the type of configuration to use. Its value must be one of the filename in the "..\broker-config" directory (e.g. -DconfigType=kaha). <br clear="all">
|
||||
2. -DconfigFile - path to config file other than those in "src\..\broker-config".e.g -DconfigFile=c:\dir\activemq.xml) </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> activemq-perf:consumer </td>
|
||||
<td class="confluenceTd"> Starts the consumer's performance testing. The generated report file can be found in the directory specified in the parameter "sysTest.reportDir". </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> activemq-perf:producer </td>
|
||||
<td class="confluenceTd"> Starts the producer's performance testing. The generated report file can be found in the directory specified in the parameter "sysTest.reportDir". </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<p><sup>1</sup> <b>Note</b>:The parameters for both consumer and producers are described in the next section. (<a href="/confluence/display/ACTIVEMQ/sample+report" title="sample report">sample report</a>)</p>
|
||||
|
||||
<h3><a name="ActiveMQPerformanceModuleUsersManual-ConfigurationforrunningasystemofJMSClients(Producer/Consumer)"></a>Configuration for running a system of JMS Clients (Producer/Consumer)</h3>
|
||||
|
||||
<table border="1" class="confluenceTable"><tbody>
|
||||
<tr>
|
||||
<th class="confluenceTh"> Configuration Key </th>
|
||||
<th class="confluenceTh"> Default Value <br clear="all"> </th>
|
||||
<th class="confluenceTh"> Description </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> sysTest.clientPrefix </td>
|
||||
<td class="confluenceTd"> JmsConsumer or JmsProducer </td>
|
||||
<td class="confluenceTd"> Specifies the client name prefix that will be use for each system. By default it will use JmsConsumer for consumer systems, and JmsProducer for producer systems. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> sysTest.numClients </td>
|
||||
<td class="confluenceTd"> 1 </td>
|
||||
<td class="confluenceTd"> Specifies the number of JMS Clients to start. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> sysTest.totalDests </td>
|
||||
<td class="confluenceTd"> 1 </td>
|
||||
<td class="confluenceTd"> Specifies the total number of destinations to use for the whole system test. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> sysTest.destDistro </td>
|
||||
<td class="confluenceTd"> all </td>
|
||||
<td class="confluenceTd"> Specifies how to distribute the destinations to the clients. Available values are (Invalid value will result to using the default value 'all')<sup>1</sup>:
|
||||
<ul>
|
||||
<li>'all' - All clients will send/receive to all destinations. i.e. if there are 2 producers and 5 destinations, each producer will send a message to each individual destination.</li>
|
||||
<li>'equal' - Clients will equally divide the destinations among themselves. i.e. if there are 2 producers and 5 destinations, each producer will send messages to 2 destinations. The fifth destination will not be used.</li>
|
||||
<li>'divide' - Clients will divide the destinations among themselves regardless of equality. i.e. if there are 2 producers and 5 destinations, producer 1 will send to 3 destinations, while producer 2 will send to 2 destinations.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> sysTest.reportDirectory </td>
|
||||
<td class="confluenceTd"> ./ </td>
|
||||
<td class="confluenceTd"> The directory where the sampler report will be saved. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> sysTest.reportName </td>
|
||||
<td class="confluenceTd"> null </td>
|
||||
<td class="confluenceTd"> The default filename the sampler report will be saved us. There is usually no need to set this setting as the default value will create either JmsProducer_numClients#<em>numDests#</em><Dest Distro>.xml and JmsConsumer_numClients#_numDests#_<Dest Distro>.xml, where # represents the number of clients and destinations set for that system, and <Dest Distro> specifies the destination distribution for the system. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> sysTest.reportType </td>
|
||||
<td class="confluenceTd"> xml </td>
|
||||
<td class="confluenceTd"> Specifies the manner of generating the performance report. Available values are:
|
||||
<ul>
|
||||
<li>'xml' - Write the performance report into an xml file. Specified by reportDirectory and reportName. A verbose summary will also be displayed at the end of the test.</li>
|
||||
<li>'verbose' - All information will be written to the standard output, which includes settings, sampler data, and performance summary.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> sysTest.samplers </td>
|
||||
<td class="confluenceTd"> tp,cpu </td>
|
||||
<td class="confluenceTd"> Specifies the samplers that will be started. To use enable more than one sampler, separate the values by commas without spaces. Available values are:
|
||||
<ul>
|
||||
<li>'tp' - Throughput sampler</li>
|
||||
<li>'cpu' - CPU Usage sampler</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> sysTest.spiClass </td>
|
||||
<td class="confluenceTd"> org.apache.activemq.tool.spi.ActiveMQClassLoaderSPI </td>
|
||||
<td class="confluenceTd"> The service provider interface class that allows the client to create a generic connection factory. Current available SPI classes include:
|
||||
<ol>
|
||||
<li>'org.apache.activemq.tool.ActiveMQPojoSPI'</li>
|
||||
<li>'org.apache.activemq.tool.ActiveMQClassLoaderSPI'</li>
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<p><sup>1</sup> <b>Note</b>: If the number of destinations is less than the number of clients and the distribution type is either 'equal' or 'divide', each client will send/receive from only one destination, distributing the destinations among the clients. i.e. if there are 5 producers and 2 destinations, 3 producers will send to destination 1, and 2 producers will send to destination 2. Also, a consumer can only receive from a single destination, unless composite destination is supported and specified.</p>
|
||||
|
||||
<h3><a name="ActiveMQPerformanceModuleUsersManual-ConfigurationforrunningaJMSProducer"></a>Configuration for running a JMS Producer</h3>
|
||||
|
||||
<table border="1" class="confluenceTable"><tbody>
|
||||
<tr>
|
||||
<th class="confluenceTh"> Configuration Key </th>
|
||||
<th class="confluenceTh"> Default Value </th>
|
||||
<th class="confluenceTh"> Description </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> producer.sessTransacted </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
<td class="confluenceTd"> Specifies if the session created will be transacted or not. See the JMS Specifications for more details. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> producer.sessAckMode </td>
|
||||
<td class="confluenceTd"> autoAck </td>
|
||||
<td class="confluenceTd"> Specified the acknowledge mode of the session. See the JMS Specifications for more details. Available values are:
|
||||
<ol>
|
||||
<li>'autoAck' - Session.AUTO_ACKNOWLEDGE</li>
|
||||
<li>'clientAck' - Session.CLIENT_ACKNOWLEDGE</li>
|
||||
<li>'dupsAck' - Session.DUPS_OK_ACKNOWLEDGE</li>
|
||||
<li>'transacted' - Session.TRANSACTED</li>
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> producer.destName </td>
|
||||
<td class="confluenceTd"> TEST.FOO </td>
|
||||
<td class="confluenceTd"> The prefix of the destination name to use. To specify a queue, prefix the destination name with 'queue://', for topics, prefix the destination with 'topic://'. If no prefix is specified, a topic will be created. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> producer.destComposite </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
<td class="confluenceTd"> If there are more than one destination, and destComposite=true, the destinations will be merged into one. This assumes that the provider supports composite destinations. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> producer.deliveryMode </td>
|
||||
<td class="confluenceTd"> nonpersistent </td>
|
||||
<td class="confluenceTd"> The message delivery mode that will be used for each producer. Available values are:
|
||||
<ol>
|
||||
<li>'nonpersistent' - use non-persistent delivery mode. javax.jms.DeliveryMode.NON_PERSISTENT.</li>
|
||||
<li>'persistent' - use persistent delivery mode. javax.jms.DeliveryMode.PERSISTENT.</li>
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> producer.messageSize </td>
|
||||
<td class="confluenceTd"> 1024 bytes </td>
|
||||
<td class="confluenceTd"> The size of each text message to send. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> producer.createNewMsg </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
<td class="confluenceTd"> If true, each send will create a new JMS Message with the specified message size with incrementing text messages (i.e. Text Message 1, Text Message 2, ...). If false, only one message will be created before the send loop, and this message will be sent over and over again. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> producer.sendType </td>
|
||||
<td class="confluenceTd"> time </td>
|
||||
<td class="confluenceTd"> Send either time-based or message-count-based. Available values are:
|
||||
<ol>
|
||||
<li>'time' - keep sending messages until a specific interval of time elapses.</li>
|
||||
<li>'count' - keep sending messages until N messages has been sent.</li>
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> producer.sendCount </td>
|
||||
<td class="confluenceTd"> 1000000 msgs <br clear="all">
|
||||
(1 million) </td>
|
||||
<td class="confluenceTd"> If sendType=count, send this number of messages. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> producer.sendDuration </td>
|
||||
<td class="confluenceTd"> 300000 ms <br clear="all">
|
||||
(5 mins) </td>
|
||||
<td class="confluenceTd"> If sendType=time, send messages for this number of milliseconds. </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
|
||||
<h3><a name="ActiveMQPerformanceModuleUsersManual-ConfigurationforrunningaJMSConsumer"></a>Configuration for running a JMS Consumer</h3>
|
||||
|
||||
<table border="1" class="confluenceTable"><tbody>
|
||||
<tr>
|
||||
<th class="confluenceTh"> Configuration Key </th>
|
||||
<th class="confluenceTh"> Default Value </th>
|
||||
<th class="confluenceTh"> Description </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> consumer.sessTransacted </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
<td class="confluenceTd"> Specifies if the session created will be transacted or not. See the JMS Specifications for more details. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> consumer.sessAckMode </td>
|
||||
<td class="confluenceTd"> autoAck </td>
|
||||
<td class="confluenceTd"> Specified the acknowledge mode of the session. See the JMS Specifications for more details. Available values are:
|
||||
<ol>
|
||||
<li>'autoAck' - Session.AUTO_ACKNOWLEDGE</li>
|
||||
<li>'clientAck' - Session.CLIENT_ACKNOWLEDGE</li>
|
||||
<li>'dupsAck' - Session.DUPS_OK_ACKNOWLEDGE</li>
|
||||
<li>'transacted' - Session.TRANSACTED</li>
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> consumer.destName </td>
|
||||
<td class="confluenceTd"> TEST.FOO </td>
|
||||
<td class="confluenceTd"> The prefix of the destination name to use. To specify a queue, prefix the destination name with 'queue://', for topics, prefix the destination with 'topic://'. If no prefix is specified, a topic will be created. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> consumer.destComposite </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
<td class="confluenceTd"> If there are more than one destination, and destComposite=true, the destinations will be merged into one. This assumes that the provider supports composite destinations. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> consumer.durable </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
<td class="confluenceTd"> If true, create a durable subscriber, otherwise create a message consumer. See the JMS Specifications for more details. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> consumer.asyncRecv </td>
|
||||
<td class="confluenceTd"> true </td>
|
||||
<td class="confluenceTd"> If true, asynchronously receive messages using the onMessage() method, otherwise use the receive() method. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> consumer.recvType </td>
|
||||
<td class="confluenceTd"> time </td>
|
||||
<td class="confluenceTd"> Receive either time-based or message-count-based. Available values are:
|
||||
<ol>
|
||||
<li>'time' - keep receiving messages until a specific time interval has elapsed.</li>
|
||||
<li>'count' - keep receiving until N messages has been received.</li>
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> consumer.recvCount </td>
|
||||
<td class="confluenceTd"> 1000000 msgs <br clear="all">
|
||||
(1 million) </td>
|
||||
<td class="confluenceTd"> If recvType=count, receive this much messages. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> consumer.recvType </td>
|
||||
<td class="confluenceTd"> 300000 ms <br clear="all">
|
||||
(5 mins) </td>
|
||||
<td class="confluenceTd"> If recvType=time, receive messages for this specific time duration. </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<p><b>Note</b>: If you have more than one consumer receiving from multiple destinations, it is a good idea to change the sysTest.destDistro to 'equal', since by default it uses 'all' and a consumer can only receive from a single destination, hence all consumers will receive from the first destination in the list only.</p>
|
||||
|
||||
<h3><a name="ActiveMQPerformanceModuleUsersManual-ConfigurationforSPIConnectionFactory:org.apache.activemq.tool.spi.ActiveMQPojoSPI"></a>Configuration for SPI Connection Factory: org.apache.activemq.tool.spi.ActiveMQPojoSPI</h3>
|
||||
|
||||
<p><b>Description:</b> This provides details in configuring the JMS Connection Factory created by ActiveMQPojoSPI. Default values are based from the default values of the service provider org.apache.activemq.ActiveMQConnectionFactory.</p>
|
||||
<table border="1" class="confluenceTable"><tbody>
|
||||
<tr>
|
||||
<th class="confluenceTh"> Configuration Key </th>
|
||||
<th class="confluenceTh"> Default Value </th>
|
||||
<th class="confluenceTh"> Description </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.brokerUrl </td>
|
||||
<td class="confluenceTd"> tcp://localhost:61616 </td>
|
||||
<td class="confluenceTd"> The url of the broker the client will connect to. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.username </td>
|
||||
<td class="confluenceTd"> null </td>
|
||||
<td class="confluenceTd"> Username on the connection to use. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.password </td>
|
||||
<td class="confluenceTd"> null </td>
|
||||
<td class="confluenceTd"> Password on the connection to use. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.clientID </td>
|
||||
<td class="confluenceTd"> null </td>
|
||||
<td class="confluenceTd"> Client ID the connection will use. If none is specified, it will be automatically generated. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.asyncSend </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
<td class="confluenceTd"> If true, asynchronously send messages. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.asyncDispatch </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
<td class="confluenceTd"> If true, asynchronously dispatch messages. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.asyncSession </td>
|
||||
<td class="confluenceTd"> true </td>
|
||||
<td class="confluenceTd"> If true, session will dispatch messages asynchronously. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.closeTimeout </td>
|
||||
<td class="confluenceTd"> 15000 ms </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.copyMsgOnSend </td>
|
||||
<td class="confluenceTd"> true </td>
|
||||
<td class="confluenceTd"> If true, creates a copy of the message to be sent. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.disableTimestamp </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
<td class="confluenceTd"> If true, disable the setting of the JMSTimestamp. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.deferObjSerial </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
<td class="confluenceTd"> If true, defer the serialization of message objects. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.optimAck </td>
|
||||
<td class="confluenceTd"> true </td>
|
||||
<td class="confluenceTd"> If true, optimizes the acknowledgement of messages. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.optimDispatch </td>
|
||||
<td class="confluenceTd"> true </td>
|
||||
<td class="confluenceTd"> If true, optimizes the dispatching of messages. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.prefetchQueue </td>
|
||||
<td class="confluenceTd"> 1000 messages </td>
|
||||
<td class="confluenceTd"> Number of messages a queue consumer will cache in RAM before processing it. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.prefetchTopic </td>
|
||||
<td class="confluenceTd"> 32766 messages </td>
|
||||
<td class="confluenceTd"> Number of messages a topic consumer will cache in RAM before processing it. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.useCompression </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
<td class="confluenceTd"> If true, compress message data. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.useRetroactive </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
<td class="confluenceTd"> If true, make consumers retroactive. </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
<h3><a name="ActiveMQPerformanceModuleUsersManual-ConfigurationforSPIConnectionFactory:org.apache.activemq.tool.spi.ActiveMQClassLoaderSPI"></a>Configuration for SPI Connection Factory: org.apache.activemq.tool.spi.ActiveMQClassLoaderSPI</h3>
|
||||
|
||||
<p><b>Description:</b> This provides details in configuring the JMS Connection Factory created by ActiveMQClassLoaderSPI. Default values are based from the default values of the service provider org.apache.activemq.ActiveMQConnectionFactory.</p>
|
||||
|
||||
<p>ActiveMQClassLoaderSPI loads from the classpath "org.apache.activemq.ActiveMQConnectionFactory" and configures it using reflection. Configuration is generally based on the API of the class loaded. General format is factory.YYY or factory.XXX.YYY, where the last variable (YYY) is the property to set and everything in between is the getter of the class to use to set (YYY). For example:</p>
|
||||
<ol>
|
||||
<li>To set the value for asyncSend in ActiveMQConnectionFactory, use:<br>
|
||||
<tt>factory.useAsyncSend=true</tt>, which is equivalent to calling <tt>factory.setUseAsyncSend(true)</tt></li>
|
||||
</ol>
|
||||
|
||||
|
||||
<ol>
|
||||
<li>To set the queue prefetch for ActiveMQConnectionFactory, use:<br>
|
||||
<tt>factory.prefetchPolicy.queuePrefetch=1</tt>, which is equivalent to calling <tt>factory.getPrefetchPolicy().setQueuePrefetch(1)</tt></li>
|
||||
</ol>
|
||||
|
||||
|
||||
<p>It should be noted that the loaded class should implement the appropriate getter and setter methods. Nested objects should also be properly instantiated. For more information on configuring this SPI, refer to the specific provider API manual.</p>
|
||||
|
||||
<p>As of ActiveMQ 4.0.1, these are the available fields and default values:</p>
|
||||
<table border="1" class="confluenceTable"><tbody>
|
||||
<tr>
|
||||
<th class="confluenceTh"> Configuration Key </th>
|
||||
<th class="confluenceTh"> Default Value </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.prefetchPolicy.optimizeDurableTopicPrefetch </td>
|
||||
<td class="confluenceTd"> 1000 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.prefetchPolicy.durableTopicPrefetch </td>
|
||||
<td class="confluenceTd"> 100 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.password </td>
|
||||
<td class="confluenceTd"> null </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.prefetchPolicy.queueBrowserPrefetch </td>
|
||||
<td class="confluenceTd"> 500 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.useCompression </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.disableTimeStampsByDefault </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.optimizedMessageDispatch </td>
|
||||
<td class="confluenceTd"> true </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.useRetroactiveConsumer </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.alwaysSessionAsync </td>
|
||||
<td class="confluenceTd"> true </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.copyMessageOnSend </td>
|
||||
<td class="confluenceTd"> true </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.prefetchPolicy.topicPrefetch </td>
|
||||
<td class="confluenceTd"> 32766 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.useAsyncSend </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.redeliveryPolicy.backOffMultiplier </td>
|
||||
<td class="confluenceTd"> 5 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.prefetchPolicy.inputStreamPrefetch </td>
|
||||
<td class="confluenceTd"> 100 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.closeTimeout </td>
|
||||
<td class="confluenceTd"> 15000 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.userName </td>
|
||||
<td class="confluenceTd"> null </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.optimizeAcknowledge </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.clientID </td>
|
||||
<td class="confluenceTd"> null </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.objectMessageSerializationDefered </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.asyncDispatch </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.redeliveryPolicy.initialRedeliveryDelay </td>
|
||||
<td class="confluenceTd"> 1000 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.prefetchPolicy.queuePrefetch </td>
|
||||
<td class="confluenceTd"> 1000 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.redeliveryPolicy.maximumRedeliveries </td>
|
||||
<td class="confluenceTd"> 5 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.redeliveryPolicy.useCollisionAvoidance </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.prefetchPolicy.maximumPendingMessageLimit </td>
|
||||
<td class="confluenceTd"> 0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> factory.redeliveryPolicy.useExponentialBackOff </td>
|
||||
<td class="confluenceTd"> false </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
|
||||
<h3><a name="ActiveMQPerformanceModuleUsersManual-Configurationforthethroughputsampler"></a>Configuration for the throughput sampler</h3>
|
||||
|
||||
<table border="1" class="confluenceTable"><tbody>
|
||||
<tr>
|
||||
<th class="confluenceTh"> Configuration Key </th>
|
||||
<th class="confluenceTh"> Default Value </th>
|
||||
<th class="confluenceTh"> Description </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> tpSampler.duration </td>
|
||||
<td class="confluenceTd"> 300000 </td>
|
||||
<td class="confluenceTd"> The total duration (in ms) the sampler will run, including ramp up and ramp down time. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> tpSampler.rampUpTime </td>
|
||||
<td class="confluenceTd"> 30000 </td>
|
||||
<td class="confluenceTd"> The ramp up time of the sampler, sampling will only start after the ramp up time. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> tpSampler.rampDownTime </td>
|
||||
<td class="confluenceTd"> 30000 </td>
|
||||
<td class="confluenceTd"> The ramp down time of the sampler, sampling will stop when the sampler has executed for (duration - rampUpTime - rampDownTime) ms. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> tpSampler.interval </td>
|
||||
<td class="confluenceTd"> 1000 </td>
|
||||
<td class="confluenceTd"> The interval (in ms), the sampler will sample for data. </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
|
||||
<h3><a name="ActiveMQPerformanceModuleUsersManual-Configurationforthecpusampler"></a>Configuration for the cpu sampler</h3>
|
||||
|
||||
<table border="1" class="confluenceTable"><tbody>
|
||||
<tr>
|
||||
<th class="confluenceTh"> Configuration Key </th>
|
||||
<th class="confluenceTh"> Default Value </th>
|
||||
<th class="confluenceTh"> Description </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> cpuSampler.duration </td>
|
||||
<td class="confluenceTd"> 300000 </td>
|
||||
<td class="confluenceTd"> The total duration (in ms) the sampler will run, including ramp up and ramp down time. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> cpuSampler.rampUpTime </td>
|
||||
<td class="confluenceTd"> 30000 </td>
|
||||
<td class="confluenceTd"> The ramp up time of the sampler, sampling will only start after the ramp up time. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> cpuSampler.rampDownTime </td>
|
||||
<td class="confluenceTd"> 30000 </td>
|
||||
<td class="confluenceTd"> The ramp down time of the sampler, sampling will stop when the sampler has executed for (duration - rampUpTime - rampDownTime) ms. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="confluenceTd"> cpuSampler.interval </td>
|
||||
<td class="confluenceTd"> 1000 </td>
|
||||
<td class="confluenceTd"> The interval (in ms), the sampler will sample for data. </td>
|
||||
</tr>
|
||||
</tbody></table>
|
|
@ -1,63 +0,0 @@
|
|||
<!--
|
||||
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: xbean -->
|
||||
<beans xmlns="http://activemq.apache.org/schema/core">
|
||||
|
||||
<broker useJmx="false" brokerName="defaultBroker" start="false" persistent="true" useShutdownHook="false" deleteAllMessagesOnStartup="true">
|
||||
<persistenceAdapter>
|
||||
<journaledJDBC journalLogFiles="4" journalLogFileSize="32768" useJournal="true" useQuickJournal="false" dataSource="#derby-ds" dataDirectory="target/defaultBroker-data"/>
|
||||
</persistenceAdapter>
|
||||
|
||||
<transportConnectors>
|
||||
<transportConnector name="default" uri="tcp://localhost:61616"/>
|
||||
</transportConnectors>
|
||||
</broker>
|
||||
<!-- This xbean configuration file supports all the standard spring xml configuration options -->
|
||||
|
||||
<!-- Postgres DataSource Sample Setup -->
|
||||
<!--
|
||||
<bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
|
||||
<property name="serverName" value="localhost"/>
|
||||
<property name="databaseName" value="activemq"/>
|
||||
<property name="portNumber" value="0"/>
|
||||
<property name="user" value="activemq"/>
|
||||
<property name="password" value="activemq"/>
|
||||
<property name="dataSourceName" value="postgres"/>
|
||||
<property name="initialConnections" value="1"/>
|
||||
<property name="maxConnections" value="10"/>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<!-- MySql DataSource Sample Setup -->
|
||||
<!--
|
||||
<bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
|
||||
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
|
||||
<property name="username" value="activemq"/>
|
||||
<property name="password" value="activemq"/>
|
||||
<property name="poolPreparedStatements" value="true"/>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<!-- Embedded Derby DataSource Sample Setup -->
|
||||
<bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
|
||||
<property name="databaseName" value="derbydb"/>
|
||||
<property name="createDatabase" value="create"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
<!-- END SNIPPET: xbean -->
|
|
@ -1,63 +0,0 @@
|
|||
<!--
|
||||
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: xbean -->
|
||||
<beans xmlns="http://activemq.apache.org/schema/core">
|
||||
|
||||
<broker useJmx="false" brokerName="jdbcBroker" start="false" persistent="true" useShutdownHook="false" deleteAllMessagesOnStartup="true" advisorySupport="false">
|
||||
<persistenceAdapter>
|
||||
<jdbcPersistenceAdapter dataSource="#derby-ds"/>
|
||||
</persistenceAdapter>
|
||||
|
||||
<transportConnectors>
|
||||
<transportConnector name="default" uri="tcp://localhost:61616"/>
|
||||
</transportConnectors>
|
||||
</broker>
|
||||
<!-- This xbean configuration file supports all the standard spring xml configuration options -->
|
||||
|
||||
<!-- Postgres DataSource Sample Setup -->
|
||||
<!--
|
||||
<bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
|
||||
<property name="serverName" value="localhost"/>
|
||||
<property name="databaseName" value="activemq"/>
|
||||
<property name="portNumber" value="0"/>
|
||||
<property name="user" value="activemq"/>
|
||||
<property name="password" value="activemq"/>
|
||||
<property name="dataSourceName" value="postgres"/>
|
||||
<property name="initialConnections" value="1"/>
|
||||
<property name="maxConnections" value="10"/>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<!-- MySql DataSource Sample Setup -->
|
||||
<!--
|
||||
<bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
|
||||
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
|
||||
<property name="username" value="activemq"/>
|
||||
<property name="password" value="activemq"/>
|
||||
<property name="poolPreparedStatements" value="true"/>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<!-- Embedded Derby DataSource Sample Setup -->
|
||||
<bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
|
||||
<property name="databaseName" value="derbydb"/>
|
||||
<property name="createDatabase" value="create"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
<!-- END SNIPPET: xbean -->
|
|
@ -1,55 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
|
||||
<beans xmlns:amq="http://activemq.apache.org/schema/core">
|
||||
|
||||
<amq:broker brokerName="journaledMemBroker" start="false" persistent="false" useShutdownHook="false" deleteAllMessagesOnStartup="true" advisorySupport="false">
|
||||
|
||||
<amq:transportConnectors>
|
||||
<amq:transportConnector uri="tcp://localhost:61616"/>
|
||||
</amq:transportConnectors>
|
||||
|
||||
<amq:persistenceAdapter>
|
||||
<amq:journalPersistenceAdapter>
|
||||
<constructor-arg index="0">
|
||||
<ref bean="myJournalImpl"/>
|
||||
</constructor-arg>
|
||||
|
||||
<constructor-arg index="1">
|
||||
<amq:memoryPersistenceAdapter init-method="createTransactionStore"/>
|
||||
</constructor-arg>
|
||||
|
||||
<constructor-arg index="2">
|
||||
<bean id="myTaskRunnerFactory" class="org.apache.activemq.thread.TaskRunnerFactory"/>
|
||||
</constructor-arg>
|
||||
</amq:journalPersistenceAdapter>
|
||||
</amq:persistenceAdapter>
|
||||
</amq:broker>
|
||||
|
||||
<!-- The journal implementation that will be used -->
|
||||
<bean id="myJournalImpl" class="org.apache.activeio.journal.active.JournalImpl">
|
||||
<constructor-arg index="0">
|
||||
<bean id="myFile" class="java.io.File">
|
||||
<constructor-arg index="0">
|
||||
<value>target/journaledMem-data</value>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
|
||||
</beans>
|
|
@ -1,31 +0,0 @@
|
|||
<!--
|
||||
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: xbean -->
|
||||
<beans xmlns="http://activemq.apache.org/schema/core">
|
||||
|
||||
<broker useJmx="false" brokerName="kahaBroker" start="false" persistent="true" useShutdownHook="false" deleteAllMessagesOnStartup="true" advisorySupport="false">
|
||||
<persistenceAdapter>
|
||||
<kahaPersistenceAdapter dir="target/kaha-data"/>
|
||||
</persistenceAdapter>
|
||||
|
||||
<transportConnectors>
|
||||
<transportConnector name="default" uri="tcp://localhost:61616"/>
|
||||
</transportConnectors>
|
||||
</broker>
|
||||
|
||||
</beans>
|
||||
<!-- END SNIPPET: xbean -->
|
|
@ -1,30 +0,0 @@
|
|||
<!--
|
||||
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: xbean -->
|
||||
<beans xmlns="http://activemq.apache.org/schema/core">
|
||||
|
||||
<broker useJmx="false" brokerName="memoryBroker" start="false" persistent="false" useShutdownHook="false" deleteAllMessagesOnStartup="true" advisorySupport="false">
|
||||
<persistenceAdapter>
|
||||
<memoryPersistenceAdapter/>
|
||||
</persistenceAdapter>
|
||||
|
||||
<transportConnectors>
|
||||
<transportConnector name="default" uri="tcp://localhost:61616"/>
|
||||
</transportConnectors>
|
||||
</broker>
|
||||
</beans>
|
||||
<!-- END SNIPPET: xbean -->
|
|
@ -1,63 +0,0 @@
|
|||
<!--
|
||||
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: xbean -->
|
||||
<beans xmlns="http://activemq.apache.org/schema/core">
|
||||
|
||||
<broker useJmx="false" brokerName="quickJdbcBroker" start="false" persistent="true" useShutdownHook="false" deleteAllMessagesOnStartup="true" advisorySupport="false">
|
||||
<persistenceAdapter>
|
||||
<journaledJDBC journalLogFiles="4" journalLogFileSize="32768" useJournal="true" useQuickJournal="true" dataSource="#derby-ds" dataDirectory="target/quickJdbc-data"/>
|
||||
</persistenceAdapter>
|
||||
|
||||
<transportConnectors>
|
||||
<transportConnector name="default" uri="tcp://localhost:61616"/>
|
||||
</transportConnectors>
|
||||
</broker>
|
||||
<!-- This xbean configuration file supports all the standard spring xml configuration options -->
|
||||
|
||||
<!-- Postgres DataSource Sample Setup -->
|
||||
<!--
|
||||
<bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
|
||||
<property name="serverName" value="localhost"/>
|
||||
<property name="databaseName" value="activemq"/>
|
||||
<property name="portNumber" value="0"/>
|
||||
<property name="user" value="activemq"/>
|
||||
<property name="password" value="activemq"/>
|
||||
<property name="dataSourceName" value="postgres"/>
|
||||
<property name="initialConnections" value="1"/>
|
||||
<property name="maxConnections" value="10"/>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<!-- MySql DataSource Sample Setup -->
|
||||
<!--
|
||||
<bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
|
||||
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
|
||||
<property name="username" value="activemq"/>
|
||||
<property name="password" value="activemq"/>
|
||||
<property name="poolPreparedStatements" value="true"/>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<!-- Embedded Derby DataSource Sample Setup -->
|
||||
<bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
|
||||
<property name="databaseName" value="derbydb"/>
|
||||
<property name="createDatabase" value="create"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
<!-- END SNIPPET: xbean -->
|
|
@ -1,55 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
|
||||
<beans xmlns:amq="http://activemq.apache.org/schema/core">
|
||||
|
||||
<amq:broker brokerName="quickMemBroker" start="false" persistent="false" useShutdownHook="false" deleteAllMessagesOnStartup="true" advisorySupport="false">
|
||||
|
||||
<amq:transportConnectors>
|
||||
<amq:transportConnector uri="tcp://localhost:61616"/>
|
||||
</amq:transportConnectors>
|
||||
|
||||
<amq:persistenceAdapter>
|
||||
<amq:quickJournalPersistenceAdapter>
|
||||
<constructor-arg index="0">
|
||||
<ref bean="myJournalImpl"/>
|
||||
</constructor-arg>
|
||||
|
||||
<constructor-arg index="1">
|
||||
<amq:memoryPersistenceAdapter init-method="createTransactionStore"/>
|
||||
</constructor-arg>
|
||||
|
||||
<constructor-arg index="2">
|
||||
<bean id="myTaskRunnerFactory" class="org.apache.activemq.thread.TaskRunnerFactory"/>
|
||||
</constructor-arg>
|
||||
</amq:quickJournalPersistenceAdapter>
|
||||
</amq:persistenceAdapter>
|
||||
</amq:broker>
|
||||
|
||||
<!-- The journal implementation that will be used -->
|
||||
<bean id="myJournalImpl" class="org.apache.activeio.journal.active.JournalImpl">
|
||||
<constructor-arg index="0">
|
||||
<bean id="myFile" class="java.io.File">
|
||||
<constructor-arg index="0">
|
||||
<value>target/quickMem-data</value>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
|
||||
</beans>
|
|
@ -1,51 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
|
||||
<beans xmlns:amq="http://activemq.apache.org/schema/core">
|
||||
|
||||
<amq:broker brokerName="rapidBroker" start="false" persistent="true" useShutdownHook="false" deleteAllMessagesOnStartup="true" advisorySupport="false">
|
||||
|
||||
<amq:transportConnectors>
|
||||
<amq:transportConnector uri="tcp://localhost:61616"/>
|
||||
</amq:transportConnectors>
|
||||
|
||||
<amq:persistenceAdapter>
|
||||
<amq:rapidPersistenceAdapter>
|
||||
<constructor-arg index="0">
|
||||
<ref bean="myJournalImpl"/>
|
||||
</constructor-arg>
|
||||
|
||||
<constructor-arg index="1">
|
||||
<bean id="myTaskRunnerFactory" class="org.apache.activemq.thread.TaskRunnerFactory"/>
|
||||
</constructor-arg>
|
||||
</amq:rapidPersistenceAdapter>
|
||||
</amq:persistenceAdapter>
|
||||
</amq:broker>
|
||||
|
||||
<!-- The journal implementation that will be used -->
|
||||
<bean id="myJournalImpl" class="org.apache.activeio.journal.active.JournalImpl">
|
||||
<constructor-arg index="0">
|
||||
<bean id="myFile" class="java.io.File">
|
||||
<constructor-arg index="0">
|
||||
<value>target/rapid-data</value>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
|
||||
</beans>
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=equal
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=1
|
||||
sysTest.totalDests=1
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
consumer.durable=false
|
||||
consumer.asyncRecv=true
|
||||
consumer.destName=queue://TEST.FOO
|
||||
consumer.sessTransacted=false
|
||||
consumer.sessAckMode=autoAck
|
||||
consumer.destComposite=false
|
||||
consumer.unsubscribe=true
|
||||
# 5 mins receive duration
|
||||
consumer.recvType=time
|
||||
consumer.recvDuration=300000
|
||||
# 1 million messages receive
|
||||
# consumer.recvType=count
|
||||
# consumer.recvCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=equal
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=1
|
||||
sysTest.totalDests=1
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
consumer.durable=true
|
||||
consumer.asyncRecv=true
|
||||
consumer.destName=topic://TEST.FOO
|
||||
consumer.sessTransacted=false
|
||||
consumer.sessAckMode=autoAck
|
||||
consumer.destComposite=false
|
||||
consumer.unsubscribe=true
|
||||
# 5 mins receive duration
|
||||
consumer.recvType=time
|
||||
consumer.recvDuration=300000
|
||||
# 1 million messages receive
|
||||
# consumer.recvType=count
|
||||
# consumer.recvCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=equal
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=1
|
||||
sysTest.totalDests=1
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
consumer.durable=false
|
||||
consumer.asyncRecv=true
|
||||
consumer.destName=topic://TEST.FOO
|
||||
consumer.sessTransacted=false
|
||||
consumer.sessAckMode=autoAck
|
||||
consumer.destComposite=false
|
||||
consumer.unsubscribe=true
|
||||
# 5 mins receive duration
|
||||
consumer.recvType=time
|
||||
consumer.recvDuration=300000
|
||||
# 1 million messages receive
|
||||
# consumer.recvType=count
|
||||
# consumer.recvCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=equal
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=10
|
||||
sysTest.totalDests=1
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
consumer.durable=false
|
||||
consumer.asyncRecv=true
|
||||
consumer.destName=queue://TEST.FOO
|
||||
consumer.sessTransacted=false
|
||||
consumer.sessAckMode=autoAck
|
||||
consumer.destComposite=false
|
||||
consumer.unsubscribe=true
|
||||
# 5 mins receive duration
|
||||
consumer.recvType=time
|
||||
consumer.recvDuration=300000
|
||||
# 1 million messages receive
|
||||
# consumer.recvType=count
|
||||
# consumer.recvCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=equal
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=10
|
||||
sysTest.totalDests=1
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
consumer.durable=true
|
||||
consumer.asyncRecv=true
|
||||
consumer.destName=topic://TEST.FOO
|
||||
consumer.sessTransacted=false
|
||||
consumer.sessAckMode=autoAck
|
||||
consumer.destComposite=false
|
||||
consumer.unsubscribe=true
|
||||
# 5 mins receive duration
|
||||
consumer.recvType=time
|
||||
consumer.recvDuration=300000
|
||||
# 1 million messages receive
|
||||
# consumer.recvType=count
|
||||
# consumer.recvCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=equal
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=10
|
||||
sysTest.totalDests=1
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
consumer.durable=false
|
||||
consumer.asyncRecv=true
|
||||
consumer.destName=topic://TEST.FOO
|
||||
consumer.sessTransacted=false
|
||||
consumer.sessAckMode=autoAck
|
||||
consumer.destComposite=false
|
||||
consumer.unsubscribe=true
|
||||
# 5 mins receive duration
|
||||
consumer.recvType=time
|
||||
consumer.recvDuration=300000
|
||||
# 1 million messages receive
|
||||
# consumer.recvType=count
|
||||
# consumer.recvCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=equal
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=10
|
||||
sysTest.totalDests=10
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
consumer.durable=false
|
||||
consumer.asyncRecv=true
|
||||
consumer.destName=queue://TEST.FOO
|
||||
consumer.sessTransacted=false
|
||||
consumer.sessAckMode=autoAck
|
||||
consumer.destComposite=false
|
||||
consumer.unsubscribe=true
|
||||
# 5 mins receive duration
|
||||
consumer.recvType=time
|
||||
consumer.recvDuration=300000
|
||||
# 1 million messages receive
|
||||
# consumer.recvType=count
|
||||
# consumer.recvCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=equal
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=10
|
||||
sysTest.totalDests=10
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
consumer.durable=true
|
||||
consumer.asyncRecv=true
|
||||
consumer.destName=topic://TEST.FOO
|
||||
consumer.sessTransacted=false
|
||||
consumer.sessAckMode=autoAck
|
||||
consumer.destComposite=false
|
||||
consumer.unsubscribe=true
|
||||
# 5 mins receive duration
|
||||
consumer.recvType=time
|
||||
consumer.recvDuration=300000
|
||||
# 1 million messages receive
|
||||
# consumer.recvType=count
|
||||
# consumer.recvCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=equal
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=10
|
||||
sysTest.totalDests=10
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
consumer.durable=false
|
||||
consumer.asyncRecv=true
|
||||
consumer.destName=topic://TEST.FOO
|
||||
consumer.sessTransacted=false
|
||||
consumer.sessAckMode=autoAck
|
||||
consumer.destComposite=false
|
||||
consumer.unsubscribe=true
|
||||
# 5 mins receive duration
|
||||
consumer.recvType=time
|
||||
consumer.recvDuration=300000
|
||||
# 1 million messages receive
|
||||
# consumer.recvType=count
|
||||
# consumer.recvCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=all
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=1
|
||||
sysTest.totalDests=1
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
producer.deliveryMode=nonpersistent
|
||||
producer.messageSize=1024
|
||||
producer.destName=queue://TEST.FOO
|
||||
producer.sessTransacted=false
|
||||
producer.sessAckMode=autoAck
|
||||
producer.createNewMsg=false
|
||||
producer.destComposite=false
|
||||
# 5 mins send duration
|
||||
producer.sendType=time
|
||||
producer.sendDuration=300000
|
||||
# 1 million messages send
|
||||
# producer.sendType=count
|
||||
# producer.sendCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=all
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=1
|
||||
sysTest.totalDests=1
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
producer.deliveryMode=persistent
|
||||
producer.messageSize=1024
|
||||
producer.destName=queue://TEST.FOO
|
||||
producer.sessTransacted=false
|
||||
producer.sessAckMode=autoAck
|
||||
producer.createNewMsg=false
|
||||
producer.destComposite=false
|
||||
# 5 mins send duration
|
||||
producer.sendType=time
|
||||
producer.sendDuration=300000
|
||||
# 1 million messages send
|
||||
# producer.sendType=count
|
||||
# producer.sendCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=all
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=1
|
||||
sysTest.totalDests=1
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
producer.deliveryMode=nonpersistent
|
||||
producer.messageSize=1024
|
||||
producer.destName=topic://TEST.FOO
|
||||
producer.sessTransacted=false
|
||||
producer.sessAckMode=autoAck
|
||||
producer.createNewMsg=false
|
||||
producer.destComposite=false
|
||||
# 5 mins send duration
|
||||
producer.sendType=time
|
||||
producer.sendDuration=300000
|
||||
# 1 million messages send
|
||||
# producer.sendType=count
|
||||
# producer.sendCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=all
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=1
|
||||
sysTest.totalDests=1
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
producer.deliveryMode=persistent
|
||||
producer.messageSize=1024
|
||||
producer.destName=topic://TEST.FOO
|
||||
producer.sessTransacted=false
|
||||
producer.sessAckMode=autoAck
|
||||
producer.createNewMsg=false
|
||||
producer.destComposite=false
|
||||
# 5 mins send duration
|
||||
producer.sendType=time
|
||||
producer.sendDuration=300000
|
||||
# 1 million messages send
|
||||
# producer.sendType=count
|
||||
# producer.sendCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=all
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=10
|
||||
sysTest.totalDests=1
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
producer.deliveryMode=nonpersistent
|
||||
producer.messageSize=1024
|
||||
producer.destName=queue://TEST.FOO
|
||||
producer.sessTransacted=false
|
||||
producer.sessAckMode=autoAck
|
||||
producer.createNewMsg=false
|
||||
producer.destComposite=false
|
||||
# 5 mins send duration
|
||||
producer.sendType=time
|
||||
producer.sendDuration=300000
|
||||
# 1 million messages send
|
||||
# producer.sendType=count
|
||||
# producer.sendCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=all
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=10
|
||||
sysTest.totalDests=1
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
producer.deliveryMode=persistent
|
||||
producer.messageSize=1024
|
||||
producer.destName=queue://TEST.FOO
|
||||
producer.sessTransacted=false
|
||||
producer.sessAckMode=autoAck
|
||||
producer.createNewMsg=false
|
||||
producer.destComposite=false
|
||||
# 5 mins send duration
|
||||
producer.sendType=time
|
||||
producer.sendDuration=300000
|
||||
# 1 million messages send
|
||||
# producer.sendType=count
|
||||
# producer.sendCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=all
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=10
|
||||
sysTest.totalDests=1
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
producer.deliveryMode=nonpersistent
|
||||
producer.messageSize=1024
|
||||
producer.destName=topic://TEST.FOO
|
||||
producer.sessTransacted=false
|
||||
producer.sessAckMode=autoAck
|
||||
producer.createNewMsg=false
|
||||
producer.destComposite=false
|
||||
# 5 mins send duration
|
||||
producer.sendType=time
|
||||
producer.sendDuration=300000
|
||||
# 1 million messages send
|
||||
# producer.sendType=count
|
||||
# producer.sendCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=all
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=10
|
||||
sysTest.totalDests=1
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
producer.deliveryMode=persistent
|
||||
producer.messageSize=1024
|
||||
producer.destName=topic://TEST.FOO
|
||||
producer.sessTransacted=false
|
||||
producer.sessAckMode=autoAck
|
||||
producer.createNewMsg=false
|
||||
producer.destComposite=false
|
||||
# 5 mins send duration
|
||||
producer.sendType=time
|
||||
producer.sendDuration=300000
|
||||
# 1 million messages send
|
||||
# producer.sendType=count
|
||||
# producer.sendCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=all
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=10
|
||||
sysTest.totalDests=10
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
producer.deliveryMode=nonpersistent
|
||||
producer.messageSize=1024
|
||||
producer.destName=queue://TEST.FOO
|
||||
producer.sessTransacted=false
|
||||
producer.sessAckMode=autoAck
|
||||
producer.createNewMsg=false
|
||||
producer.destComposite=false
|
||||
# 5 mins send duration
|
||||
producer.sendType=time
|
||||
producer.sendDuration=300000
|
||||
# 1 million messages send
|
||||
# producer.sendType=count
|
||||
# producer.sendCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=all
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=10
|
||||
sysTest.totalDests=10
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
producer.deliveryMode=persistent
|
||||
producer.messageSize=1024
|
||||
producer.destName=queue://TEST.FOO
|
||||
producer.sessTransacted=false
|
||||
producer.sessAckMode=autoAck
|
||||
producer.createNewMsg=false
|
||||
producer.destComposite=false
|
||||
# 5 mins send duration
|
||||
producer.sendType=time
|
||||
producer.sendDuration=300000
|
||||
# 1 million messages send
|
||||
# producer.sendType=count
|
||||
# producer.sendCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=all
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=10
|
||||
sysTest.totalDests=10
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
producer.deliveryMode=nonpersistent
|
||||
producer.messageSize=1024
|
||||
producer.destName=topic://TEST.FOO
|
||||
producer.sessTransacted=false
|
||||
producer.sessAckMode=autoAck
|
||||
producer.createNewMsg=false
|
||||
producer.destComposite=false
|
||||
# 5 mins send duration
|
||||
producer.sendType=time
|
||||
producer.sendDuration=300000
|
||||
# 1 million messages send
|
||||
# producer.sendType=count
|
||||
# producer.sendCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,92 +0,0 @@
|
|||
## ---------------------------------------------------------------------------
|
||||
## 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.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
# Consumer System Settings
|
||||
sysTest.spiClass=org.apache.activemq.tool.spi.ActiveMQReflectionSPI
|
||||
sysTest.reportType=xml
|
||||
sysTest.destDistro=all
|
||||
sysTest.samplers=tp
|
||||
sysTest.numClients=10
|
||||
sysTest.totalDests=10
|
||||
sysTest.reportDir=./
|
||||
|
||||
# Consumer Client Settings
|
||||
producer.deliveryMode=persistent
|
||||
producer.messageSize=1024
|
||||
producer.destName=topic://TEST.FOO
|
||||
producer.sessTransacted=false
|
||||
producer.sessAckMode=autoAck
|
||||
producer.createNewMsg=false
|
||||
producer.destComposite=false
|
||||
# 5 mins send duration
|
||||
producer.sendType=time
|
||||
producer.sendDuration=300000
|
||||
# 1 million messages send
|
||||
# producer.sendType=count
|
||||
# producer.sendCount=1000000
|
||||
|
||||
# Throughput Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
tpSampler.duration=300000
|
||||
tpSampler.rampUpTime=60000
|
||||
tpSampler.rampDownTime=60000
|
||||
tpSampler.interval=1000
|
||||
|
||||
# CPU Sampler Settings
|
||||
# 5 mins sampling duration
|
||||
# 1 min ramp up and ramp down time
|
||||
# 1 sec sampling interval
|
||||
# cpuSampler.duration=300000
|
||||
# cpuSampler.rampUpTime=60000
|
||||
# cpuSampler.rampDownTime=60000
|
||||
# cpuSampler.interval=1000
|
||||
|
||||
# AMQ Connection Factory Settings
|
||||
# Use default settings
|
||||
# factory.brokerURL=tcp://localhost:61616
|
||||
# factory.useAsyncSend=false
|
||||
# factory.asyncDispatch=false
|
||||
# factory.alwaysSessionAsync=true
|
||||
# factory.useCompression=false
|
||||
# factory.optimizeAcknowledge=false
|
||||
# factory.objectMessageSerializationDefered=false
|
||||
# factory.disableTimeStampsByDefault=false
|
||||
# factory.optimizedMessageDispatch=true
|
||||
# factory.useRetroactiveConsumer=false
|
||||
# factory.copyMessageOnSend=true
|
||||
# factory.closeTimeout=15000
|
||||
|
||||
# factory.userName=null
|
||||
# factory.clientID=null
|
||||
# factory.password=null
|
||||
|
||||
# factory.prefetchPolicy.durableTopicPrefetch=100
|
||||
# factory.prefetchPolicy.topicPrefetch=32766
|
||||
# factory.prefetchPolicy.queueBrowserPrefetch=500
|
||||
# factory.prefetchPolicy.queuePrefetch=1000
|
||||
# factory.prefetchPolicy.inputStreamPrefetch=100
|
||||
# factory.prefetchPolicy.maximumPendingMessageLimit=0
|
||||
# factory.prefetchPolicy.optimizeDurableTopicPrefetch=1000
|
||||
|
||||
# factory.redeliveryPolicy.initialRedeliveryDelay=1000
|
||||
# factory.redeliveryPolicy.maximumRedeliveries=5
|
||||
# factory.redeliveryPolicy.useCollisionAvoidance=false
|
||||
# factory.redeliveryPolicy.useExponentialBackOff=false
|
||||
# factory.redeliveryPolicy.collisionAvoidancePercent=15
|
||||
# factory.redeliveryPolicy.backOffMultiplier=5
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# ------------------------------------------------------------------------
|
||||
# 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.
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
mkdir -p target/generated-source
|
||||
protoc -I=src/main/proto --java_out=src/main/java src/main/proto/openwire.proto
|
|
@ -1,87 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-parent</artifactId>
|
||||
<version>5.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>activemq-protocol-buffer</artifactId>
|
||||
<packaging>bundle</packaging>
|
||||
<name>ActiveMQ :: Protocol Buffer</name>
|
||||
<description>ActiveMQ Protocol Buffer</description>
|
||||
|
||||
<properties>
|
||||
<activemq.osgi.import.pkg>
|
||||
org.apache.activemq*;resolution:=optional,
|
||||
*
|
||||
</activemq.osgi.import.pkg>
|
||||
<activemq.osgi.export>
|
||||
org.apache.activemq.protocolbuffer*;version=${project.version},
|
||||
</activemq.osgi.export>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>2.0.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
<plugins>
|
||||
<!-- Configure which tests are included/excuded -->
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<forkMode>pertest</forkMode>
|
||||
<childDelegation>false</childDelegation>
|
||||
<useFile>true</useFile>
|
||||
<includes>
|
||||
<include>**/*Test.*</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<!--
|
||||
<exclude>**/.java</exclude>
|
||||
-->
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
File diff suppressed because it is too large
Load Diff
|
@ -1,173 +0,0 @@
|
|||
// ------------------------------------------------------------------------
|
||||
// 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.
|
||||
// ------------------------------------------------------------------------
|
||||
// See README.txt for information and build instructions.
|
||||
|
||||
package org.apache.activemq.protocolbuffer;
|
||||
|
||||
option optimize_for = SPEED;
|
||||
option java_package = "org.apache.activemq.protocolbuffer";
|
||||
|
||||
option java_outer_classname = "OpenWire";
|
||||
|
||||
|
||||
message Command {
|
||||
required int32 command_id = 1;
|
||||
required bool response_required = 2;
|
||||
required int32 command_type = 3;
|
||||
required bytes command_bytes = 4;
|
||||
}
|
||||
|
||||
|
||||
message Destination {
|
||||
enum DestinationType {
|
||||
QUEUE = 0;
|
||||
TOPIC = 1;
|
||||
TEMP_QUEUE = 2;
|
||||
TEMP_TOPIC = 3;
|
||||
}
|
||||
|
||||
required DestinationType type = 1 [default = QUEUE];
|
||||
required string name = 2;
|
||||
}
|
||||
|
||||
message LocalTransactionId {
|
||||
// TODO connection ID?
|
||||
required int32 connection_id = 1;
|
||||
required int64 value = 2;
|
||||
}
|
||||
|
||||
message XATransactionId {
|
||||
required int32 format_id = 1;
|
||||
required bytes branch_qualifier = 2;
|
||||
required bytes global_transaction_id = 3;
|
||||
}
|
||||
|
||||
// Properties
|
||||
message StringProperty {
|
||||
required string name = 1;
|
||||
required string value = 2;
|
||||
}
|
||||
|
||||
message BoolProperty {
|
||||
required string name = 1;
|
||||
required bool value = 2;
|
||||
}
|
||||
|
||||
message ByteProperty {
|
||||
required string name = 1;
|
||||
// TODO no byte?
|
||||
required int32 value = 2;
|
||||
}
|
||||
|
||||
message ShortProperty {
|
||||
required string name = 1;
|
||||
// TODO no int16?
|
||||
required int32 value = 2;
|
||||
}
|
||||
|
||||
message IntProperty {
|
||||
required string name = 1;
|
||||
required int32 value = 2;
|
||||
}
|
||||
|
||||
message LongProperty {
|
||||
required string name = 1;
|
||||
required int32 value = 2;
|
||||
}
|
||||
|
||||
message FloatProperty {
|
||||
required string name = 1;
|
||||
required float value = 2;
|
||||
}
|
||||
|
||||
message DoubleProperty {
|
||||
required string name = 1;
|
||||
required double value = 2;
|
||||
}
|
||||
|
||||
message Properties {
|
||||
repeated StringProperty string_property = 1;
|
||||
repeated IntProperty int_property = 2;
|
||||
repeated BoolProperty bool_property = 3;
|
||||
repeated LongProperty long_property = 4;
|
||||
repeated DoubleProperty double_property = 5;
|
||||
repeated FloatProperty float_property = 6;
|
||||
repeated ShortProperty short_property = 7;
|
||||
repeated ByteProperty byte_property = 8;
|
||||
|
||||
optional int64 timestamp = 10;
|
||||
optional string type = 11;
|
||||
}
|
||||
|
||||
// Message
|
||||
message Message {
|
||||
// TODO these should be required
|
||||
optional int32 producer_id = 1;
|
||||
optional int32 producer_counter = 2;
|
||||
|
||||
// TODO no messageID?
|
||||
|
||||
required Destination destination = 3;
|
||||
optional Destination original_destination = 4;
|
||||
|
||||
optional string group_id = 5;
|
||||
|
||||
optional bytes property_bytes = 6;
|
||||
|
||||
|
||||
// TODO move this into the 'exchange id'?
|
||||
optional bool persistent = 7;
|
||||
|
||||
optional int64 expiration = 8;
|
||||
optional string correlation_id = 9;
|
||||
|
||||
optional Destination reply_to = 10;
|
||||
|
||||
optional LocalTransactionId local_transaction_id = 11;
|
||||
optional XATransactionId xa_transaction_id = 12;
|
||||
|
||||
|
||||
// TODO why DataStructure and Content?
|
||||
// TODO targetConsumerId?
|
||||
|
||||
// TODO should we move more stuff into the Properties header?
|
||||
optional int32 redelivery_counter = 13;
|
||||
repeated string broker_path = 14;
|
||||
repeated string cluster_id = 15;
|
||||
|
||||
optional bool compressed = 16;
|
||||
|
||||
// TODO no byte?
|
||||
optional int32 priority = 17;
|
||||
|
||||
optional string user_id = 20;
|
||||
|
||||
optional int64 arrival = 22;
|
||||
optional int64 broker_in_time = 23;
|
||||
optional int64 broker_out_time = 24;
|
||||
|
||||
// TODO required?
|
||||
optional bool droppable = 28;
|
||||
optional bool receivedByDFBridge = 29;
|
||||
|
||||
optional int32 group_sequence = 40;
|
||||
}
|
||||
|
||||
// TODO things to ponder
|
||||
// should we move more message fields
|
||||
// that are set by the sender (and rarely required by the broker
|
||||
// into the Properties object?
|
|
@ -1,78 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* 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.protocolbuffer;
|
||||
|
||||
import com.google.protobuf.CodedInputStream;
|
||||
import com.google.protobuf.CodedOutputStream;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
public class MarshallTest extends TestCase {
|
||||
protected int messageCount = 1000;
|
||||
protected String fileName = "target/marshall.openwire";
|
||||
|
||||
|
||||
public void testMarshalling() throws Exception {
|
||||
FileOutputStream out = new FileOutputStream(fileName);
|
||||
CodedOutputStream cout = CodedOutputStream.newInstance(out);
|
||||
OpenWire.Destination destination = OpenWire.Destination.newBuilder().setName("FOO.BAR").setType(OpenWire.Destination.DestinationType.QUEUE).build();
|
||||
|
||||
for (int i = 0; i < messageCount; i++) {
|
||||
OpenWire.Message message = OpenWire.Message.newBuilder()
|
||||
.setDestination(destination)
|
||||
.setPersistent(true)
|
||||
.setProducerId(1234)
|
||||
.setProducerCounter(i)
|
||||
.build();
|
||||
//.setType("type:" + i)
|
||||
|
||||
System.out.println("Writing message: " + i + " = " + message);
|
||||
int size = message.getSerializedSize();
|
||||
cout.writeRawVarint32(size);
|
||||
message.writeTo(cout);
|
||||
cout.flush();
|
||||
}
|
||||
out.close();
|
||||
|
||||
// now lets try read them!
|
||||
FileInputStream in = new FileInputStream(fileName);
|
||||
CodedInputStream cin = CodedInputStream.newInstance(in);
|
||||
for (int i = 0; i < messageCount; i++) {
|
||||
int size = cin.readRawVarint32();
|
||||
int previous = cin.pushLimit(size);
|
||||
OpenWire.Message message = OpenWire.Message.parseFrom(cin);
|
||||
cin.popLimit(previous);
|
||||
System.out.println("Reading message: " + i + " = " + message);
|
||||
|
||||
assertEquals("message.getPersistent()", true, message.getPersistent());
|
||||
assertEquals("message.getProducerId()", 1234, message.getProducerId());
|
||||
assertEquals("message.getProducerCounter()", i, message.getProducerCounter());
|
||||
OpenWire.Destination actualDestination = message.getDestination();
|
||||
assertNotNull("message.getDestination() is null!", actualDestination);
|
||||
assertEquals("destination.getName()", destination.getName(), actualDestination.getName());
|
||||
assertEquals("destination.getType()", destination.getType(), actualDestination.getType());
|
||||
}
|
||||
in.close();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* 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.protocolbuffer;
|
||||
|
||||
import org.apache.activemq.command.*;
|
||||
import org.apache.activemq.openwire.OpenWireFormat;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
public class OpenWirePerformanceTest extends TestSupport {
|
||||
|
||||
protected String fileName = "target/openwire.openwire";
|
||||
protected OpenWireFormat openWireFormat = createOpenWireFormat();
|
||||
protected ActiveMQDestination destination = new ActiveMQQueue("FOO.BAR");
|
||||
protected ProducerId producerId = new ProducerId(new SessionId(new ConnectionId("abc"), 1), 1);
|
||||
|
||||
public void testPerformance() throws Exception {
|
||||
OutputStream out = new BufferedOutputStream(new FileOutputStream(fileName));
|
||||
DataOutputStream ds = new DataOutputStream(out);
|
||||
|
||||
StopWatch watch = createStopWatch("writer");
|
||||
for (long i = 0; i < messageCount; i++) {
|
||||
watch.start();
|
||||
Message message = new ActiveMQMessage();
|
||||
|
||||
message.setDestination(destination);
|
||||
message.setPersistent(true);
|
||||
message.setCorrelationId("ABCD");
|
||||
//message.setType("type:" + i);
|
||||
|
||||
if (useProducerId) {
|
||||
message.setProducerId(producerId);
|
||||
message.setMessageId(new MessageId(producerId, i));
|
||||
}
|
||||
|
||||
if (verbose) {
|
||||
System.out.println("Writing message: " + i + " = " + message);
|
||||
}
|
||||
/*
|
||||
byte[] bytes = message.toByteArray();
|
||||
int size = bytes.length;
|
||||
out.write(size);
|
||||
//System.out.println("writing bytes: " + size);
|
||||
out.write(bytes);
|
||||
*/
|
||||
|
||||
openWireFormat.marshal(message, ds);
|
||||
watch.stop();
|
||||
}
|
||||
out.close();
|
||||
|
||||
// now lets try read them!
|
||||
StopWatch watch2 = createStopWatch("reader");
|
||||
InputStream in = new BufferedInputStream(new FileInputStream(fileName));
|
||||
DataInput dis = new DataInputStream(in);
|
||||
|
||||
for (long i = 0; i < messageCount; i++) {
|
||||
watch2.start();
|
||||
|
||||
Object message = openWireFormat.unmarshal(dis);
|
||||
/*
|
||||
int size = in.read();
|
||||
byte[] data = new byte[size];
|
||||
in.read(data);
|
||||
*/
|
||||
if (verbose) {
|
||||
System.out.println("Reading message: " + i + " = " + message);
|
||||
}
|
||||
watch2.stop();
|
||||
}
|
||||
in.close();
|
||||
}
|
||||
|
||||
protected OpenWireFormat createOpenWireFormat() {
|
||||
OpenWireFormat wf = new OpenWireFormat();
|
||||
wf.setCacheEnabled(true);
|
||||
wf.setStackTraceEnabled(false);
|
||||
wf.setVersion(OpenWireFormat.DEFAULT_VERSION);
|
||||
return wf;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* 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.protocolbuffer;
|
||||
|
||||
import com.google.protobuf.CodedInputStream;
|
||||
import com.google.protobuf.CodedOutputStream;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
public class PerformanceTest extends TestSupport {
|
||||
|
||||
protected String fileName = "target/performance.openwire";
|
||||
protected OpenWire.Destination destination = OpenWire.Destination.newBuilder().setName("FOO.BAR").setType(OpenWire.Destination.DestinationType.QUEUE).build();
|
||||
|
||||
public void testPerformance() throws Exception {
|
||||
OutputStream out = new BufferedOutputStream(new FileOutputStream(fileName));
|
||||
CodedOutputStream cout = CodedOutputStream.newInstance(out);
|
||||
|
||||
StopWatch watch = createStopWatch("writer");
|
||||
for (long i = 0; i < messageCount; i++) {
|
||||
watch.start();
|
||||
OpenWire.Message.Builder builder = OpenWire.Message.newBuilder()
|
||||
.setDestination(destination)
|
||||
.setPersistent(true)
|
||||
.setCorrelationId("ABCD");
|
||||
|
||||
if (useProducerId) {
|
||||
int producerCounter = (int) i;
|
||||
builder = builder.setProducerId(1234)
|
||||
.setProducerCounter(producerCounter);
|
||||
}
|
||||
|
||||
OpenWire.Message message = builder.build();
|
||||
|
||||
if (verbose) {
|
||||
System.out.println("Writing message: " + i + " = " + message);
|
||||
}
|
||||
int size = message.getSerializedSize();
|
||||
|
||||
cout.writeRawVarint32(size);
|
||||
message.writeTo(cout);
|
||||
|
||||
watch.stop();
|
||||
}
|
||||
cout.flush();
|
||||
out.close();
|
||||
|
||||
// now lets try read them!
|
||||
StopWatch watch2 = createStopWatch("reader");
|
||||
InputStream in = new BufferedInputStream(new FileInputStream(fileName));
|
||||
CodedInputStream cin = CodedInputStream.newInstance(in);
|
||||
cin.setSizeLimit(0x7FFFFFFF);
|
||||
|
||||
for (long i = 0; i < messageCount; i++) {
|
||||
watch2.start();
|
||||
|
||||
int size = cin.readRawVarint32();
|
||||
int previous = cin.pushLimit(size);
|
||||
|
||||
OpenWire.Message message = OpenWire.Message.parseFrom(cin);
|
||||
cin.popLimit(previous);
|
||||
|
||||
if (verbose) {
|
||||
System.out.println("Reading message: " + i + " = " + message);
|
||||
}
|
||||
if (doAssertions) {
|
||||
if (useProducerId) {
|
||||
assertEquals("message.getProducerId()", 1234, message.getProducerId());
|
||||
assertEquals("message.getProducerCounter()", i, message.getProducerCounter());
|
||||
}
|
||||
assertEquals("message.getPersistent()", true, message.getPersistent());
|
||||
assertEquals("message.getCorrelationId()", "ABCD", message.getCorrelationId());
|
||||
|
||||
OpenWire.Destination actualDestination = message.getDestination();
|
||||
assertNotNull("message.getDestination() is null!", actualDestination);
|
||||
assertEquals("destination.getName()", destination.getName(), actualDestination.getName());
|
||||
assertEquals("destination.getType()", destination.getType(), actualDestination.getType());
|
||||
}
|
||||
watch2.stop();
|
||||
}
|
||||
in.close();
|
||||
}
|
||||
}
|
|
@ -1,111 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* 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.protocolbuffer;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
public class StopWatch {
|
||||
private final String id;
|
||||
private int loopCount;
|
||||
private int totalLoops;
|
||||
private long groupElapsed;
|
||||
private long totalElapsed;
|
||||
private long startTime;
|
||||
private long minTime = Long.MAX_VALUE;
|
||||
private long maxTime = Long.MIN_VALUE;
|
||||
private int logFrequency = 1000;
|
||||
private NumberFormat numberFormat = NumberFormat.getNumberInstance();
|
||||
|
||||
public StopWatch(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void start() {
|
||||
startTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
long elapsedTime = System.currentTimeMillis() - startTime;
|
||||
groupElapsed += elapsedTime;
|
||||
totalElapsed += elapsedTime;
|
||||
loopCount++;
|
||||
totalLoops++;
|
||||
|
||||
if (elapsedTime > maxTime) {
|
||||
maxTime = elapsedTime;
|
||||
}
|
||||
if (elapsedTime < minTime) {
|
||||
minTime = elapsedTime;
|
||||
}
|
||||
if (logFrequency > 0 && loopCount % logFrequency == 0) {
|
||||
System.out.println(toString());
|
||||
reset();
|
||||
}
|
||||
}
|
||||
|
||||
protected void reset() {
|
||||
loopCount = 0;
|
||||
groupElapsed = 0;
|
||||
minTime = Long.MAX_VALUE;
|
||||
maxTime = Long.MIN_VALUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
double average = totalElapsed;
|
||||
average *= logFrequency;
|
||||
average /= totalLoops;
|
||||
//average /= 1000;
|
||||
return id + " count: " + loopCount + " elapsed: " + groupElapsed + " min: " + minTime + " max: " + maxTime + " average: " + formatSeconds(average);
|
||||
}
|
||||
|
||||
public int getLogFrequency() {
|
||||
return logFrequency;
|
||||
}
|
||||
|
||||
public void setLogFrequency(int logFrequency) {
|
||||
this.logFrequency = logFrequency;
|
||||
}
|
||||
|
||||
public int getLoopCount() {
|
||||
return loopCount;
|
||||
}
|
||||
|
||||
public long getMaxTime() {
|
||||
return maxTime;
|
||||
}
|
||||
|
||||
public long getMinTime() {
|
||||
return minTime;
|
||||
}
|
||||
|
||||
public long getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public long getGroupElapsed() {
|
||||
return groupElapsed;
|
||||
}
|
||||
|
||||
protected String formatSeconds(double time) {
|
||||
return numberFormat.format(time);
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* 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.protocolbuffer;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
public class TestSupport extends TestCase {
|
||||
protected long messageCount = 10 * 1000 * 1000;
|
||||
protected boolean verbose = false;
|
||||
protected boolean doAssertions = false;
|
||||
protected boolean useProducerId = false;
|
||||
|
||||
protected StopWatch createStopWatch(String name) {
|
||||
StopWatch answer = new StopWatch(name);
|
||||
answer.setLogFrequency((int) messageCount / 10);
|
||||
return answer;
|
||||
}
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
<project
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-parent</artifactId>
|
||||
<version>5.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>activemq-repository-builder</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>ActiveMQ :: Repository Builder</name>
|
||||
<description>Puts together a maven 2 repository of all the ActiveMQ artifacts and dependencies</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${pom.groupId}</groupId>
|
||||
<artifactId>org.apache.activemq</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<descriptor>src/main/assembly/repo.xml</descriptor>
|
||||
<finalName>repository</finalName>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -1,37 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
<assembly>
|
||||
<id>bin</id>
|
||||
<formats>
|
||||
<format>tar.gz</format>
|
||||
</formats>
|
||||
<repositories>
|
||||
<repository>
|
||||
<outputDirectory>repository</outputDirectory>
|
||||
<includeMetadata>true</includeMetadata>
|
||||
<!--
|
||||
<groupVersionAlignments>
|
||||
<groupVersionAlignment>
|
||||
<id>incubator-activemq</id>
|
||||
<version>${project.version}</version>
|
||||
</groupVersionAlignment>
|
||||
</groupVersionAlignments>
|
||||
-->
|
||||
</repository>
|
||||
</repositories>
|
||||
</assembly>
|
|
@ -1,32 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
<project default="default"
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:u="jelly:util"
|
||||
xmlns:ant="jelly:ant"
|
||||
xmlns:util="jelly:util"
|
||||
xmlns:artifact="artifact"
|
||||
>
|
||||
|
||||
|
||||
<goal name="default" prereqs="jar:install"/>
|
||||
|
||||
<postGoal name="clean">
|
||||
<delete dir="${basedir}/activemq-data" />
|
||||
</postGoal>
|
||||
</project>
|
|
@ -1,21 +0,0 @@
|
|||
##---------------------------------------------------------------------------
|
||||
## 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.
|
||||
##---------------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# Build Properties
|
||||
# -------------------------------------------------------------------
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE project>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<project>
|
||||
<pomVersion>3</pomVersion>
|
||||
<extend>${basedir}/../etc/project.xml</extend>
|
||||
<name>ActiveMQ :: SoakTest</name>
|
||||
<id>activemq</id>
|
||||
<shortDescription>ActiveMQ Assembly</shortDescription>
|
||||
<description>ActiveMQ Assembly creates an ActiveMQ distribution</description>
|
||||
|
||||
<!-- ============ -->
|
||||
<!-- Dependencies -->
|
||||
<!-- ============ -->
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>${pom.groupId}</groupId>
|
||||
<artifactId>activemq-core</artifactId>
|
||||
<version>${pom.currentVersion}</version>
|
||||
<properties>
|
||||
<activemq.module>true</activemq.module>
|
||||
<lib>true</lib>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${pom.groupId}</groupId>
|
||||
<artifactId>activeio-core</artifactId>
|
||||
<version>${activeio_version}</version>
|
||||
<properties>
|
||||
<activemq.module>true</activemq.module>
|
||||
<lib>true</lib>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${pom.groupId}</groupId>
|
||||
<artifactId>activemq-core-test</artifactId>
|
||||
<version>${pom.currentVersion}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<!-- Derby DB used for testing JDBC message store -->
|
||||
<dependency>
|
||||
<groupId>org.apache.derby</groupId>
|
||||
<artifactId>derby</artifactId>
|
||||
<version>${derby_version}</version>
|
||||
<properties>
|
||||
<activemq.module>true</activemq.module>
|
||||
<optional>true</optional>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.derby</groupId>
|
||||
<artifactId>derbynet</artifactId>
|
||||
<version>${derbynet_version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<nagEmailAddress>dev@activemq.codehaus.org</nagEmailAddress>
|
||||
<sourceDirectory>src/main/java</sourceDirectory>
|
||||
<unitTestSourceDirectory>src/test/java</unitTestSourceDirectory>
|
||||
|
||||
<integrationUnitTestSourceDirectory/>
|
||||
<aspectSourceDirectory/>
|
||||
|
||||
<unitTest>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/test/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<includes>
|
||||
<include>**/*Test.*</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
|
||||
|
||||
</excludes>
|
||||
</unitTest>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
@ -1,142 +0,0 @@
|
|||
/**
|
||||
* 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;
|
||||
|
||||
import org.apache.activemq.command.ActiveMQDestination;
|
||||
import org.apache.activemq.command.ActiveMQQueue;
|
||||
import org.apache.activemq.command.DataStructure;
|
||||
import org.apache.activemq.command.ProducerId;
|
||||
import org.apache.activemq.command.ProducerInfo;
|
||||
import org.apache.activemq.openwire.OpenWireFormat;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @version $Revision: 383541 $
|
||||
*/
|
||||
public class MarshallingWithCachingTest extends TestCase {
|
||||
|
||||
protected long commandCount = Short.MAX_VALUE;
|
||||
protected String connectionId = "Cheese";
|
||||
protected ActiveMQDestination destination = new ActiveMQQueue("Foo");
|
||||
protected int endOfStreamMarker = 0x12345678;
|
||||
|
||||
protected ByteArrayOutputStream buffer = new ByteArrayOutputStream();
|
||||
protected DataOutputStream ds = new DataOutputStream(buffer);
|
||||
protected OpenWireFormat openWireformat;
|
||||
protected long logGroup = 10000;
|
||||
|
||||
|
||||
|
||||
public void testReadAndWriteLotsOfCommands() throws Exception {
|
||||
System.out.println("Marshalling: " + commandCount + " objects");
|
||||
for (long i = 0; i < commandCount ; i++) {
|
||||
logProgress("Marshalling", i);
|
||||
DataStructure object = createDataStructure(i);
|
||||
writeObject(object);
|
||||
}
|
||||
ds.writeInt(endOfStreamMarker);
|
||||
|
||||
// now lets read from the stream
|
||||
ds.close();
|
||||
|
||||
System.out.println("Unmarshalling: " + commandCount + " objects");
|
||||
|
||||
ByteArrayInputStream in = new ByteArrayInputStream(buffer.toByteArray());
|
||||
DataInputStream dis = new DataInputStream(in);
|
||||
for (long i = 0; i < commandCount ; i++) {
|
||||
logProgress("Unmarshalling", i);
|
||||
DataStructure command = null;
|
||||
try {
|
||||
command = (DataStructure) openWireformat.unmarshal(dis);
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
fail("Failed to unmarshal object: " + i + ". Reason: " + e);
|
||||
}
|
||||
assertDataStructureExpected(command, i);
|
||||
}
|
||||
|
||||
int marker = dis.readInt();
|
||||
assertEquals("Marker int", Integer.toHexString(endOfStreamMarker), Integer.toHexString(marker));
|
||||
|
||||
// lets try read and we should get an exception
|
||||
try {
|
||||
dis.readByte();
|
||||
fail("Should have reached the end of the stream");
|
||||
}
|
||||
catch (IOException e) {
|
||||
// worked!
|
||||
}
|
||||
}
|
||||
|
||||
protected void logProgress(String message, long i) {
|
||||
if (i % logGroup == 0) {
|
||||
System.out.println(message + " at object: " + i);
|
||||
}
|
||||
}
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
openWireformat = createOpenWireFormat();
|
||||
}
|
||||
|
||||
protected OpenWireFormat createOpenWireFormat() {
|
||||
OpenWireFormat wf = new OpenWireFormat();
|
||||
wf.setCacheEnabled(true);
|
||||
wf.setStackTraceEnabled(true);
|
||||
wf.setVersion(1);
|
||||
return wf;
|
||||
}
|
||||
|
||||
private void writeObject(Object object) throws IOException {
|
||||
openWireformat.marshal(object, ds);
|
||||
}
|
||||
|
||||
protected DataStructure createDataStructure(long index) {
|
||||
ProducerId id = new ProducerId();
|
||||
id.setConnectionId(connectionId);
|
||||
id.setSessionId(index);
|
||||
id.setValue(index);
|
||||
|
||||
ProducerInfo object = new ProducerInfo();
|
||||
object.setProducerId(id);
|
||||
object.setDestination(destination);
|
||||
return object;
|
||||
}
|
||||
|
||||
protected void assertDataStructureExpected(DataStructure object, long i) {
|
||||
assertEquals("Type of object for index: " + i, ProducerInfo.class, object.getClass());
|
||||
ProducerInfo command = (ProducerInfo) object;
|
||||
|
||||
ProducerId id = command.getProducerId();
|
||||
assertNotNull("ProducerID for object at index: " + i, id);
|
||||
|
||||
assertEquals("connection ID in object: "+ i, connectionId, id.getConnectionId());
|
||||
String actual = Long.toHexString(id.getValue());
|
||||
String expected = Long.toHexString(i);
|
||||
assertEquals("value of object: "+ i + " was: " + actual, expected, actual);
|
||||
assertEquals("value of object: "+ i + " was: " + actual, i, id.getSessionId());
|
||||
}
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/**
|
||||
* 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;
|
||||
|
||||
|
||||
public class PublishThenConsumeSoakTest extends SoakTestSupport{
|
||||
|
||||
|
||||
public void testPublishThenReceive() throws Exception {
|
||||
messageCount = 5000000;
|
||||
|
||||
createProducers();
|
||||
int counter = 0;
|
||||
for (int i = 0; i < messageCount; i++) {
|
||||
|
||||
for (int k = 0; k < producers.length; k++) {
|
||||
producers[k].sendMessage(payload,"counter",counter);
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
||||
allMessagesList.setAsParent(true);
|
||||
|
||||
createConsumers();
|
||||
allMessagesList.waitForMessagesToArrive(messageCount*producers.length);
|
||||
allMessagesList.assertMessagesReceived(messageCount*producers.length);
|
||||
allMessagesList.assertMessagesReceivedAreInOrder(messageCount*producers.length);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,183 +0,0 @@
|
|||
/**
|
||||
* 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;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
import org.apache.activemq.tool.Producer;
|
||||
import org.apache.activemq.tool.Consumer;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import javax.jms.*;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
||||
public class SoakTestSupport extends TestCase{
|
||||
|
||||
private static final Log log = LogFactory.getLog(SoakTestSupport.class);
|
||||
protected BrokerService broker;
|
||||
protected String brokerURL = "tcp://localhost:61616";
|
||||
protected int consumerCount = 1;
|
||||
protected int producerCount = 1;
|
||||
protected int messageSize = 1024;
|
||||
protected int messageCount = 1000;
|
||||
|
||||
protected Producer[] producers;
|
||||
protected Consumer[] consumers;
|
||||
protected String destinationName = "TOOL.DEFAULT";
|
||||
protected Message payload;
|
||||
|
||||
protected ConnectionFactory connectionFactory;
|
||||
protected Destination destination;
|
||||
protected boolean createConnectionPerClient = true;
|
||||
protected boolean topic = false;
|
||||
protected boolean transacted = false;
|
||||
protected boolean durable = true;
|
||||
protected boolean useEmbeddedBroker = true;
|
||||
protected boolean keepOnRunning = true;
|
||||
protected int duration = 0; //duration in minutes
|
||||
protected boolean useConsumerListener = true;
|
||||
protected Consumer allMessagesList = new Consumer();
|
||||
private String dataFileRoot = "activemq-data";
|
||||
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
//clean up db store
|
||||
File dataFile = new File(dataFileRoot);
|
||||
recursiveDelete(dataFile);
|
||||
|
||||
if (useEmbeddedBroker) {
|
||||
if (broker == null) {
|
||||
broker = createBroker();
|
||||
}
|
||||
}
|
||||
|
||||
connectionFactory = createConnectionFactory();
|
||||
Connection con = connectionFactory.createConnection();
|
||||
Session session = con.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
|
||||
|
||||
if (topic) {
|
||||
destination = session.createTopic(destinationName);
|
||||
} else {
|
||||
destination = session.createQueue(destinationName);
|
||||
}
|
||||
|
||||
createPayload(session);
|
||||
|
||||
con.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void createPayload(Session session) throws JMSException {
|
||||
|
||||
byte[] array = new byte[messageSize];
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
array[i] = (byte) i;
|
||||
}
|
||||
|
||||
BytesMessage bystePayload = session.createBytesMessage();
|
||||
bystePayload.writeBytes(array);
|
||||
payload = (Message) bystePayload;
|
||||
}
|
||||
|
||||
|
||||
protected void createProducers() throws JMSException {
|
||||
producers = new Producer[producerCount];
|
||||
for (int i = 0; i < producerCount; i++) {
|
||||
producers[i] = new Producer(connectionFactory, destination);
|
||||
if (durable) {
|
||||
producers[i].setDeliveryMode(DeliveryMode.PERSISTENT);
|
||||
}
|
||||
else {
|
||||
producers[i].setDeliveryMode(DeliveryMode.NON_PERSISTENT);
|
||||
}
|
||||
producers[i].start();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void createConsumers() throws JMSException {
|
||||
consumers = new Consumer[consumerCount];
|
||||
for (int i = 0; i < consumerCount; i++) {
|
||||
consumers[i] = new Consumer(connectionFactory, destination);
|
||||
consumers[i].setParent(allMessagesList);
|
||||
if(useConsumerListener){
|
||||
consumers[i].start();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected ActiveMQConnectionFactory createConnectionFactory() throws JMSException {
|
||||
|
||||
if (useEmbeddedBroker) {
|
||||
return new ActiveMQConnectionFactory("vm://localhost");
|
||||
} else {
|
||||
return new ActiveMQConnectionFactory(brokerURL);
|
||||
}
|
||||
}
|
||||
|
||||
protected BrokerService createBroker() throws Exception {
|
||||
BrokerService broker = new BrokerService();
|
||||
configureBroker(broker);
|
||||
broker.start();
|
||||
return broker;
|
||||
}
|
||||
|
||||
protected void configureBroker(BrokerService broker) throws Exception {
|
||||
broker.addConnector("vm://localhost");
|
||||
broker.setDeleteAllMessagesOnStartup(true);
|
||||
}
|
||||
|
||||
public void startTimer() {
|
||||
|
||||
Thread timer = new Thread(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
Thread.sleep(duration * 60 * 1000);
|
||||
keepOnRunning = true;
|
||||
} catch (InterruptedException e) {
|
||||
|
||||
} finally {
|
||||
|
||||
}
|
||||
}
|
||||
}, "TimerThread");
|
||||
|
||||
|
||||
log.info("Starting timer thread... Duration :" +duration + " minutes");
|
||||
timer.start();
|
||||
}
|
||||
|
||||
protected void recursiveDelete(File file) {
|
||||
if( file.isDirectory() ) {
|
||||
File[] files = file.listFiles();
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
recursiveDelete(files[i]);
|
||||
}
|
||||
}
|
||||
file.delete();
|
||||
}
|
||||
}
|
|
@ -1,116 +0,0 @@
|
|||
/**
|
||||
* 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.tool;
|
||||
|
||||
import org.apache.activemq.util.MessageIdList;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Message;
|
||||
import javax.jms.MessageConsumer;
|
||||
import javax.jms.MessageListener;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.Topic;
|
||||
/**
|
||||
* @version $Revision: 1.3 $
|
||||
*/
|
||||
public class Consumer extends MessageIdList implements MessageListener{
|
||||
protected Connection connection;
|
||||
protected MessageConsumer consumer;
|
||||
protected long counter = 0;
|
||||
protected boolean isParent = false;
|
||||
protected boolean inOrder = true;
|
||||
|
||||
|
||||
public Consumer() {
|
||||
super();
|
||||
}
|
||||
public Consumer(ConnectionFactory fac,Destination dest,String consumerName) throws JMSException{
|
||||
connection=fac.createConnection();
|
||||
Session s=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
|
||||
if(dest instanceof Topic&&consumerName!=null&&consumerName.length()>0){
|
||||
consumer=s.createDurableSubscriber((Topic) dest,consumerName);
|
||||
}else{
|
||||
consumer=s.createConsumer(dest);
|
||||
}
|
||||
consumer.setMessageListener(this);
|
||||
}
|
||||
public Consumer(ConnectionFactory fac,Destination dest) throws JMSException{
|
||||
this(fac,dest,null);
|
||||
}
|
||||
public void start() throws JMSException{
|
||||
connection.start();
|
||||
}
|
||||
public void stop() throws JMSException{
|
||||
connection.stop();
|
||||
}
|
||||
public void shutDown() throws JMSException{
|
||||
connection.close();
|
||||
}
|
||||
|
||||
|
||||
public Message receive() throws JMSException{
|
||||
return consumer.receive();
|
||||
}
|
||||
|
||||
public Message receive(long wait) throws JMSException{
|
||||
return consumer.receive(wait);
|
||||
}
|
||||
|
||||
public void onMessage(Message msg){
|
||||
super.onMessage(msg);
|
||||
if(isParent) {
|
||||
try {
|
||||
long ctr = msg.getLongProperty("counter");
|
||||
if (counter != ctr){
|
||||
inOrder = false;
|
||||
}
|
||||
counter ++;
|
||||
}catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean isInOrder() {
|
||||
return inOrder;
|
||||
}
|
||||
|
||||
|
||||
public void setAsParent(boolean isParent) {
|
||||
this.isParent = isParent;
|
||||
}
|
||||
|
||||
public boolean isParent() {
|
||||
return this.isParent;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Performs a testing assertion that the correct order of messages have
|
||||
* been received
|
||||
*
|
||||
* @param messageCount
|
||||
*/
|
||||
public void assertMessagesReceivedAreInOrder(int messageCount) {
|
||||
assertEquals("expected number of messages when received", messageCount, getMessageCount());
|
||||
}
|
||||
|
||||
}
|
|
@ -1,68 +0,0 @@
|
|||
/**
|
||||
* 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.tool;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.DeliveryMode;
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Message;
|
||||
import javax.jms.MessageProducer;
|
||||
import javax.jms.Session;
|
||||
/**
|
||||
* @version $Revision: 1.3 $
|
||||
*/
|
||||
public class Producer{
|
||||
protected Connection connection;
|
||||
protected MessageProducer producer;
|
||||
public Producer(ConnectionFactory fac,Destination dest) throws JMSException{
|
||||
connection=fac.createConnection();
|
||||
Session s=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
|
||||
producer=s.createProducer(dest);
|
||||
}
|
||||
public void setDeliveryMode(int mode) throws JMSException{
|
||||
producer.setDeliveryMode(mode);
|
||||
}
|
||||
public void start() throws JMSException{
|
||||
connection.start();
|
||||
}
|
||||
public void stop() throws JMSException{
|
||||
connection.stop();
|
||||
}
|
||||
public void shutDown() throws JMSException{
|
||||
connection.close();
|
||||
}
|
||||
|
||||
public void sendMessage(Message msg) throws JMSException {
|
||||
sendMessage(msg, null,0);
|
||||
}
|
||||
|
||||
/*
|
||||
* allow producer to attach message counter on its header. This will be used to verify message order
|
||||
*
|
||||
*/
|
||||
public void sendMessage(Message msg, String headerName, long headerValue) throws JMSException{
|
||||
if(headerName != null) {
|
||||
msg.setLongProperty(headerName, headerValue);
|
||||
}
|
||||
|
||||
producer.send(msg);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
This module creates a system testing framework for ActiveMQ.
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
This module requires Java 5.
|
||||
|
||||
Also you must have the ACTIVEMQ_HOME environment variable defined
|
|
@ -1,60 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
<project default="default" xmlns:j="jelly:core" xmlns:ant="jelly:ant" xmlns:license="license" xmlns:util="jelly:util" xmlns:maven="jelly:maven">
|
||||
|
||||
<preGoal name="test:compile">
|
||||
<attainGoal name="systest:generate" />
|
||||
</preGoal>
|
||||
|
||||
<postGoal name="clean">
|
||||
<delete dir="${basedir}/activemq-data"/>
|
||||
</postGoal>
|
||||
|
||||
<goal name="systest:generate" description="Generates the system tests." prereqs="setclasspath">
|
||||
|
||||
<delete dir="target/test"/>
|
||||
|
||||
<taskdef name="systest" classname="org.apache.activemq.systest.task.SystemTestTask">
|
||||
<classpath refid="test.classpath"/>
|
||||
</taskdef>
|
||||
|
||||
<systest srcDir="${basedir}/src/main/java" destDir="${basedir}/target/test" scenariosFile="${basedir}/src/main/resources/activemq-scenarios.properties">
|
||||
<clientFiles dir="${basedir}/src/test/resources/clients">
|
||||
<include name="**/*.xml"/>
|
||||
</clientFiles>
|
||||
<brokerFiles dir="${basedir}/src/test/resources/brokers">
|
||||
<include name="**/*.xml"/>
|
||||
<exclude name="**/broker_non_persistent_discovery.xml"/>
|
||||
<!--
|
||||
<exclude name="**/broker_separate_process.xml"/>
|
||||
-->
|
||||
</brokerFiles>
|
||||
</systest>
|
||||
</goal>
|
||||
|
||||
<goal name="setclasspath" prereqs="java:compile">
|
||||
<path id="test.classpath">
|
||||
<pathelement path="${maven.build.dest}"/>
|
||||
<pathelement path="${basedir}/src/main/resources"/>
|
||||
<pathelement path="${basedir}/target/classes"/>
|
||||
<pathelement path="${basedir}/target/test-classes"/>
|
||||
<path refid="maven.dependency.classpath"/>
|
||||
</path>
|
||||
</goal>
|
||||
|
||||
</project>
|
|
@ -1,96 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-parent</artifactId>
|
||||
<version>5.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>activemq-systest</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>ActiveMQ :: System Test</name>
|
||||
<description>System Testing Framework for ActiveMQ</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.xbean</groupId>
|
||||
<artifactId>xbean-spring</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cglib</groupId>
|
||||
<artifactId>cglib-full</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jetty</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jetty</groupId>
|
||||
<artifactId>jetty</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>activemq</groupId>
|
||||
<artifactId>jmdns</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.derby</groupId>
|
||||
<artifactId>derby</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>annogen</groupId>
|
||||
<artifactId>annogen</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -1,31 +0,0 @@
|
|||
##---------------------------------------------------------------------------
|
||||
## 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.
|
||||
##---------------------------------------------------------------------------
|
||||
|
||||
maven.repo.remote=\
|
||||
http://dist.codehaus.org,\
|
||||
http://www.ibiblio.org/maven,\
|
||||
http://people.apache.org/repository
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# Build Properties
|
||||
# -------------------------------------------------------------------
|
||||
maven.multiproject.type=jar
|
||||
maven.eclipse.classpath.include=${basedir}/src/test/resources
|
||||
|
||||
maven.changelog.range=730
|
||||
|
||||
maven.junit.jvmargs=-Xmx160m
|
|
@ -1,178 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
<!DOCTYPE project>
|
||||
<project>
|
||||
<pomVersion>3</pomVersion>
|
||||
<extend>${basedir}/../etc/project.xml</extend>
|
||||
|
||||
<name>ActiveMQ :: System Test</name>
|
||||
<id>activemq-systest</id>
|
||||
<shortDescription>
|
||||
System Testing Framework for ActiveMQ
|
||||
</shortDescription>
|
||||
<description>System Testing Framework for ActiveMQ</description>
|
||||
|
||||
<package>org.apache.activemq.systest</package>
|
||||
<packageGroups>
|
||||
<packageGroup>
|
||||
<title>The core APIs of the system testing agents</title>
|
||||
<packages>org.apache.activemq.systest</packages>
|
||||
</packageGroup>
|
||||
<packageGroup>
|
||||
<title>The single VM implementations</title>
|
||||
<packages>org.apache.activemq.systest.impl.vm</packages>
|
||||
</packageGroup>
|
||||
<packageGroup>
|
||||
<title>The testing use cases and scenarios</title>
|
||||
<packages>org.apache.activemq.systest.usecase.*</packages>
|
||||
</packageGroup>
|
||||
</packageGroups>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
|
||||
<version>${geronimo_spec_j2ee_connector_version}</version>
|
||||
<properties>
|
||||
<rar.bundle>false</rar.bundle>
|
||||
<lib>true</lib>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${pom.groupId}</groupId>
|
||||
<artifactId>activemq-core</artifactId>
|
||||
<version>${pom.currentVersion}</version>
|
||||
<properties>
|
||||
<rar.bundle>true</rar.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>springframework</groupId>
|
||||
<artifactId>spring</artifactId>
|
||||
<version>${spring_version}</version>
|
||||
<url>http://www.springframework.org</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cglib</groupId>
|
||||
<artifactId>cglib-full</artifactId>
|
||||
<version>${cglib_full_version}</version>
|
||||
<url>http://cglib.sourceforge.net/</url>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>activemq</groupId>
|
||||
<artifactId>jmdns</artifactId>
|
||||
<version>${jmdns_version}</version>
|
||||
<properties>
|
||||
<rar.bundle>true</rar.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${pom.groupId}</groupId>
|
||||
<artifactId>activeio-core</artifactId>
|
||||
<version>${activeio_version}</version>
|
||||
<properties>
|
||||
<rar.bundle>true</rar.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.derby</groupId>
|
||||
<artifactId>derby</artifactId>
|
||||
<version>${derby_version}</version>
|
||||
<properties>
|
||||
<rar.bundle>true</rar.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<!-- for systest Ant task -->
|
||||
<dependency>
|
||||
<groupId>annogen</groupId>
|
||||
<artifactId>annogen</artifactId>
|
||||
<version>0.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.6.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<nagEmailAddress>dev@activemq.codehaus.org</nagEmailAddress>
|
||||
<sourceDirectory>src/main/java</sourceDirectory>
|
||||
<unitTestSourceDirectory>target/test</unitTestSourceDirectory>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<unitTest>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>target/test</directory>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/test/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<includes>
|
||||
<include>**/*Test.*</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
|
||||
<exclude>**/broker_separate_process/**</exclude>
|
||||
<exclude>**/broker/topic/nonDurable/TwoBrokerNetworkScenarioTest.*</exclude>
|
||||
<exclude>**/broker/topic/nonDurableTransacted/TwoBrokerNetworkScenarioTest.*</exclude>
|
||||
<exclude>**/broker_non_persistent/topic/nonDurable/TwoBrokerNetworkScenarioTest.*</exclude>
|
||||
<exclude>**/broker_non_persistent/topic/nonDurableTransacted/TwoBrokerNetworkConnectedBeforeStartScenarioTest.*</exclude>
|
||||
<exclude>**/broker_non_persistent/topic/nonDurableTransacted/TwoBrokerNetworkScenarioTest.*</exclude>
|
||||
|
||||
<exclude>**/broker/topic/durable/TwoBrokerNetworkConnectedBeforeStartScenarioTest.*</exclude>
|
||||
<exclude>**/broker/topic/durableTransacted/TwoBrokerNetworkConnectedBeforeStartScenarioTest.*</exclude>
|
||||
<exclude>**/broker/topic/nonDurable/TwoBrokerNetworkConnectedBeforeStartScenarioTest.*</exclude>
|
||||
<exclude>**/broker_non_persistent/topic/durable/TwoBrokerNetworkScenarioTest.*</exclude>
|
||||
<exclude>**/broker_non_persistent/topic/durableTransacted.TwoBrokerNetworkScenarioTest.*</exclude>
|
||||
|
||||
</excludes>
|
||||
</unitTest>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -1,35 +0,0 @@
|
|||
/**
|
||||
* 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.systest;
|
||||
|
||||
/**
|
||||
*
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
public interface Agent {
|
||||
|
||||
public void start() throws Exception;
|
||||
|
||||
public void stop() throws Exception;
|
||||
|
||||
/**
|
||||
* A helper method to make it easy to track exceptions when stopping complex agents
|
||||
*
|
||||
* @param stopper
|
||||
*/
|
||||
public void stop(AgentStopper stopper);
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
/**
|
||||
* 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.systest;
|
||||
|
||||
/**
|
||||
* A helper class used to stop a bunch of services, catching and logging any
|
||||
* exceptions and then throwing the first exception when everything is stoped.
|
||||
*
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
public class AgentStopper {
|
||||
private Exception firstException;
|
||||
|
||||
/**
|
||||
* Stops the given service, catching any exceptions that are thrown.
|
||||
*/
|
||||
public void stop(Agent service) {
|
||||
if (service != null) {
|
||||
try {
|
||||
service.stop(this);
|
||||
}
|
||||
catch (Exception e) {
|
||||
onException(service, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onException(Object owner, Exception e) {
|
||||
logError(owner, e);
|
||||
if (firstException == null) {
|
||||
firstException = e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws the first exception that was thrown if there was one.
|
||||
*/
|
||||
public void throwFirstException() throws Exception {
|
||||
if (firstException != null) {
|
||||
throw firstException;
|
||||
}
|
||||
}
|
||||
|
||||
protected void logError(Object service, Exception e) {
|
||||
System.err.println("Could not stop service: " + service + ". Reason: " + e);
|
||||
e.printStackTrace(System.err);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
/**
|
||||
* 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.systest;
|
||||
|
||||
/**
|
||||
* A helper class for working with agents
|
||||
*
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
public abstract class AgentSupport implements Agent {
|
||||
|
||||
public void stop() throws Exception {
|
||||
AgentStopper stopper = new AgentStopper();
|
||||
stop(stopper);
|
||||
stopper.throwFirstException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a way for derived classes to stop resources cleanly, handling exceptions
|
||||
*/
|
||||
public abstract void stop(AgentStopper stopper);
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
/**
|
||||
* 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.systest;
|
||||
|
||||
import javax.jms.ConnectionFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
public interface BrokerAgent extends Agent {
|
||||
|
||||
/**
|
||||
* Kills the given broker, if possible avoiding a clean shutdown
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
void kill() throws Exception;
|
||||
|
||||
/**
|
||||
* Returns the connection factory to connect to this broker
|
||||
*/
|
||||
ConnectionFactory getConnectionFactory();
|
||||
|
||||
/**
|
||||
* Returns the connection URI to use to connect to this broker
|
||||
*/
|
||||
String getConnectionURI();
|
||||
|
||||
/**
|
||||
* Sets up a network connection to the given broker
|
||||
* @throws Exception
|
||||
*/
|
||||
void connectTo(BrokerAgent broker) throws Exception;
|
||||
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/**
|
||||
* 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.systest;
|
||||
|
||||
import javax.jms.Destination;
|
||||
|
||||
/**
|
||||
*
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
public interface ClientAgent extends Agent {
|
||||
|
||||
public void connectTo(BrokerAgent broker) throws Exception;
|
||||
|
||||
public void setDestination(Destination destination);
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue