{"id":15751531,"url":"https://github.com/mhewedy/rmq-msg-parser","last_synced_at":"2026-02-16T14:03:49.592Z","repository":{"id":185439898,"uuid":"616375266","full_name":"mhewedy/rmq-msg-parser","owner":"mhewedy","description":"A Python library for parsing RabbitMQ messages from text file","archived":false,"fork":false,"pushed_at":"2024-04-08T18:23:42.000Z","size":43,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T07:31:07.174Z","etag":null,"topics":["parser","python","rabbitmq"],"latest_commit_sha":null,"homepage":"","language":"Python","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/mhewedy.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":"2023-03-20T09:11:37.000Z","updated_at":"2023-03-21T21:56:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c97ec10-c318-4b45-b2f1-ca19a37851ef","html_url":"https://github.com/mhewedy/rmq-msg-parser","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":0.4838709677419355,"last_synced_commit":"d58cf36d4885d780bffb728e1100700914339349"},"previous_names":["mhewedy/rmq-msg-parser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mhewedy/rmq-msg-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhewedy%2Frmq-msg-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhewedy%2Frmq-msg-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhewedy%2Frmq-msg-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhewedy%2Frmq-msg-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhewedy","download_url":"https://codeload.github.com/mhewedy/rmq-msg-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhewedy%2Frmq-msg-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265733874,"owners_count":23819430,"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":["parser","python","rabbitmq"],"created_at":"2024-10-04T07:01:47.866Z","updated_at":"2026-02-16T14:03:44.566Z","avatar_url":"https://github.com/mhewedy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RabbitMQ Message Parser\n\nA Python library for parsing rabbitmq messages from text file\n\nLearn\nmore [https://mohewedy.medium.com/parse-rabbitmq-messages-2b2dec09280e](https://mohewedy.medium.com/parse-rabbitmq-messages-2b2dec09280e)\n\n## Install:\n\n```shell\npip install --upgrade --force-reinstall git+https://github.com/mhewedy/rmq-msg-parser\n```\n\n### Install in non-pip environment:\n\nIf your environment doesn't have pip, or you cannot install it, then follow the following steps:\n\n1. create two directories, one for code and other for data\n    ```shell\n    mkdir data rmqparser\n    ```\n2. copy the code\n   from [rmqparser/messages.py](https://raw.githubusercontent.com/mhewedy/rmq-msg-parser/master/rmqparser/messages.py) into\n   rmqparser/messages.py\n    ```shell\n    vim rmqparser/messages.py\n    ```\n   then paste the code from the link above\n3. copy the messages into data/my_rabbitmq_messages.txt (\n   see [data/my_rabbitmq_messages.txt](https://raw.githubusercontent.com/mhewedy/rmq-msg-parser/master/data/my_rabbitmq_messages.txt)\n   for a reference )\n   ```shell\n   vim data/my_rabbitmq_messages.txt\n   ```\n   then paste the messages into the opened vim file\n4. copy the code from [main.py](https://raw.githubusercontent.com/mhewedy/rmq-msg-parser/master/main.py) into main.py\n    ```shell\n    vim main.py\n    ```\n   then paste the code from the link above\n5. run the main.py file\n   ```shell\n   python main.py\n   ```\n\n## Usage:\n\n1. list all messages:\n\n```python\nfrom rmqparser import messages\n\nprint('list all messages:')\nmsgs = messages.get_messages(r'data/my_rabbitmq_messages.txt')\nfor msg in msgs:\n    print(f\"message id: {msg.id}, payload: {msg.payload}\")\n```\n\n2. filter by messages that has header contains \"error\":\n\n```python\nfrom rmqparser import messages\n\nprint('\\nfilter by messages that has header contains \"error\":')\nmsgs = messages.get_messages(r'data/my_rabbitmq_messages.txt', header_key_pattern='error')\nfor msg in msgs:\n    print(f\"message id: {msg.id}, payload: {msg.payload}, filtered_headers: {msg.filtered_headers}\")\n```\n\n3. group messages that has header contains \"exception\":\n\n```python\nfrom rmqparser import messages\n\nprint('\\ngroup messages that has header contains \"exception\":')\ngrouped_messages = messages.group_by_filtered_headers(r'data/my_rabbitmq_messages.txt', header_key_pattern='exception')\nfor key, value in grouped_messages.items():\n    print(\"Header:\", key)\n    for msg in value:\n        print(f\"message id: {msg.id}, payload: {msg.payload}, filtered_headers: {msg.filtered_headers}\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhewedy%2Frmq-msg-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhewedy%2Frmq-msg-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhewedy%2Frmq-msg-parser/lists"}