qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mravko <haus...@gmail.com>
Subject qpid memory consumption
Date Fri, 28 Jan 2011 13:58:09 GMT
Hi,
I made simple consumer-producer example in spring with camel and qpid and
the thing is that I have constant increase in memory  usage on broker until
heap space exception..
Consumer is receiving messages and prints them in console..I checked broker
qpid jmx console, there is one temp queue but messages are regularly
consumed from it (message count drops to 0)..Maybe I am missing something..I
am using java qpid 0.9, camel-amqp-1.6.0.0-fuse and standard qpid libs..

Configuration from virtualhosts.xml, I made virtualhost for my needs and
this is slice of code where I define my topic
--------------------------------------------------------------------------
<exchanges>
                <exchange>
                    <type>direct</type>
                    <name>test.direct</name>
                    <durable>true</durable>
                </exchange>
                <exchange>
                    <type>topic</type>
                    <name>test.topic</name>
                </exchange>
                <exchange>
                    <type>topic</type>
                    <name>topic.newsoutput</name>
                </exchange>

   </exchanges>
--------------------------------------------------------------------------

And here is my spring context code
--------------------------------------------------------------------------
Producer

<!-- Camel route from timer, which returns message that is passed via broker
to consumer-->
    <camel:camelContext id="camelInputContext">
    <camel:route id="timerRoute">
            <camel:from

uri="timer://newsTimer?fixedRate=true&amp;period=1&amp;delay=1" />
                <camel:bean ref="messageProducer"/>
            <camel:to uri="amqp:topic.newsoutput" />
        </camel:route>
    </camel:camelContext>

    <!-- this bean just returns string-->
    <bean id="messageProducer" class="qpid.MessageProducer"></bean>


    <bean id="amqpConnectionFactory"
class="org.apache.qpid.client.AMQConnectionFactory">
        <constructor-arg
            value="amqp://guest:guest@clientid/matcher?brokerlist='tcp://localhost:5672'"
/>
    </bean>


    <bean id="amqp" class="org.apache.camel.component.amqp.AMQPComponent">
        <constructor-arg ref="amqpConnectionFactory"></constructor-arg>
    </bean>

    ---------------------------------------------------------------------
Consumer

    <camel:camelContext id="camelInputContext">
        <camel:route id="inputRoute">
            <camel:from uri="amqp:topic.newsoutput" />
            <camel:process ref="messageProcessor" />
    </camel:route>
    </camel:camelContext>


    <!-- MessageProcessor simply prints out message-->
    <bean id="messageProcessor" class="qpid.MessageProcessor" />

    <bean id="amqpConnectionFactory"
class="org.apache.qpid.client.AMQConnectionFactory">
        <constructor-arg
            value="amqp://guest:guest@clientid/matcher?brokerlist='tcp://localhost:5672'"
/>
    </bean>


    <bean id="amqp" class="org.apache.camel.component.amqp.AMQPComponent">
        <constructor-arg ref="amqpConnectionFactory"></constructor-arg>
    </bean>

------------------------------------------------------------------------

Please help..
Marko

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message