[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-users
Subject:    Re: network of broker stop forwarding messages without
From:       Gary Tully <gary.tully () gmail ! com>
Date:       2011-03-30 18:00:43
Message-ID: AANLkTi=HEoYRbEsG1QvZYu47DR642aHOM+yQEraB4h3i () mail ! gmail ! com
[Download RAW message or body]

There is no easy answer with the current code. I am working on
building in support for temp destinations across a network with no
advisories, still some issues with ownership/lifecycle at the moment.
Will let you know when I have something you can try out.

In the short term, to delete your real destinations, if you can build
your own broker from source, you could add a timeout > 0  to the call
to removeDestination in
org.apache.activemq.broker.region.RegionBroker#purgeInactiveDestinations

On 28 March 2011 23:18, anuhbava <anubhava@aol.com> wrote:
> Hi Gary,
> 
> Thanks for pointing the source code to me, its been a great help to try &
> understand how AMQ code is behaving for these scenarios.
> 
> Here is what I found so far:
> 1. connectionFactory.setClientIDPrefix("ID:ReplyDest.host") and
> connectionFactory.setClientID("ID:ReplyDest.host") calls are completely
> ignored while creating a new temporary queue name.
> 2. session.createQueue("ID:ReplyDest.host-client-queue-" + new Date());
> throws exception as I mentioned earlier as well.
> 3. Only hack I could find to alter the naming convention was this call:
> ((ActiveMQConnection)
> connection).getConnectionInfo().getConnectionId().setValue("ID:ReplyDest.");
> 4. Using above trick will alter the naming convention of temporary
> destinations as temp-queue://ID:ReplyDest.12334535345.1
> 5. However when I added this in activemq.xml in
> staticallyIncludedDestinations tag:
> "/>
> Brokers ignored this directive for temporary destinations inclusions. It
> seems staticallyIncludedDestinations only works for named queues and topics
> but not for temp destinations.
> 6. Now if I create regular destinations using
> session.createTopic("ReplyDest.client-topic" + new Date()); and have
> corresponding staticallyIncludedDestinations inclusions then my
> request/responses flow without problems.
> 7. As per your very nice suggestion I have now included
> " advisoryForConsumed="false" advisoryForDelivery="false"
> gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000"/>
> 
> in my destinationPolicy tag. However what I noticed is that even if producer
> and consumer are killed but these newly created named topics are NOT deleted
> until all but one the broker are shutdown. Which is somewhat unexpected
> behavior and it may not work for us since at no time we are going to
> shutdown our AMQ brokers in production, even though producer/consumers can
> be very dynamic and can start/stop many times. Do you have any other
> suggestion for my case, one that can cleanup/remove these (temporary for my
> use case but not really temporary for AMQ) destinations without stopping any
> brokers?
> 
> many thanks for your help so far,
> Anubhava
> 
> 
> 
> 
> --
> View this message in context: \
> http://activemq.2283324.n4.nabble.com/network-of-broker-stop-forwarding-messages-without-advisorySupport-enabled-tp3386261p3413235.html
>  Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> 



-- 
http://blog.garytully.com
http://fusesource.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic