All i have created an MDB that sits inside jboss and listens to the queue/testQueue when a message gets posted to that queue it then calls another method which posts the message to a topic. When i do this i get an error that comes back.
code is in the onMessage method onMessage(Message message){ System.out.println("Received: " + message); PublishToTopic(message); } Then PublishToTopic looks like private void PublishToTopic(Message msg){ try { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url); connection = factory.createConnection(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); topic = session.createTopic("topic/testTopic"); //control = session.createTopic("topictest.control"); publisher = session.createProducer(topic); publisher.setDeliveryMode(DeliveryMode.NON_PERSISTENT); //session.createConsumer(control).setMessageListener(this); connection.start(); //request shutdown publisher.send(msg); connection.stop(); connection.close(); } catch (JMSException e) { // TODO Auto-generated catch block e.printStackTrace(); } } The error i get is 18:26:50,523 INFO [PrefetchSubscription] Could not correlate acknowledgment with dispatched message : MessageAck {commandId = 6, responseRequired = false, ackType = 2, consumerId = ID:test1-489 6-1168971769034-3:5:-1:2, firstMessageId = ID:test1-4896-1168971769034-3:6:1:1:1, lastMessage Id = ID:test1-4896-1168971769034-3:6:1:1:1, destination = queue://queue/testQueue, transactio nId = XID:257:64626c6f6e777331393830302f3137:31, messageCount = 1} Am i doing something wrong ? -- View this message in context: http://www.nabble.com/Trouble-with-posting-messages-to-topic-tf3022650.html#a8395964 Sent from the ActiveMQ - User mailing list archive at Nabble.com.