0 Replies Latest reply on Jul 8, 2013 10:48 AM by Diego Lopez Leon

    JMS configuration for fastest sending

    Diego Lopez Leon Newbie

      Hi,

      I have an scenary where I need scary fast message sending rate. I'm configuring my jms message sender like this:

       

      Constructor(host, port, queueName):

      
      clientConnectionFactory = createClientConnectionFactory(host, port);
      
      
      connection = clientConnectionFactory.createConnection();
      
      
      
      
      session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
      
      
      producer = session.createProducer(HornetQJMSClient.createQueue(queueName));
      
      
      producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
      
      
      
      
      connection.start();
      
      

       

      and then a simple method for sending messages

      
      @Override
      
      
      public void sendMessage(Serializable messagePayload) throws Exception {
      
      
          producer.send(session.createObjectMessage(messagePayload));
      
      
      }
      
      

       

      Is there some tweak I can add to this simple scenario to get messages delivered faster?

       

      I'm using v2.2.14.Final