You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by kelias <ke...@twincitiespower.ca> on 2010/11/30 16:55:53 UTC
Problems with simple broker and no persistence
I'm trying to get a simple broker working that never stores messages. I want
it to send the messages immediately and if a message cannot be send to trash
it.
I had a solution I thought was working but then the server ran out of memory
and it died. I think perhaps some messages that cannot be delivered are
being stored in memory now? Can someone take a look at my config file and
the log file and let me know what I'm doing wrong?
ACTIVEMQ.XML ------------------------------------------
<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">
<!-- 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>
<!--
The <broker> element is used to configure the ActiveMQ broker.
-->
<broker xmlns="http://activemq.apache.org/schema/core"
brokerName="localhost" dataDirectory="${activemq.base}/data"
destroyApplicationContextOnStop="true" advisorySupport="false"
useJmx="false" schedulerSupport="false" persistent="false" >
<!--
For better performances use VM cursor and small memory limit.
For more information, see:
http://activemq.apache.org/message-cursors.html
Also, if your producer is "hanging", it's probably due to
producer flow control.
For more information, see:
http://activemq.apache.org/producer-flow-control.html
-->
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" producerFlowControl="false">
<dispatchPolicy>
<strictOrderDispatchPolicy />
</dispatchPolicy>
<messageEvictionStrategy>
<oldestMessageEvictionStrategy/>
</messageEvictionStrategy>
<pendingMessageLimitStrategy>
<constantPendingMessageLimitStrategy limit="10"/>
</pendingMessageLimitStrategy>
<subscriptionRecoveryPolicy>
<lastImageSubscriptionRecoveryPolicy />
</subscriptionRecoveryPolicy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<!--
The managementContext is used to configure how ActiveMQ is
exposed in
JMX. By default, ActiveMQ uses the MBean server that is started
by
the JVM. For more information, see:
http://activemq.apache.org/jmx.html
-->
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
<!--
Configure message persistence for the broker. The default
persistence
mechanism is the KahaDB store (identified by the kahaDB tag).
For more information, see:
http://activemq.apache.org/persistence.html
-->
<persistenceAdapter>
<kahaDB directory="${activemq.base}/data/kahadb"/>
</persistenceAdapter>
<!--
The systemUsage controls the maximum amount of space the broker
will
use before slowing down producers. For more information, see:
http://activemq.apache.org/producer-flow-control.html
<systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage limit="20 mb"/>
</memoryUsage>
<storeUsage>
<storeUsage limit="1 gb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="100 mb"/>
</tempUsage>
</systemUsage>
</systemUsage>
-->
<!--
The transport connectors expose ActiveMQ over a given protocol
to
clients and other brokers. For more information, see:
http://activemq.apache.org/configuring-transports.html
-->
<transportConnectors>
<transportConnector name="openwire"
uri="tcp://0.0.0.0:61616?wireFormat.maxInactivityDuration=0"/>
</transportConnectors>
</broker>
<!--
Uncomment to enable Camel
Take a look at activemq-camel.xml for more details
<import resource="camel.xml"/>
-->
<!--
Enable web consoles, REST and Ajax APIs and demos
Take a look at activemq-jetty.xml for more details
-->
<import resource="jetty.xml"/>
</beans>
-------------------------------------------------
The whole log might be a bit big to post, but there are a few things that
look interesting:
Lots of these errors:
2010-11-29 13:16:57,595 | INFO | Transport failed:
java.net.SocketException: Connection reset |
org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
Transport: tcp:///10.13.12.1:53807
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
at
org.apache.activemq.transport.tcp.TcpTransport$2.fill(TcpTransport.java:575)
at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
at
org.apache.activemq.transport.tcp.TcpTransport$2.read(TcpTransport.java:560)
at java.io.DataInputStream.readInt(Unknown Source)
at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:269)
at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:226)
at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:218)
at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:201)
at java.lang.Thread.run(Unknown Source)
And these:
2010-11-29 14:29:30,678 | INFO | Transport failed:
java.net.SocketException: Connection reset |
org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
Transport: tcp:///10.13.12.122:1989
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
at
org.apache.activemq.transport.tcp.TcpTransport$2.fill(TcpTransport.java:575)
at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
at
org.apache.activemq.transport.tcp.TcpTransport$2.read(TcpTransport.java:560)
at java.io.DataInputStream.readInt(Unknown Source)
at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:269)
at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:226)
at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:218)
at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:201)
at java.lang.Thread.run(Unknown Source)
Only one of these in aprox a week:
2010-11-22 15:26:00,116 | INFO | Slow KahaDB access: cleanup took 998 |
org.apache.activemq.store.kahadb.MessageDatabase | ActiveMQ Journal
Checkpoint Worker
And finally this error but I assume this has to do with my machine running
out of memory because this only started happening near the end:
2010-11-30 04:42:22,922 | INFO | Transport failed:
org.apache.activemq.transport.InactivityIOException: Channel was inactive
for too long: /fe80:0:0:0:6980:d333:ab7e:88df:50689 |
org.apache.activemq.broker.TransportConnection.Transport | Async Exception
Handler
org.apache.activemq.transport.InactivityIOException: Channel was inactive
for too long: /fe80:0:0:0:6980:d333:ab7e:88df:50689
at
org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:247)
at
org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:85)
at
org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:104)
at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
at
org.apache.activemq.broker.TransportConnection.dispatch(TransportConnection.java:1247)
at
org.apache.activemq.broker.TransportConnection.processDispatch(TransportConnection.java:808)
at
org.apache.activemq.broker.TransportConnection.iterate(TransportConnection.java:844)
at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
2010-11-30 04:42:29,240 | INFO | Transport failed: java.io.IOException:
Wire format negotiation timeout: peer did not send his wire format. |
org.apache.activemq.broker.TransportConnection.Transport | Async Exception
Handler
java.io.IOException: Wire format negotiation timeout: peer did not send his
wire format.
at
org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:98)
at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
at
org.apache.activemq.broker.TransportConnection.dispatch(TransportConnection.java:1247)
at
org.apache.activemq.broker.TransportConnection.processDispatch(TransportConnection.java:808)
at
org.apache.activemq.broker.TransportConnection.iterate(TransportConnection.java:844)
at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
I have many publishers sending to this one server, and many listeners
connecting as well. The clients are all .NET using NMS.
I tried unsuccessfully to connect to it using Jconsole to see what was going
on. (yes I enabled it in the config file but jconsole couldn't see it when I
did service:jmx:rmi:///jndi/rmi://localhost:1616/jmxrmi . Never used
jconsole before so I'm probably just not putting the parameters in right or
something.
Sorry for the huge post, but I thought it was best to provide as much info
as possible.
Please let me know what you think.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Problems-with-simple-broker-and-no-persistence-tp3065608p3065608.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.