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 advise.

QD



Reply via email to