{"id":21423799,"url":"https://github.com/ossystems/auditmq","last_synced_at":"2025-03-16T20:40:55.911Z","repository":{"id":102784305,"uuid":"157245238","full_name":"OSSystems/auditmq","owner":"OSSystems","description":"A simple 'auditor' of consistency, made for microservices architecture","archived":false,"fork":false,"pushed_at":"2019-01-14T16:40:42.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-01-23T07:12:54.683Z","etag":null,"topics":["amqp","audit","consistency","microservice"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OSSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-12T16:45:57.000Z","updated_at":"2019-01-14T16:40:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"cfa4e4cd-2db5-4238-ab43-399162e0fc7e","html_url":"https://github.com/OSSystems/auditmq","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSSystems%2Fauditmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSSystems%2Fauditmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSSystems%2Fauditmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSSystems%2Fauditmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OSSystems","download_url":"https://codeload.github.com/OSSystems/auditmq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933369,"owners_count":20370988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amqp","audit","consistency","microservice"],"created_at":"2024-11-22T21:18:12.701Z","updated_at":"2025-03-16T20:40:55.885Z","avatar_url":"https://github.com/OSSystems.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AuditMQ\n\n* AuditMQ it's a simple 'auditor' of consistency, made for microservices architecture.\n\n## Configuration\n\nThe configuration is pretty simple, basically you defines your 'data' and RabbitMQ configuration.\nThe idea behind this data, is a shared information between your services, in the example below, it's a\nsales_count (quantity of sales) from sales-service (owner of this data), supposedly this data is shared\nwith your billing-service (that controls all communication with payment gateway) and needs to be always\nsynchronized.\n\n```\ndsn: \"amqp://guest:guest@localhost:5672/\" # RabbitMQ connection string\nexchange: auditmq                         # RabbitMQ exchange\nconsumer_queue: audit_in                  # RabbitMQ consumer queue\ndata:                                     # Data configuration section\n  sales_count:                            # Field in the report\n    type: int                             # Is a type of this field,\n    owner: sales-service                  # Service owner identification\n    samples: 3                            # Quantity of samples considered safe for comparison\n    replicas:                             # Replicas configuration section\n      - billing-service:                  # Dependant service identification\n          offset: 10                      # Offset is thought for expected data variations*\n```\n\u003e Imagine you're deployed the sales-service and it works as well independently of billing-service, when billing-service\nwill have been deployed, the service can be a variation of sales-service.\n\n## Running\n```\nmake \u0026\u0026 ./auditmq\n```\n\u003e If you needs more information, you can use the DEBUG environment variable to see more informations\n\n## Service Report Data\n\nThe service report data contains the service identification and data in the json.\n\n```\n{\n  \"service\": \"sales-service\",\n  \"data\": {\n    \"sales_count\": 10\n  }\n}\n```\n\u003e Schema is available inside the package called **pkg**\n\n## Comparison\n\nThe comparison runs only with the samples list are **filled** and considered **stable** without variance in integer sampling\nfor example. After that, the AuditMQ send to RabbitMQ a consistency report data for each service configurated and\nglobal consistency status with hardcoded named with 'all' in the report.\n\n## Consistency Status Report\n\nIncluding the service identification and yours status, the **status** can be 0 for not synchronized, and 2 for synchronized.\n\n```\n{\n  \"service\": \"sales-service\",\n  \"status\": 2\n}\n```\n\u003e Schema is available inside the package called **pkg**\n\n## Integration\n\nAuditMQ can be integrated with log processing stack, in our environment is used with Fluentd and InfluxDB to build a simple\nsemaphore and store consistency log along the time.\n\n![Grafana](docs/integration.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fossystems%2Fauditmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fossystems%2Fauditmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fossystems%2Fauditmq/lists"}