Apache.NMS.IMessageProducer.Send(Apache.NMS.IMessage)

Here are the examples of the csharp api class Apache.NMS.IMessageProducer.Send(Apache.NMS.IMessage) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

1. Example

Project: spring-net
Source File: CachedMessageProducer.cs
public void Send(IMessage message)
        {
            target.Send(message);
        }

2. Example

Project: spring-net
Source File: NmsTemplate.cs
protected virtual void DoSend(IMessageProducer producer, IMessage message)
        {
            if (ExplicitQosEnabled)
            {
                producer.Send(message, DeliveryMode, Priority, TimeToLive);
            }
            else
            {
                producer.Send(message);
            }
        }

3. Example

Project: spring-net
Source File: MessageListenerAdapter.cs
protected virtual void SendResponse(ISession session, IDestination destination, IMessage response)
        {
            IMessageProducer producer = session.CreateProducer(destination);
            try
            {
                PostProcessProducer(producer, response);
                producer.Send(response);
            }
            finally
            {
                NmsUtils.CloseMessageProducer(producer);
            }
        }

4. Example

Project: nova
Source File: ActiveMQSender.cs
public string update_enter(Dictionary<string, object> parameters)
        {
            try
            { 
                string label = (string)parameters["label"];
                string topicname = (string)parameters["topic"];

                ITopic topic = session.GetTopic(topicname);
                using (IMessageProducer producer = session.CreateProducer(topic))
                {
                    var textMessage = producer.CreateTextMessage(label);
                    producer.Send(textMessage);
                }
               
            }
            catch (Exception ex)
            {
                return ex.ToString();
            }

            return null;
        }