Using multicast factory

  • Christian Meunier

    I am trying to leverage lrmp so i can avoid to run any jms server.

    i modified my code so the topic connection is factored by the MulticastTopicConnectionFactory using port 1024

    When i try to publish a message i got the following exception:

    com.ubermq.jms.client.JMSIOException: output operation failed
        at com.ubermq.jms.client.impl.TopicSession$LocalTopicPublisher.outputMessageDatagram(
        at com.ubermq.jms.client.impl.TopicSession$LocalTopicPublisher.publish(
        at com.ubermq.jms.client.impl.TopicSession$LocalTopicPublisher.publish(

    If there something i need to care about when dealing with mulicast connection instead of unicast ?

    Thanks in advance.

    • Christian Meunier

      import com.ubermq.jms.client.MulticastTopicConnectionFactory;
      import javax.jms.*;

      public class SimpleMulticastTest
          private static TopicConnectionFactory topicConnectionFactory = null;
          private static TopicConnection        topicConnection = null;
          private static TopicSession           topicSession = null;
          private static Topic                  cacheTopic = null;
          private static TopicPublisher         topicPublisher = null;

          public static void main(String[] args)
                      topicConnectionFactory = new MulticastTopicConnectionFactory("",5555);
                      topicConnection = topicConnectionFactory.createTopicConnection();
                      topicSession = topicConnection.createTopicSession(false,Session.AUTO_ACKNOWLEDGE);
                      cacheTopic = topicSession.createTopic("cacheTopic");
                      topicPublisher = topicSession.createPublisher(cacheTopic);

                      Message message = topicSession.createMessage();

                  catch (JMSException e)

    • Jimmy P

      Jimmy P - 2002-10-08

      Hello there,
      This was a bug in the LRMP implementation. It is fixed now, and I released UberMQ 1.0.1, which contains the fix. 

      The sources have a JUnit test case that you can run in order to check that things are working on your network.

      Good luck, and let me know if you run into any other problems.

      • Christian Meunier

        Thanks a lot it works perfectly now


Log in to post a comment.