activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: problem about forwarding bridge from VM to remote host
Date Fri, 08 Nov 2013 15:03:43 GMT
Inline...

On Fri, Nov 8, 2013 at 1:05 AM, smith_jor <acceptany@gmail.com> wrote:
> There is an embedded broker inside application, application sends messages to
> this vm ,and vm forwards messages to remote broker A. there is  a consumer
> receiving messages on remote broker A using asyn mode.
> the configure uri like this -
> "vm:(broker:(network:static:(tcp://remotehostA:61616))?persistent=false)"
>
> Since the speed that application send messages to VM is faster than VM
> forwarding messages to remote host.
> So there are many messages stored in VM waiting for forwarding to
> remotehostA, and the memory occupied by application becomes larger and
> larger.
>
> this can make application out of memory , right?
Are you sending persistent messages? If the broker exhausts its
defined memory usage (see defaults here:
http://activemq.apache.org/producer-flow-control.html) then messages
will just be sent to disk. You can configure all of these values
(store size, disk size, producer flow control, etc). If your settings
are correct, you should never OOM even if your remote consumer is
slower than the local producer.

>
> Also ,when appliction stop sending messages, and VM forward all the messages
> to remote host A , the memory occupied by application does not decrease.
> this confumes me a lot.
>
> It seems more reasonable that VM should release the memory , since VM
> already forwards all the messages to remote host. right ?
Well, GC by the JVM is not very deterministic in most cases. You
should take a memory snapshot and trace live objects vs just what you
see as the JVM heap usage... you can even force a GC using jconsole or
visualvm to get closer to what the live object usage is.. if that
doesn't drop, then take a memory snapshot and figure out what the heap
consists of. if there are uncollected objects that should have been
collected, then start analyzing why and how they're leaked.


>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/problem-about-forwarding-bridge-from-VM-to-remote-host-tp4674060.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta

Mime
View raw message