{"id":18278198,"url":"https://github.com/log4js-node/rabbitmq","last_synced_at":"2025-04-05T04:31:05.037Z","repository":{"id":33116321,"uuid":"137688717","full_name":"log4js-node/rabbitmq","owner":"log4js-node","description":"RabbitMQ appender for log4js-node","archived":false,"fork":false,"pushed_at":"2023-10-21T01:38:10.000Z","size":545,"stargazers_count":7,"open_issues_count":5,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-25T18:01:13.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/log4js-node.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-06-17T21:37:39.000Z","updated_at":"2024-06-19T09:57:10.377Z","dependencies_parsed_at":"2024-06-19T10:09:03.483Z","dependency_job_id":null,"html_url":"https://github.com/log4js-node/rabbitmq","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/log4js-node%2Frabbitmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/log4js-node%2Frabbitmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/log4js-node%2Frabbitmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/log4js-node%2Frabbitmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/log4js-node","download_url":"https://codeload.github.com/log4js-node/rabbitmq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289382,"owners_count":20914463,"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":[],"created_at":"2024-11-05T12:23:27.003Z","updated_at":"2025-04-05T04:31:00.011Z","avatar_url":"https://github.com/log4js-node.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RabbitMQ Appender for Log4JS\n\nPush log events to a [Rabbitmq](https://www.rabbitmq.com/) MQ. Require [log4js-node](https://github.com/log4js-node/log4js-node) 2.x or later.\n\n```bash\nnpm install @log4js-node/rabbitmq\n```\n\nIf you want to be sure that all messages have been sent before your programme exits, remember to call `log4js.shutdown(\u003ccallback function\u003e)`.\n\n## Configuration\n\n* `type` - `@log4js-ndoe/rabbitmq`\n* `host` - `string` (optional, defaults to `127.0.0.1`) - the location of the rabbitmq server\n* `port` - `integer` (optional, defaults to `5672`) - the port the rabbitmq server is listening on\n* `username` - `string` (optional, defaults to `guest`) - username to use when authenticating connection to rabbitmq\n* `password` - `string` (optional, defaults to `guest`) - password to use when authenticating connection to rabbitmq\n* `routing_key` - `string` (optional, defaults to `logstash`) - rabbitmq message's routing_key\n* `durable` - `string` (optional, defaults to false) - will that RabbitMQ lose our queue.\n* `exchange` - `string` (optional, defaults to `log`)- rabbitmq send message's exchange\n* `mq_type` - `string` (optional, defaults to `direct`) - rabbitmq message's mq_type\n* `vhost` - `string` (optional, defaults to `/`) - vhost to use\n* `layout` - `object` (optional, defaults to `messagePassThroughLayout`) - the layout to use for log events (see [layouts](layouts.md)).\n* `shutdownTimeout` - `integer` (optional, defaults to `10000`) - maximum time in milliseconds to wait for messages to be sent during log4js shutdown.\n\nThe appender will use the RabbitMQ Routing model command to send the log event messages to the channel.\n\n## Example\n\n```javascript\nlog4js.configure({\n  appenders: {\n    mq: {\n      type: '@log4js-node/rabbitmq',\n      host: '127.0.0.1',\n      port: 5672,\n      username: 'guest',\n      password: 'guest',\n      routing_key: 'logstash',\n      exchange: 'exchange_logs',\n      mq_type: 'direct',\n      durable: true\n    }\n  },\n  categories: { default: { appenders: ['mq'], level: 'info' } }\n});\n```\n\nThis configuration will push log messages to the rabbitmq on `127.0.0.1:5672`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flog4js-node%2Frabbitmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flog4js-node%2Frabbitmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flog4js-node%2Frabbitmq/lists"}