IMessageSender Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);
Properties
ClientId |
Gets the ID to identify this client. This can be used to correlate logs and exceptions. (Inherited from IClientEntity) |
IsClosedOrClosing |
Returns true if the client is closed or closing. (Inherited from IClientEntity) |
OperationTimeout |
Duration after which individual operations will timeout. (Inherited from IClientEntity) |
OwnsConnection |
Returns true if connection is owned and false if connection is shared. (Inherited from IClientEntity) |
Path |
Gets the entity path. (Inherited from IClientEntity) |
RegisteredPlugins |
Gets a list of currently registered plugins for this client. (Inherited from IClientEntity) |
ServiceBusConnection |
Connection object to the service bus namespace. (Inherited from IClientEntity) |
Methods
CancelScheduledMessageAsync(Int64) |
Cancels a message that was scheduled. (Inherited from ISenderClient) |
CloseAsync() |
Closes the Client. Closes the connections opened by it. (Inherited from IClientEntity) |
RegisterPlugin(ServiceBusPlugin) |
Registers a ServiceBusPlugin to be used with this client. (Inherited from IClientEntity) |
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. When called on partitioned entities, messages meant for different partitions cannot be batched together. (Inherited from ISenderClient) |
SendAsync(Message) |
Sends a message to Service Bus. (Inherited from ISenderClient) |
UnregisterPlugin(String) |
Unregisters a ServiceBusPlugin. (Inherited from IClientEntity) |
Applies to
See also
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기