Table of Contents

Class RabbitController

Namespace
adas_core.Controllers
Assembly
adas-core.dll
[Route("rabbit")]
[ApiController]
public class RabbitController : ControllerBase
Inheritance
RabbitController
Inherited Members
Extension Methods

Constructors

RabbitController(ReceiverService)

public RabbitController(ReceiverService receiverService)

Parameters

receiverService ReceiverService

Methods

ConsumeErrorQueue(string)

Starts the consumption of the specified error queue, processing its messages via the receiver service. Sets a unique trace identifier for the execution context to enable correlated logging of the operation.

[HttpPost]
[AuthorizeRoles(PermissionEnum.RolesType.AuthAdmin)]
[Route("start-consume/{queueName}")]
public Task<IActionResult> ConsumeErrorQueue(string queueName)

Parameters

queueName string

The name of the error queue to be consumed.

Returns

Task<IActionResult>

An IActionResult containing a 200 OK response when the queue consumption is initiated.

ConsumeStopErrorQueue(string)

Stops the consumption of the error queue for the specified queue name by processing it, restricted to authenticated administrators.

[HttpPost]
[AuthorizeRoles(PermissionEnum.RolesType.AuthAdmin)]
[Route("stop-consume/{queueName}")]
public Task<IActionResult> ConsumeStopErrorQueue(string queueName)

Parameters

queueName string

The name of the error queue to process and stop consuming.

Returns

Task<IActionResult>

An IActionResult containing an HTTP 200 OK response once the error queue has been processed.