if you don't know the number of queues at the time the app server is started, it might be possible to create queues programmatically, at runtime.
But I don't know if programmatically created queues are full fledged queues. I don't know if:
- they can be clustered
- messages are still accessible after a server restart
Did anybody try this approach? Does anybody know the difference between programmatically created queues and queues created by configuration?
JMS doesn't have such an automatic semantic for creating queues.
Queues + selectors will do it, but it won't scale.
There is no index backing the selector.
The only way you could achieve it scalably would be use
a single topic and then create Durable Topic Subscriptions
for each "arg" value.
But this is a bit cumbersome because durable topic subscriptions require
you create client ids so you can reconnect to them and you have
to make sure they exist before you send the message.
To me, it sounds more like a solution for a database than JMS.