You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Vasily Zaytsev (Jira)" <ji...@apache.org> on 2021/01/18 08:28:00 UTC

[jira] [Created] (AMQNET-654) Problem with Apache.NMS .NET Library

Vasily Zaytsev created AMQNET-654:
-------------------------------------

             Summary: Problem with Apache.NMS .NET Library
                 Key: AMQNET-654
                 URL: https://issues.apache.org/jira/browse/AMQNET-654
             Project: ActiveMQ .Net
          Issue Type: Bug
          Components: NMS
    Affects Versions: OpenWire-1.8.0
            Reporter: Vasily Zaytsev


Hello.

I have a problem with message sending to ActiveMQ via Apache.NMS .NET Library (error -> ava.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



--
This message was sent by Atlassian Jira
(v8.3.4#803005)