{"id":19442228,"url":"https://github.com/ackeecz/fuqu","last_synced_at":"2025-04-25T00:31:37.399Z","repository":{"id":40425459,"uuid":"158354311","full_name":"AckeeCZ/fuqu","owner":"AckeeCZ","description":"Fuqu is tiny package for node backend development which is used for manipulating with queues.","archived":false,"fork":false,"pushed_at":"2024-08-06T12:20:52.000Z","size":176,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-06T14:17:46.951Z","etag":null,"topics":["ackee","backend","node","nodejs","queue"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AckeeCZ.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-11-20T08:18:29.000Z","updated_at":"2024-06-03T06:49:30.000Z","dependencies_parsed_at":"2024-05-10T11:48:10.200Z","dependency_job_id":"a7a24739-7fdc-49ef-978a-222a5afa557c","html_url":"https://github.com/AckeeCZ/fuqu","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Ffuqu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Ffuqu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Ffuqu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Ffuqu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AckeeCZ","download_url":"https://codeload.github.com/AckeeCZ/fuqu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223974530,"owners_count":17234672,"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":["ackee","backend","node","nodejs","queue"],"created_at":"2024-11-10T15:38:44.226Z","updated_at":"2025-04-25T00:31:37.384Z","avatar_url":"https://github.com/AckeeCZ.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deprecation Notice\n\n## Status: Deprecated ⚠️\n\nThis package is now deprecated and will no longer receive updates. We recommend migrating to official solutions for your pub/sub and messaging needs.\n\n### Why are we deprecating?\n\nAfter careful consideration, we've decided to deprecate `fuqu` because:\n\n1. Modern official pub/sub libraries and messaging solutions now provide excellent native functionality\n2. Maintaining an abstraction layer over these services adds unnecessary complexity to codebases\n3. Direct usage of official SDKs offers better type safety, up-to-date features, and comprehensive documentation\n\n### Recommended Alternatives\n\nWe recommend migrating to official solutions based on your specific needs:\n\n- Google Cloud Pub/Sub: [Official Client Libraries](https://cloud.google.com/pubsub/docs/reference/libraries)\n- AWS SNS/SQS: [AWS SDK](https://aws.amazon.com/sdk-for-javascript/)\n- Azure Service Bus: [Azure SDK](https://learn.microsoft.com/en-us/javascript/api/overview/azure/service-bus)\n\n### Thank You\n\nWe want to thank all contributors and users who have supported this package. While `fuqu` served its purpose during its active period, we believe pointing users toward official solutions will provide a better developer experience in the long run.\n\n### Support\n\nThis repository will remain available for reference, but we encourage all users to migrate to the recommended alternatives. No new features or bug fixes will be implemented.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n\n\u003cimg src=\"./resources/logo.png\" height=\"170\"/\u003e\n\n\n# FuQu _[/fʌkjuː/](https://en.wikipedia.org/wiki/Help:IPA/English)_\n\nRude MQ wrapper that handles logging and message acknowlidgement for you\n\n[![Build Status](https://img.shields.io/travis/AckeeCZ/fuqu.svg?style=flat-square)](https://travis-ci.org/AckeeCZ/fuqu)\n[![Known Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/AckeeCZ/fuqu.svg?style=flat-square)](https://snyk.io/test/github/AckeeCZ/fuqu)\n[![Coverage](https://img.shields.io/coveralls/github/AckeeCZ/fuqu?style=flat-square)](https://coveralls.io/github/AckeeCZ/fuqu)\n[![Npm](https://img.shields.io/npm/v/fuqu.svg?style=flat-square)](https://www.npmjs.com/package/fuqu)\n[![License](https://img.shields.io/github/license/AckeeCZ/fuqu.svg?style=flat-square)](https://github.com/AckeeCZ/fuqu/blob/master/LICENSE)\n\n\n\u003c/div\u003e\n\n- 📨 Extensive predictable logging\n- ☔ Covered with integration tests\n- 🐇 Supports Google Pub/Sub and RabbitMQ\n- 🤡 Mock implementation for your tests\n- 💙 Typesafe message and attributes\n- 🚦 Automatic message acknowlidgement\n- 💓 Check heartbeat if connection is alive\n- ⛔ Configurable consumer flow control\n- 🐛 Debuggable with `DEBUG:*`\n\n## Getting started\n\n```bash\nnpm install fuqu\n```\n\n```typescript\n// Create instance\nconst fuQu = fuQuRabbit\u003c{ hello: string }\u003e(connection, 'my-queue');\n// Subscribe handler\nfuQu.subscribe(msg =\u003e {\n    console.log('Got this:', msg);\n});\n// Publish message\nfuQu.publish({ hello: 'FuQu!' });\n```\n\n- Handler may be async\n- Messages are automatically acknowledged. If there is an error, they are `nack`ed instead.\n\n### Create instance\n```typescript\nimport { connect } from 'amqplib';\nimport { PubSub } from '@google-cloud/pubsub';\nimport { fuQuPubSub, fuQuRabbit } from 'fuqu';\n\n// RabbitMQ\nconst connection = await connect('amqp://localhost');\nconst fuQu1 = fuQuRabbit(connection, 'my-queue');\n\n// Pub/Sub\nconst pubSub = new PubSub({/*...*/})\nconst fuQu1 = fuQuPubSub(pubSub, 'my-queue');\n```\n\n### Options\n```typescript\nconst fuQu = fuQuRabbit(connection, 'my-queue', {\n    // Throttle your consumers\n    maxMessages: 1,\n    // Log all events (typesafe, check for shapes!)\n    eventLogger: event =\u003e {\n        if (event.action !== 'hc') {\n            console.log(`FuQu [${event.topicName}] (${event.action})`, event)\n        }\n    },\n    // Mock with in-memory mock for your tests\n    useMock: process.env.NODE_ENV === 'test',\n    // Adapter specific options\n    assertQueueOptions: {/* ... */}\n});\n```\n - Mock implements all general FuQu options. Accessing underlying message is unsafe and adapter specific options are ignored\n - `eventLogger` is for application logging, if no handler is passed, logging is disabled\n - For debug purposes, you can also enable logging via `DEBUG:*`, `DEBUG:fuqu:*` or `DEBUG:fuqu:my-topic:*`\n - `maxMessages` is transformed into specific options for each adapter, using custom adapter options might overwrite the behavior\n\n### Rude mode\nIf you want to have optimal FuQu expirience, use imports from `fuqu/dist/real`.\n\n## Testing\n\nFor running tests, start the following containers 🐳\n\n```\ndocker-compose up --build\n```\n\n## License\n\nThis project is licensed under [MIT](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fackeecz%2Ffuqu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fackeecz%2Ffuqu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fackeecz%2Ffuqu/lists"}