Apache.NMS.Test.NMSTestSupport.SendMessages C# (CSharp) Method

SendMessages() public method

public SendMessages ( ISession session, IDestination destination, MsgDeliveryMode deliveryMode, int count ) : void
session ISession
destination IDestination
deliveryMode MsgDeliveryMode
count int
return void
        public void SendMessages(ISession session, IDestination destination, MsgDeliveryMode deliveryMode, int count)
        {
            IMessageProducer producer = session.CreateProducer(destination);
            producer.DeliveryMode = deliveryMode;
            for(int i = 0; i < count; i++)
            {
                producer.Send(session.CreateTextMessage("" + i));
            }
            producer.Close();
        }

Same methods

NMSTestSupport::SendMessages ( IConnection connection, IDestination destination, MsgDeliveryMode deliveryMode, int count ) : void
NMSTestSupport::SendMessages ( IDestination destination, MsgDeliveryMode deliveryMode, int count ) : void