Assuming that you are listening on the topic using a Message Driven Bean, then by default they are all listening with the same client id.
I managed to specify a different client id for each instance by setting the following annotation :
@MessageDriven(mappedName="jms/YourTopic",
activationConfig = {
@ActivationConfigProperty(propertyName = "clientID", propertyValue="${com.sun.aas.instanceName}")
})