Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
OpenWire-1.8.0
-
None
-
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