Ejemplo n.º 1
0
 /// <summary>
 /// Sends a string message to a specified topic with headers.
 ///
 /// There will be no context with the message so callback will be directed to the 'no context' callback.
 /// </summary>
 /// <param name="topicPath">The topic path.</param>
 /// <param name="message">The message to send.</param>
 /// <param name="headers">The headers to send with the message.</param>
 /// <param name="callback">Notifies that the message was sent.</param>
 public void SendWithHeaders(string topicPath, string message, List <string> headers, ISendCallback callback)
 {
     messaging.Send(
         topicPath,
         Diffusion.Content.NewContent(message),
         messaging.CreateSendOptionsBuilder().SetHeaders(headers).Build(),
         callback);
 }