예제 #1
0
 public void enviarObjeto(Mensaje m)
 {
     Console.WriteLine(_producer.CreateXmlMessage(m).Text);
     Console.ReadKey();
     try
     {
         _producer.Send(m);
     }
     catch (System.NullReferenceException ex)
     {
         Console.WriteLine("No se ha podido inicializar el productor. Compruebe que ApacheMQ esté encendido.");
         Console.ReadKey();
     }
 }
예제 #2
0
 /// <summary>
 /// Sends the message to the given destination with the explicit QoS configuration.  The object must be serializable to XML.
 /// </summary>
 public static void Send(this IMessageProducer producer, IDestination destination, object objMessage, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive)
 {
     producer.Send(destination, producer.CreateXmlMessage(objMessage), deliveryMode, priority, timeToLive);
 }
예제 #3
0
 /// <summary>
 /// Sends the message to the given destination
 /// </summary>
 public static void Send(this IMessageProducer producer, IDestination destination, object objMessage, Encoding encoding)
 {
     producer.Send(destination, producer.CreateXmlMessage(objMessage, encoding));
 }
예제 #4
0
 /// <summary>
 /// Sends the message to the default destination with the explicit QoS configuration.  The object must be serializable to XML.
 /// </summary>
 public static void Send(this IMessageProducer producer, object objMessage, Encoding encoding, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive)
 {
     producer.Send(producer.CreateXmlMessage(objMessage, encoding), deliveryMode, priority, timeToLive);
 }
예제 #5
0
 /// <summary>
 /// Sends the message to the default destination for this producer.  The object must be serializable to XML.
 /// </summary>
 public static void Send(this IMessageProducer producer, object objMessage, Encoding encoding)
 {
     producer.Send(producer.CreateXmlMessage(objMessage, encoding));
 }
예제 #6
0
 /// <summary>
 /// Sends the message to the default destination for this producer.  The object must be serializable to XML.
 /// </summary>
 public static void Send(this IMessageProducer producer, object objMessage)
 {
     producer.Send(producer.CreateXmlMessage(objMessage));
 }