qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Huston" <shus...@riverace.com>
Subject RE: Qpid messaging design
Date Tue, 05 Oct 2010 13:32:49 GMT
Hi Felix,

> We're currently evaluating Qpid as a middleware solution and 
> during this process I stumbled upon some questions which I 
> hoped to get clarified with some of your help.

Sure, glad to help.

> For the evaluation I have to implement a typical scenario on 
> our site. 400 Metrics (numbers) are published every second 
> and need to be retrieved < 300ms by max 10 subscribers. It 
> should still be possible to subscribe to individual values only. 

Ok.

> In JMS words : 400 topics each subscribed by 10 Message listeners.
> 
> 
> Now, reading the documentation and the examples the way to go 
> is to send the values via a topic exchange and set the 
> routing key for each Message to the according value 
> identifier: for (i=0;..){
>    message.getDeliveryProperties().setRoutingKey(routing_key+i);
>    async(session).messageTransfer(arg::content=message,
> arg::destination="amq.topic");
> }
> (I'm aware that packing them into one message is very obvious 
> and faster. But for various reasons this is currently not 
> possible in our environment.)

Ok. Looks good.

> The subscriber on the other hand will subscribe using the 
> same exchange, but for each subscription a different routingKey. 
> for (i=0..){
>   session.queueDeclare(arg::queue=queue+i, 
> arg::exclusive=false, arg::autoDelete=true);
>   session.exchangeBind(arg::exchange="amq.topic", 
> arg::queue=queue+i, arg::bindingKey=metric1); }
> 
> 
> 
> 
> 1. Is this the only way to realize the described scenario? 

No. But it should work.

> 2. Why do I need an own queue per routing key per client (400 x 10)? 
>     I've tried to move the queueDeclare outside the loop to 
> re-use the client-specific queue. I'd imagine that the server 
> then dispatches messages with the according routing key to 
> this client's queue. But apparently this is not allowed by 
> the client library. 

Do you mean you want each client to declare one queue and then bind the
amq.topic exchange to that queue using different routing keys? That
should be possible.

> It might well be that I've misunderstood some concepts and 
> would therefore I'd appreciate any help on this.

If you post the problems you experienced trying to bind 400 keys and one
queue that would be helpful.

-Steve

--
Steve Huston, Riverace Corporation
Total Lifecycle Support for Your Networked Applications
http://www.riverace.com


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Mime
View raw message