IMessageSender Interface

Definition

The MessageSender can be used to send messages to Queues or Topics.

public interface IMessageSender : Microsoft.Azure.ServiceBus.Core.ISenderClient
type IMessageSender = interface
    interface ISenderClient
    interface IClientEntity
Public Interface IMessageSender
Implements ISenderClient
Derived
Implements

Examples

Create a new MessageSender to send to a Queue

IMessageSender messageSender = new MessageSender(
    namespaceConnectionString,
    queueName)

Send message

byte[] data = GetData();
await messageSender.SendAsync(data);

Methods

CancelScheduledMessageAsync(Int64)

Cancels a message that was scheduled.

(Inherited from ISenderClient)
ScheduleMessageAsync(Message, DateTimeOffset)

Schedules a message to appear on Service Bus.

(Inherited from ISenderClient)
SendAsync(IList<Message>)

Sends a list of messages to Service Bus.

(Inherited from ISenderClient)
SendAsync(Message)

Sends a message to Service Bus.

(Inherited from ISenderClient)

Applies to

See also