namespace adas_core.Application.Services.Interfaces;
public interface IPublisherService
{
///
/// Creates a new queue with the specified name.
///
/// The name of the queue to create.
/// A task that represents the asynchronous operation. The task result is if the queue was created successfully; otherwise, .
Task CreateQueue(string queueName);
///
/// Asynchronously sends an error message to the specified message queue.
///
/// The error payload or message object to be sent to the queue.
/// The name of the target message queue.
/// A task that represents the asynchronous operation, containing a boolean value that indicates whether the message was successfully sent.
Task SendMessageError(object obj, string queueName);
///
/// Asynchronously sends the specified object as a message to the named queue.
///
/// The object payload to serialize and publish to the queue.
/// The name of the target queue that will receive the message.
/// A task that resolves to true if the message was sent successfully, otherwise false.
Task SendMessage(object obj, string queueName);
///
/// Asynchronously sends a message to the specified message queue and returns a value indicating whether the operation succeeded.
///
/// The message content to be sent to the queue.
/// The name of the target queue where the message will be delivered.
/// A task that represents the asynchronous operation. The task result is true if the message was sent successfully; otherwise, false.
Task SendMessage(string message, string queueName);
}