Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<beans | ||
xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:amq="http://activemq.apache.org/schema/core" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd | ||
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd | ||
http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd"> | ||
|
||
<!-- Allows us to use system properties as variables in this configuration file --> | ||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> | ||
<property name="locations"> | ||
<value>file:///${activemq.base}/conf/credentials.properties</value> | ||
</property> | ||
</bean> | ||
|
||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data"> | ||
|
||
<!-- Destination specific policies using destination names or wildcards --> | ||
<destinationPolicy> | ||
<policyMap> | ||
<policyEntries> | ||
<policyEntry queue=">" memoryLimit="5mb"/> | ||
<policyEntry topic=">" memoryLimit="5mb"> | ||
</policyEntry> | ||
</policyEntries> | ||
</policyMap> | ||
</destinationPolicy> | ||
|
||
<!-- Use the following to configure how ActiveMQ is exposed in JMX --> | ||
<managementContext> | ||
<managementContext createConnector="false"/> | ||
</managementContext> | ||
|
||
<persistenceAdapter> | ||
<amqPersistenceAdapter syncOnWrite="false" directory="${activemq.base}/data" maxFileLength="20 mb"/> | ||
</persistenceAdapter> | ||
|
||
<sslContext> | ||
<sslContext keyStore="file:${activemq.base}/conf/broker.ks" keyStorePassword="password" trustStore="file:${activemq.base}/conf/broker.ts" trustStorePassword="password"/> | ||
</sslContext> | ||
|
||
<!-- The maximum about of space the broker will use before slowing down producers --> | ||
<systemUsage> | ||
<systemUsage> | ||
<memoryUsage> | ||
<memoryUsage limit="20 mb"/> | ||
</memoryUsage> | ||
<storeUsage> | ||
<storeUsage limit="1 gb" name="foo"/> | ||
</storeUsage> | ||
<tempUsage> | ||
<tempUsage limit="100 mb"/> | ||
</tempUsage> | ||
</systemUsage> | ||
</systemUsage> | ||
|
||
|
||
<!-- The transport connectors ActiveMQ will listen to --> | ||
<transportConnectors> | ||
<transportConnector name="stomp" uri="stomp://localhost:61613"/> | ||
</transportConnectors> | ||
|
||
</broker> | ||
|
||
|
||
<!-- An embedded servlet engine for serving up the Admin console --> | ||
<jetty xmlns="http://mortbay.com/schemas/jetty/1.0"> | ||
<connectors> | ||
<nioConnector port="8161"/> | ||
</connectors> | ||
|
||
<handlers> | ||
<webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/> | ||
<webAppContext contextPath="/fileserver" resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/> | ||
</handlers> | ||
</jetty> | ||
|
||
</beans> | ||
<!-- END SNIPPET: example --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace :activemq do | ||
desc "Start ActiveMQ" | ||
task :start do | ||
system("$ACTIVEMQ_HOME/bin/activemq xbean:file:./config/activemq.xml &") || abort("Starting ActiveMQ failed") | ||
end | ||
|
||
desc "Stop ActiveMQ" | ||
task :stop do | ||
pid = `ps -ax |grep [a]ctivemq.xml|awk '{print $1}'` | ||
puts "Stopping ActiveMQ at PID #{pid}" | ||
system("kill #{pid}") || abort("Stoppin ActiveMQ failed") | ||
end | ||
end |