Uploaded image for project: 'ActiveMQ .Net'
  1. ActiveMQ .Net
  2. AMQNET-654

Problem with Apache.NMS .NET Library

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • OpenWire-1.8.0
    • None
    • NMS
    • None

    Description

      Hello.

      I have a problem with message sending to ActiveMQ via Apache.NMS .NET Library (error -> java.lang.OutOfMemoryError : Java heap space) - Apache NMS (.Net Standard Messaging Library) 1.8.0 : Openwire implementation of Apache NMS API.

      My .net console application has 64-bit.

      The message size in JSON format is  31421312 bytes.

      The message goes to the topic from the fourth time.

      My code is:

                          ConnectionFactory connectionFactory = new ConnectionFactory("activemq:tcp://10.0.1.1:61616");

                          connectionFactory.UserName = "user";

                          connectionFactory.Password = "password";

                          using (IConnection conn = connectionFactory.CreateConnection())

                          {

                              using (ISession session = conn.CreateSession())

                              {

                                  IDestination destination = SessionUtil.GetDestination(session, "topic://esb.test");

                                  dbg("Using destination: " + destination);

                                  using (IMessageProducer producer = session.CreateProducer(destination))

                                 

      {                                 conn.Start();                                 producer.DeliveryMode = MsgDeliveryMode.Persistent;                                 //Send a message                                 ITextMessage request = session.CreateTextMessage(json);                                 request.NMSCorrelationID = new Guid().ToString();                                 request.Properties["NMSXGroupID"] = "test";                                 request.Properties["atHeader"] = "test";                                 producer.Send(request);                                 dbg("Message sent successfully");                                 res = true;                             }

                              }

                          }

       

      Kind regards, Vasily Zaytsev

      Attachments

        Activity

          People

            Unassigned Unassigned
            zaytsev18012021 Vasily Zaytsev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: