On Wed, Dec 15, 2010 at 8:08 PM, Bruce Snyder <[email protected]>wrote:
> On Wed, Dec 15, 2010 at 10:56 AM, Stanislaw Kogut <[email protected]>
> wrote:
> > On Wed, Dec 15, 2010 at 7:37 PM, Bruce Snyder <[email protected]
> >wrote:
> >
> >> On Wed, Dec 15, 2010 at 10:32 AM, Stanislaw Kogut <[email protected]>
> >> wrote:
> >> > I already tried every topic here, with no significant effect.
> >> > I'm already using KahaDB for peristence (even placing it's data to
> >> tmpfs).
> >> > I can't use async send/receive, as I need reliable transport.
> >> > I'm using transactions (this is a requirement).
> >>
> >> How about your KahaDB settings? Try this:
> >>
> >> <kahaDB directory="${activemq.base}/data/kahadb"
> >> enableJournalDiskSyncs="false"
> >> indexWriteBatchSize="10000"
> >> indexCacheSize="1000"/>
> >>
> >> Already have this in config file.
> >
> >
> >> > What about multiple consumers? Should they use one or many different
> >> > connection factories or sessions to consume faster?
> >>
> >> Creating multiple sessions from a single connection works well.
> >>
> >> Ok then.
> > What about further scalability of queue? It is very probably I will need
> to
> > send more and more messages. Will distributing queue over many brokers
> help
> > with throughput without significant latency impact? Or there is only way
> to
> > scale up with hardware for broker?
>
> Please provide your broker config file so we can have a look.
>
> Attached config file.
> Another item, have you disabled the dedicated task runner in the
> ActiveMQ start script?
>
Disabled after this question, but looks like it didn't help with one
consumer thread.
>
> Also, have you read through this article?:
>
>
> http://fusesource.com/wiki/display/ProdInfo/Understanding+the+Threads+Allocated+in+ActiveMQ
>
> Looks like it is for vm transport. I'm running (and will run) producer and
consumer on different machines, so I can't get rid of transport threads, as
in in-vm transport.
--
Regards,
Stanislaw Kogut
Sistyma LLC
<!--
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: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">
<!--
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="true" memoryLimit="1mb">
<pendingSubscriberPolicy>
<vmCursor />
</pendingSubscriberPolicy>
</policyEntry>
<policyEntry queue=">" producerFlowControl="false" memoryLimit="10mb">
<!-- Use VM cursor for better latency
For more information, see:
http://activemq.apache.org/message-cursors.html
-->
<pendingQueuePolicy>
<vmQueueCursor/>
</pendingQueuePolicy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
<persistenceAdapter>
<kahaDB directory="${activemq.base}/data/kahadb" enableJournalDiskSyncs="false" indexWriteBatchSize="10000" indexCacheSize="1000"/>
</persistenceAdapter>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
<transportConnector name="niowire" uri="nio://0.0.0.0:61617"/>
</transportConnectors>
</broker>
<import resource="jetty.xml"/>
</beans>
<!-- END SNIPPET: example -->