Interface IPublisherService
- Namespace
- adas_core.Application.Services.Interfaces
- Assembly
- adas-core.Application.dll
public interface IPublisherService
- Extension Methods
Methods
CreateQueue(string)
Creates a new queue with the specified name.
Task<bool> CreateQueue(string queueName)
Parameters
queueNamestringThe name of the queue to create.
Returns
- Task<bool>
A task that represents the asynchronous operation. The task result is true if the queue was created successfully; otherwise, false.
SendMessage(object, string)
Asynchronously sends the specified object as a message to the named queue.
Task<bool> SendMessage(object obj, string queueName)
Parameters
objobjectThe object payload to serialize and publish to the queue.
queueNamestringThe name of the target queue that will receive the message.
Returns
SendMessage(string, string)
Asynchronously sends a message to the specified message queue and returns a value indicating whether the operation succeeded.
Task<bool> SendMessage(string message, string queueName)
Parameters
messagestringThe message content to be sent to the queue.
queueNamestringThe name of the target queue where the message will be delivered.
Returns
- Task<bool>
A task that represents the asynchronous operation. The task result is
trueif the message was sent successfully; otherwise,false.
SendMessageError(object, string)
Asynchronously sends an error message to the specified message queue.
Task<bool> SendMessageError(object obj, string queueName)
Parameters
objobjectThe error payload or message object to be sent to the queue.
queueNamestringThe name of the target message queue.