Producer
Overview
Module
- package:
@aerokit/sdk/rabbitmq - source: rabbitmq/producer.ts
- last updated:
The RabbitMQ Producer module provides a simple facade for sending messages to RabbitMQ queues. It abstracts the underlying Java implementation, allowing developers to easily integrate message sending capabilities into their applications built on the platform. This module is designed to facilitate communication with RabbitMQ by providing a straightforward interface for sending messages to specified queues.
Key Features:
- Message Sending: The
sendmethod allows developers to send messages to a specified RabbitMQ queue with ease.
Use Cases:
- Event-Driven Architecture: This module is ideal for applications that follow an event-driven architecture, enabling them to publish events or data changes to RabbitMQ queues for consumption by other services or components.
- Integration with External Systems: Developers can use this module to integrate their applications with external systems that communicate via RabbitMQ, facilitating seamless data exchange and event handling.
Example Usage:
ts
import { Producer } from "@aerokit/sdk/rabbitmq";
// Send a message to a RabbitMQ queue
Producer.send("myQueue", "Hello, RabbitMQ!");Classes
Producer
send()
Sends a message to the specified RabbitMQ queue.
tsstatic send(queue: string, message: string): void;
Parameter Type Description queuestringThe name of the RabbitMQ queue to send the message to. messagestringThe content of the message to be sent (as a string). Returns
- Type:
void- Description:
