/// <summary> /// Attempts to publish the message to a listener. /// </summary> /// <param name="wrapper"></param> /// <param name="message"></param> /// <returns></returns> public static Task PublishAsync(this ActorReferenceWrapper wrapper, MessageWrapper message) { ISubscriberActor actor = (ISubscriberActor)wrapper.ActorReference.Bind(typeof(ISubscriberActor)); return(actor.ReceiveMessageAsync(message)); }
/// <inheritdoc /> public override Task PublishAsync(MessageWrapper message) { return(MessageWrapperExtensions.PublishAsync(this, message)); }
/// <summary> /// Convert the provided <paramref name="messageWrapper"/> into an object of type <typeparamref name="TResult"/> /// </summary> /// <param name="messageWrapper"></param> /// <returns></returns> public static TResult CreateMessage <TResult>(this MessageWrapper messageWrapper) { var message = (PayloadSerializer ?? new DefaultPayloadSerializer()).Deserialize <TResult>(messageWrapper.Payload); return(message); }
/// <summary> /// Attempts to publish the message to a listener. /// </summary> /// <param name="message"></param> /// <returns></returns> public override Task PublishAsync(MessageWrapper message) { var client = SubscriberServicePartitionClient.Create(ServiceReference); return(client.ReceiveMessageAsync(message)); }
/// <summary> /// Attempts to publish the message to a listener. /// </summary> /// <param name="message"></param> /// <returns></returns> public abstract Task PublishAsync(MessageWrapper message);
/// <summary> /// Attempts to publish the message to a listener. /// </summary> /// <param name="message"></param> /// <returns></returns> public override Task PublishAsync(MessageWrapper message) { ISubscriberActor actor = (ISubscriberActor)ActorReference.Bind(typeof(ISubscriberActor)); return(actor.ReceiveMessageAsync(message)); }