activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From qin ding <>
Subject Re: Please Help
Date Fri, 16 Jul 2010 18:35:47 GMT
thanks, Clark.

----- Original Message ----
From: "" <>
Sent: Fri, July 16, 2010 11:56:28 AM
Subject: Re: Please Help

I would go with one topic per table . Using selectors is possible but will 
degrade performance and will also limit your options for achieving horizontal 
scalability down the road.

-----Original Message-----
From: qin ding []
Sent: Friday, July 16, 2010 09:07 AM
Subject: Please Help

Hi, I am using activemq to implement my game. I have n number of game tables and 
n number of players at each table. Right now, a queue is setup to send all 
requests from all users of all tables. A request handler listens to the queue, 
after the request arrives, it processes the request and then sends a response to 
a topic. All players are subscribed to the topic. Therefore they all receive the 
same response.This is not exactly what I want. I want all players at one table 
receives the message. Say, player1 and player2 sit at the table1. When a player1 
send a request, and both player1 and player2 get the response; but no other 
players at other tables should get the response.First I thiink the selector is 
good for this usecase. tableName = '[table name value]' but since the table name 
is runtime property, I don't know how it can be implemented.Then I think use the 
message group. However, I don't see the expected result after I add 
replyMessage.setStringProperty("JMSXGroupID", tableName);.Then I think I should 
create one topic for one table and make players at the table subscribe the 
toptic. In this case, lots of topics will be created depending on the tables are 
created at runtime. And I need to find way to clean the topics when tables are 
no longer used.What should I correctly implement the use case? In brief, all 
players sit at one table should be communicated or share messages among 
themselves. Players from different tables do not.Thank you very much for any 


View raw message