try{
checkConnected();
if (dConfig.getDomain() == Domain.QUEUE.getId()){
Queue queue = (Queue) getHermes().getSession().createQueue(dConfig.getName());
for (Iterator iter = messageIds.iterator(); iter.hasNext();) {
queue.deleteMessage((String)iter.next());
}
}else if ( dConfig.isDurable()){
Topic topic = (Topic) getHermes().getSession().createTopic(dConfig.getName());
int fin =0;
String[] ids = topic.getSubscriberIds();