RabbitMQ
The Devprime platform natively supports RabbitMQ, an open source messaging software that operates on the Advanced Message Queuing Protocol (AMQP) and Streaming Text Oriented Messaging Protocol (MQTT) protocols.
The Stream Adapter settings are performed in the “DevPrime_Stream” key within the “src/App/appsettings.json” file in the development environment. In the production environment, we recommend that configurations be passed through the DevOps process, with credentials protected through the use of a vault.
Opening Settings from Visual Studio Code
code src/App/appsettings.json
The main configuration parameters are the items “Alias” which acts as an identifier for the service, Enable which enables the service on the adapter, and StreamType which defines the type of service to be used. On each platform, we will have customized configuration items according to the context.
|
|
In the example below, we’re detailing the default Adapter settings and the RabbitMQ-specific settings.
General | — |
---|---|
Enable | Enable the Stream adapter (True/False) |
Alias | Defines a unique name to identify the service |
Default | Sets as default to the centary of having more than one Stream (True/False) |
StreamType | Sets the Stream type (RabbitMQ/Kafka) |
HostName | Configure the url of RabbitMQ |
User | Configures the user to sign in |
Password | Configures the user’s password |
Port | Configure the port |
Exchange | Sets up the default RabbitMQ |
ExchangeType | Configures the type of Exchange |
Retry | Configure the number of retries |
Fallback | Configures a State for automatic resitence in case of failure |
Threads | Sets the number of concurrent connections processing events |
Buffer | Defines the number of events obtained per connection |
Subscribe | Configures RabbitMQ Queues for Read |
The Devprime Platform Stream Adapter supports more than one streaming service simultaneously, to cater for specific scenarios where you need to have both RabbitMQ and Kafka on the same microservice.
In the example below, both RabbitMQ and Kafka were added at the same time. It’s important to note that each item has an alias (Stream1/Stream2), and only Stream1 is set to “Default”.
|
|
Example in the application log with this configuration:
|
|
YAML example with application settings:
To export the configurations as an environment variable and use in Kubernetes, run the command in the Devprime CLI:
dp export kubernetes
|
|
Explore an example of asynchronous communication between microservices'
For detailed information on the settings for each platform, please refer to the specific settings.
The Devprime platform natively supports RabbitMQ, an open source messaging software that operates on the Advanced Message Queuing Protocol (AMQP) and Streaming Text Oriented Messaging Protocol (MQTT) protocols.
The Devprime platform natively supports Apache Kafka, a streaming platform developed by the Apache Software Foundation. The project aims to provide a unified, high-capacity, low-latency platform for real-time data processing.
The Devprime platform natively supports CloudAMQP, which provides a SaaS approach to RabbitMQ, an open-source messaging software that operates on the Advanced Message Queuing Protocol (AMQP) and Streaming Text Oriented Messaging Protocol (MQTT) protocols.
You can work with normal queues, fanout
You can work with normal queues, fanout
You can work with normal queues, fanout
The Devprime platform, through the Stream Adapter, offers the Multistream approach, allowing the integration of more than one Stream service into a single microservice.