Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.72 KB

README.md

File metadata and controls

34 lines (22 loc) · 1.72 KB

LanternMQ

LanternMQ is a go package that facilitates the messaging infrastructure for the Lantern microservices. LanternMQ provides a simple interface for sending and receiving messages in a queue, and for sending and receiving topic messages.

The package includes a RabbitMQ implementation for the LanternMQ interface.

The package also includes a mock implementation for the LanternMQ interface to support testing.

To test the package, see the testing instructions.

Updating Users for RabbitMQ

The default users, their password hashes, and each user's permissions can be found in lantern/definitions.json.

To update users from the RabbitMQ browser interface:

  1. Log-in as an admin at localhost:15672
  2. Go to the Admin tab
  3. Click the specific user to update
  4. Near the bottom of the page click Update this User
  5. Set a new password

A new user can be added by clicking Add a user in the Admin tab.

To update users from the command line:
Run docker exec -it lantern-back-end_lantern-mq_1 rabbitmqctl change_password <username> <new password>

A new user can be added by replacing change_password in the above line to add_user.

The definitions.json file must be updated to persist these changes. To update the definitions.json file:

  1. Get the updated JSON object by using the RabbitMQ API
    (e.g. curl -H "Accept:application/json" -u <management_username>:<management_password> "localhost:15672/api/definitions")
  2. Replace the current definitions file with the response from Step 1

The two steps can also be combined into one command: curl -H "Accept:application/json" -u <management_username>:<management_password> "localhost:15672/api/definitions" > lanternmq/definitions.json