Skip to content

microservice-job-broker


Class: ProducerService

Defined in: packages/microservice/job-broker/src/quantification/services/producer.service.ts:15

Publishes quantification jobs to RabbitMQ.

Initializes durable queues/exchanges and enqueues validated QuantifyRequest payloads for downstream consumers to process.

Implements

  • OnApplicationBootstrap

Constructors

Constructor

new ProducerService(configSvc): ProducerService

Defined in: packages/microservice/job-broker/src/quantification/services/producer.service.ts:24

Construct the producer with configuration service for RabbitMQ connectivity and queue settings.

Parameters

configSvc

ConfigService

Nest ConfigService used to resolve RabbitMQ URL, queue names, TTLs, and related options.

Returns

ProducerService

Methods

createAndQueueQuant()

createAndQueueQuant(quantRequest): void

Defined in: packages/microservice/job-broker/src/quantification/services/producer.service.ts:100

Validate and enqueue a quantification job to the configured RabbitMQ queue.

Parameters

quantRequest

QuantifyRequest

The quantification request payload describing models and parameters to quantify.

Returns

void


onApplicationBootstrap()

onApplicationBootstrap(): Promise<void>

Defined in: packages/microservice/job-broker/src/quantification/services/producer.service.ts:51

Initialize the RabbitMQ channel and declare queues/exchanges on app startup.

Returns

Promise<void>

Implementation of

OnApplicationBootstrap.onApplicationBootstrap