{ "info": { "author": "Wayne Conrad", "author_email": "kf7qga@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "This is a Python library and utilities for saving and loading RabbitMQ\nmessages to and from disk.\n\nWhy?\n====\n\n- A program cannot publish a message to RabbitMQ, but does not want to\n lose the message. Using this library, the program can save the\n message to a file. Later, after fixing the problem, a person can use\n a utility in this package to publish the message.\n\n- The consumer has a bug and messages are piling up in a queue. You\n have fixed the bug and your tests seem to indicate the consumer will\n now work, but you want some insurance. Using a program in this\n package, you can back up the queue to a file. If the program\n processes the messages incorrectly, you can use use a program in this\n package to restore the queue from the file.\n\n- You want to edit messages in a queue. You can dump the queue to a\n file, use a text editor or a one-off program to change the file, and\n then write the messages back into the queue.\n\nWhy not?\n========\n\nThis library is brand new and has not been battle tested. Proceed with\ncaution.\n\nBackup format\n=============\n\nQueues are backed up and restored from text files containing json. Each\nline in the file is a JSON dictionary with this structure:\n\n::\n\n {\n \"body\": \"This is a test\",\n \"delivery_info\": {\n \"delivery_tag\": 1\n },\n \"properties\": {\n \"app_id\": null,\n \"cluster_id\": null,\n \"content_encoding\": null,\n \"content_type\": \"text/plain\",\n \"correlation_id\": null,\n \"delivery_mode\": 2,\n \"expiration\": null,\n \"headers\": {\n \"client_id\": null,\n \"host_ip\": \"10.0.0.15\",\n \"host_name\": \"treebeard\",\n \"library_id\": \"olio_msg (Python) 1.9.0\",\n \"metadata_version\": \"1.0.0\",\n \"program_name\": \"olio_msg_send_test_messages\",\n \"version\": \"1.0.0\"\n },\n \"message_id\": \"1df3eb23ffeb476b8355d87b475eb627\",\n \"priority\": null,\n \"reply_to\": null,\n \"timestamp\": 1434644774,\n \"type\": \"test\",\n \"user_id\": null\n }\n }\n\nThe line was shown pretty-printed, but it's actually just one line:\n\n::\n\n {\"body\": \"This is a test\", \"delivery_info\": {...}, \"properties: {...}}\n\nUsing the command-line utilities\n================================\n\nTo backup a queue\n\n::\n\n rabbit_droppings --host localhost --queue jobs \\\n --file /path/to/save/file --dump\n\nTo backup and purge a queue\n\n::\n\n rabbit_droppings --host localhost --queue jobs \\\n --file /path/to/save/file --purge\n\nTo restore a queue\n\n::\n\n rabbit_droppings --host localhost --queue jobs \\\n --file /path/to/save/file --restore\n\nSaving a message with the pika library\n======================================\n\nIf you have a program using the pika library to publish messages to a\nRabbitMQ server, here's how to save messages that could not be\npublished:\n\nFirst, import the library:\n\n::\n\n import rabbit_droppings\n\nIf you have a program that needs to save messages that cannot be\npublished using the pika library, it should create a\nrabbit\\_droppings.Writer (probably in the constructor):\n\n::\n\n file = open('/path/to/my/file', 'a')\n self._rd_writer = rabbit_droppings.Writer(file)\n\nWhen you publish a message and a pika exception occurs, save the\nmessage:\n\n::\n\n body = \"Message body\"\n properties = pika.spec.BasicProperties(\n content_type='text/plain'\n )\n try:\n channel.basic_publish(exchange='',\n routing_key='some_queue_name',\n properties=properties,\n body=body)\n except (pika.exceptions.AMQPError, pika.exceptions.ChannelError) as e:\n pika_message = rabbit_droppings.PikaMessage(body, properties=properties)\n self._rd_writer.write(pika_message)\n\nVersioning\n==========\n\nThis library practices `Semantic Versioning `_.\n\nThis library is currently in alpha; it's versions look like \"0.1.0\",\n\"0.2.0\", etc. There are no guarantees with alpha versions: Any version\nbump could be any combination of bug fix, backwards compatible API\nchange, or breaking API change.\n\nWhen the library becomes stable, its version number will be bumped to\n\"1.0.0\". Semantic versioning makes these promises for stable versions:\n\n- A patch-level version bump (e.g. \"1.0.0\" to \"1.0.1\") does not change\n the public API.\n\n- A minor-level version bump (e.g. \"1.0.0\" to \"1.1.0\") changes the\n public API in a backward-compatible manner.\n\n- A major-level version bump (e.g. \"1.0.0\" to \"2.0.0\") changes the\n public API in some way that is not backward compatible.\n\nPython version\n==============\n\nKnown to work with Python versions:\n\n- 2.6.9\n- 2.7.9\n\nDevelopment\n===========\n\nRunning the tests requires a RabbitMQ server installed locally. The\ntests are known to pass with these RabbitMQ versions:\n\n- 3.4.1\n\nTo run the tests:\n\n::\n\n ./setup.py test\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wconrad/rabbit_droppings", "keywords": "rabbit rabbitmq backup restore", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "rabbit_droppings", "package_url": "https://pypi.org/project/rabbit_droppings/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/rabbit_droppings/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/wconrad/rabbit_droppings" }, "release_url": "https://pypi.org/project/rabbit_droppings/0.4.0/", "requires_dist": null, "requires_python": null, "summary": "Backup/Restore RabbitMQ queues", "version": "0.4.0" }, "last_serial": 1665803, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "7b1be43dbb1fb896a0ca0dd1e3c202c1", "sha256": "ff66479df4fbb4eb89ad548f3641262e3cbaedfd293a721b330df244787c51a5" }, "downloads": -1, "filename": "rabbit_droppings-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7b1be43dbb1fb896a0ca0dd1e3c202c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8582, "upload_time": "2015-07-22T14:18:54", "url": "https://files.pythonhosted.org/packages/a0/59/5df05ea66178fbaa19a4dfa132573f7f9a9d64d64d881261e5a6157160e6/rabbit_droppings-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "25cf42aa058e724111ed5b99cb62d401", "sha256": "8c4a61a8b7cbc8b732f4c693d4135eb6de459b381bdeedda50974f4a8ef191e0" }, "downloads": -1, "filename": "rabbit_droppings-0.3.0.tar.gz", "has_sig": false, "md5_digest": "25cf42aa058e724111ed5b99cb62d401", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6788, "upload_time": "2015-07-22T17:39:43", "url": "https://files.pythonhosted.org/packages/73/75/4b118f69ffe3df5ad7ee9a991ed3f31b00755f5a6287526b04bd73116bab/rabbit_droppings-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "7f6cc174735cbc0ed672fb217a67f197", "sha256": "db3869a847ad2e3e0af0f794601d5b1d63a00af56b7fd068f766499cca8feb26" }, "downloads": -1, "filename": "rabbit_droppings-0.4.0.tar.gz", "has_sig": false, "md5_digest": "7f6cc174735cbc0ed672fb217a67f197", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6644, "upload_time": "2015-07-22T21:37:33", "url": "https://files.pythonhosted.org/packages/6f/76/74c7b5c0f87157b38b40708e0f1dd3e9b07d7ae991a36973d637f38440eb/rabbit_droppings-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7f6cc174735cbc0ed672fb217a67f197", "sha256": "db3869a847ad2e3e0af0f794601d5b1d63a00af56b7fd068f766499cca8feb26" }, "downloads": -1, "filename": "rabbit_droppings-0.4.0.tar.gz", "has_sig": false, "md5_digest": "7f6cc174735cbc0ed672fb217a67f197", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6644, "upload_time": "2015-07-22T21:37:33", "url": "https://files.pythonhosted.org/packages/6f/76/74c7b5c0f87157b38b40708e0f1dd3e9b07d7ae991a36973d637f38440eb/rabbit_droppings-0.4.0.tar.gz" } ] }