-
Notifications
You must be signed in to change notification settings - Fork 9
Conversation
docker/README.md
Outdated
image: rabbitmq:3.9.20-management-alpine | ||
environment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add container_name
for this example.
@rodneyosodo MG_ES_TYPE=${MG_MESSAGE_BROKER_TYPE}
MG_ES_URL=${MG_NATS_URL} Instead having MG_ES_TYPE=nats
MG_ES_URL=${MG_NATS_URL} |
For now, the Event Store depends on the Message broker apart from when it is Redis. I have changed the env file to reference |
docker/README.md
Outdated
|
||
Events store: This is the same as MESSAGE_BROKER. This can either be 'nats' or 'rabbitmq' or 'redis'. This is used by Magistrala services to store events for distributed processing. If redis is used as an events store, then rabbitmq or nats is used as a message broker. | ||
|
||
Since nats is used as both MQTT_BROKER and MESSAGE_BROKER, it is not possible to run nats as an MQTT_BROKER and nats as a MESSAGE_BROKER at the same time, this is the current depolyment strategy for Magistrala in `docker/docker-compose.yml`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite understand this statement. It's used as both MQTT and message broker but, it's not possible to run it as a MQTT and message broker simultaneously. Isn't that contradicting?
docker/README.md
Outdated
Magistrala supports configurable MQTT broker and Message broker, which also acts as events store. Magistrala uses two types of brokers: | ||
|
||
1. MQTT_BROKER: Handles MQTT communication between MQTT adapters and message broker. This can either be 'vernemq' or 'nats'. | ||
2. MESSAGE_BROKER: Manages communication between adapters and Magistrala writer services. This can either be 'nats' or 'rabbitmq' or 'redis'. This is used to store messages for distributed processing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. MESSAGE_BROKER: Manages communication between adapters and Magistrala writer services. This can either be 'nats' or 'rabbitmq' or 'redis'. This is used to store messages for distributed processing. | |
2. MESSAGE_BROKER: Manages communication between adapters and Magistrala writer services. This can either be 'nats' or 'rabbitmq'. This is used to store messages for distributed processing. |
In the next paragraph you say redis cannot be used as message broker
docker/README.md
Outdated
|
||
For Message brokers other than nats, you would need to build the docker images with rabbtitmq as the build tag and change the `docker/.env`. For example, to use rabbitmq as a message broker: | ||
|
||
```env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for this env code, as it is in the one below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is a terminal command, passing with varabiles, So it can be bash, sh or anyother
fe1ca47
to
8822c18
Compare
Signed-off-by: rodneyosodo <[email protected]>
This commit fixes the container name and restart policy for the RabbitMQ service in the docker-compose file. The container name is changed to "magistrala-rabbitmq" and the restart policy is set to "on-failure". This ensures that the RabbitMQ container has a unique and identifiable name and will automatically restart in case of failure. Signed-off-by: Rodney Osodo <[email protected]>
The system now supports the use of different message brokers and events stores by modifying the docker environment variables and updating the `.env` file. This allows for easy integration of alternative options such as RabbitMQ as the message broker. Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Updates the NATS and RabbitMQ URLs in the .env file to reflect the latest configurations. The README.md file is also updated to include information about the Magistrala services using an events store and lists the available options. The docker-compose.yml file is modified to include the current deployment strategy for Magistrala. It now includes configurations for the MQTT broker, message broker, and events store. The provided YAML snippet contains RabbitMQ configuration for a Docker Compose setup. Additionally, a configuration file for the Docker container "vernemq" and a network called "magistrala-base-net" are mentioned in the summary. Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
docker/README.md
Outdated
1. MQTT_BROKER: Handles MQTT communication between MQTT adapters and message broker. This can either be 'VerneMQ' or 'NATS'. | ||
2. MESSAGE_BROKER: Manages communication between adapters and Magistrala writer services. This can either be 'NATS' or 'RabbitMQ. This is used to store messages for distributed processing. | ||
|
||
Events store: This is the same as MESSAGE_BROKER. This can either be 'NATS' or 'RabbitMQ' or 'Redis'. This is used by Magistrala services to store events for distributed processing. If Redis is used as an events store, then RabbitMQ or NATS is used as a message broker since Redis cannot be used as a message broker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace with something like: By default, we are using the same broker for messages and events.
You can also remove it since it's already mentioned above.
docker/README.md
Outdated
Magistrala supports configurable MQTT broker and Message broker, which also acts as an events store. Magistrala uses two types of brokers: | ||
|
||
1. MQTT_BROKER: Handles MQTT communication between MQTT adapters and message broker. This can either be 'VerneMQ' or 'NATS'. | ||
2. MESSAGE_BROKER: Manages communication between adapters and Magistrala writer services. This can either be 'NATS' or 'RabbitMQ. This is used to store messages for distributed processing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not only writers but any internal consumer. Manages message exchange between Mainflux core, optional, and external components.
docker/README.md
Outdated
MG_ES_URL=${MG_REDIS_URL} | ||
``` | ||
|
||
For MQTT broker other than NATS, you would need to change the `docker/.env`. For example, to use VerneMQ as a MQTT broker: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make VerneMQ a default MQTT broker.
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
What type of PR is this?
This is an optimization because it improves docker-compose deployment
What does this do?
It simplifies docker-compose deployment to use one configuration where nats is used as the MQTT broker, Message Broker and Events Store.
Which issue(s) does this PR fix/relate to?
No issue
Have you included tests for your changes?
Yes, I have tested it manually
Did you document any new/modified feature?
Yes, I have added documentation about the deployment
Notes