You cannot use subtopics with a JMS destination. When using JMS, you can instead use message headers and Consumer selector expressions to achieve similar functionality. Flex 2 supports the subtopic feature with an ActionScript Adapter destination. Below is an example of how to configure your destination for subtopics and how to write code to produce/consume the subtopic using the ActionScript Adapter.
You must specify the following property in the destination section to allow subtopics to be used for a message service destination:
<destination id="ChatTopic"><properties><server><allow-subtopics>true</allow-subtopics> ...
In the destination definition below, we didn't set any adapter reference because we are using the default adapter, which is ActionScript adapter.