-2

I'm creating a sample .net core solution in local and IIS larger message consuming in a queue within a second but I'm deployed in Linux server to could take more time to consume a message in a queue. I don't know how to resolve it kindly help me. Below I attached my sample code here.

 string topic = "QueueTest";
            QueueConnectionFactory.OptimizeAcknowledge = true;
            QueueConnectionFactory.AlwaysSyncSend = false;
            using (IConnection connection = QueueConnectionFactory.CreateConnection("admin", "admin"))
            {

                connection.Start();
                Apache.NMS.ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge);
                using (IDestination dest = session.GetQueue(topic))
                using (IMessageConsumer consumer = session.CreateConsumer(dest))
                {
                    // TimeSpan span4 = TimeSpan.FromSeconds(3);
                    IMessage msg = consumer.Receive();
                    if (msg != null)
                    {
                        ITextMessage message = msg as ITextMessage;
                        string data = message.Text;
                    }
                }
            }
Jagadesh
  • 1
  • 1

1 Answers1

0

Check for receiveBufferSize and sendBufferSize and you can add this to your connection url :

?transport.receiveBufferSize=65536&transport.sendBufferSize=16384
  • Ok but this same message while consuming in local and IIS like windows environment. but the same message is not consumed in the Linux environment. – Jagadesh Jul 26 '21 at 05:26
  • Kindly help me how to send up to 50MB message in a queue @muhammed – Jagadesh Jul 28 '21 at 15:52