Table of Contents

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

queueName string

The 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

obj object

The object payload to serialize and publish to the queue.

queueName string

The name of the target queue that will receive the message.

Returns

Task<bool>

A task that resolves to true if the message was sent successfully, otherwise false.

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

message string

The message content to be sent to the queue.

queueName string

The 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 true if 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

obj object

The error payload or message object to be sent to the queue.

queueName string

The name of the target message queue.

Returns

Task<bool>

A task that represents the asynchronous operation, containing a boolean value that indicates whether the message was successfully sent.