activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Gradecak <dan...@gradecak.com>
Subject Re: Dynamic Queue Creation
Date Tue, 08 May 2007 15:42:21 GMT
If you read apache pages you ll see that you do not have to create a 
specific queue. It is enough just to publish a message and the queue 
will be created automatically behind the scene.
I am using this feature and it works very well.

Regards,
Daniel

SBenj wrote:
> (MQ 4.1, Java 1.6, Redhat)
> I have a question regarding Queues and Topics as their use relates to our
> business case. We have a few hundred clients, each of whom will need to
> subscribe to their own "mailbox". New clients are continually created every
> few days (they're remote business sites) and generally don't go away,
> although the sites may go offline now and again. Messges come in in a
> continuous stream for the clients, often before the client itself becomes
> live. 
>
> We'd like to bring up each clients mailbox when a message comes in for them,
> or when the site comes live and requests messages. It seems like there are a
> number of ways to model this with MQ, each of which seems to be problematic:
>
> 1. Durable Subscribers - each site becomes a subscriber to it's own topic.
> This works fine, except that the topic will not hold any messages before the
> client goes live for the first time and registers itself as a durable
> subscriber. 
>
> 2. Queues - Message comes in for an unknown client, we create a queue for it
> on the fly. This seems to work. However (quoting from the sun j2ee javadoc
> for session.createQueue:
> createQueue
>    " This facility is provided for the rare cases where clients need to
> dynamically manipulate queue identity. It allows the creation of a queue
> identity with a provider-specific name. Clients that depend on this ability
> are not portable.
>
>     Note that this method is not for creating the physical queue. The
> physical creation of queues is an administrative task and is not to be
> initiated by the JMS API. The one exception is the creation of temporary
> queues, which is accomplished with the createTemporaryQueue method. "
> Any ideas on why this is a concern? 
>
>
> 3. VirtualTopics - This seems to create class cast errors in ActiveMQ - i.e.
> when trying to create a durable subscriber for a virtual topic, activemq
> seems to be trying to cast to a queue. 
>
> 4. MessageSelectors - I suppose we could dump everything into a large queue
> and have a selector for each client, but this would require each message to
> be examined by hundreds of clients, worst case. 
>
>
>  (2) seems to do exactly what we want, but there's that scary message from
> sun. Any help on the above would be most appreciated. Thanks.
>
> -Steve 
>   

Mime
View raw message