{"_id":"@anyq/google-pubsub","_rev":"7-19310054880d3ebd7ffdd4327525a58d","name":"@anyq/google-pubsub","dist-tags":{"latest":"0.5.0"},"versions":{"0.1.0":{"name":"@anyq/google-pubsub","version":"0.1.0","keywords":["anyq","queue","google","pubsub","gcp","message-queue"],"author":{"name":"Shantanu Sharma"},"license":"MIT","_id":"@anyq/google-pubsub@0.1.0","maintainers":[{"name":"sns45","email":"notifyshantanu@gmail.com"}],"homepage":"https://github.com/sns45/anyq#readme","bugs":{"url":"https://github.com/sns45/anyq/issues"},"dist":{"shasum":"5888c3c4671a78f0ee76c78981ecc5d9d313c48a","tarball":"https://registry.npmjs.org/@anyq/google-pubsub/-/google-pubsub-0.1.0.tgz","fileCount":17,"integrity":"sha512-ztThlk+vQr1BqfrsqTPrlpjQDSLU3Gk6ytgqMMrj9yKOF6R87mkEZJ8lCEWry+eEkn2bjouIvJ9dC9cX9Qre4g==","signatures":[{"sig":"MEUCIQDNXc02MXwFe3Pwj/tT2Tupv8H1g10ArE03JaXYySYhKQIgcFyI5DxapJ1rVQiBMlWbCh9amME9YhmwcJrT/GusqYM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47999},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"1210b51fe4a55144ebf5bc798db0732b4c89ddba","scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"sns45","email":"notifyshantanu@gmail.com"},"repository":{"url":"git+https://github.com/sns45/anyq.git","type":"git","directory":"packages/google-pubsub"},"_npmVersion":"10.9.2","description":"Google Cloud Pub/Sub adapter for anyq","directories":{},"_nodeVersion":"22.17.0","dependencies":{"@anyq/core":"workspace:*","@google-cloud/pubsub":"^4.7.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3"},"peerDependencies":{"@anyq/core":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/google-pubsub_0.1.0_1765990963957_0.356080466375271","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@anyq/google-pubsub","version":"0.1.1","keywords":["anyq","queue","google","pubsub","gcp","message-queue"],"author":{"name":"Shantanu Sharma"},"license":"MIT","_id":"@anyq/google-pubsub@0.1.1","maintainers":[{"name":"sns45","email":"notifyshantanu@gmail.com"}],"homepage":"https://github.com/sns45/anyq#readme","bugs":{"url":"https://github.com/sns45/anyq/issues"},"dist":{"shasum":"99261c8dbf5c948c817a1f95b53ee9368c63ff77","tarball":"https://registry.npmjs.org/@anyq/google-pubsub/-/google-pubsub-0.1.1.tgz","fileCount":18,"integrity":"sha512-K/2UgDjJM4+1tfZHmitEhfAbuQozShtVgdbilFNKN+pOKbzwxFR42ASLqWBrKdC1uZ5laO3n0Yc624c34ldtZg==","signatures":[{"sig":"MEYCIQDNpQ1xaSsrnIEYOLgfjOLkVXdOOougyThxiHFRa0bKWwIhAL/OBURCBaa5bQy5qelpXZG/xLs+rx53EgkWN/8CJnXg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50137},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"30128d564178a5a1d25b736b605bf69644178a0f","scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"sns45","email":"notifyshantanu@gmail.com"},"repository":{"url":"git+https://github.com/sns45/anyq.git","type":"git","directory":"packages/google-pubsub"},"_npmVersion":"10.9.2","description":"Google Cloud Pub/Sub adapter for anyq","directories":{},"_nodeVersion":"22.17.0","dependencies":{"@anyq/core":"workspace:*","@google-cloud/pubsub":"^4.7.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3"},"peerDependencies":{"@anyq/core":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/google-pubsub_0.1.1_1765991362095_0.06389670808041337","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@anyq/google-pubsub","version":"0.3.0","keywords":["anyq","queue","google","pubsub","gcp","message-queue"],"author":"Shantanu Sharma","license":"MIT","_id":"@anyq/google-pubsub@0.3.0","maintainers":[{"name":"sns45","email":"notifyshantanu@gmail.com"}],"homepage":"https://github.com/sns45/anyq#readme","bugs":{"url":"https://github.com/sns45/anyq/issues"},"dist":{"shasum":"2f179914c8a9abee035bad8b63bb1ea8e0f58cc0","tarball":"https://registry.npmjs.org/@anyq/google-pubsub/-/google-pubsub-0.3.0.tgz","fileCount":18,"integrity":"sha512-NmSIkp8bjftaeY9xeYk0TbKxnmf5CMfPyGWBVTBzxXfgF6hZvoDb+evo7vJQdb13rskXSt7y29hKmGm/0OW2OQ==","signatures":[{"sig":"MEQCIBOFCaSCYnmwO5cHtBcT9GTft8x/7esscfx2OAh9MdMKAiAk7c9Jc9fx7W+iUNNVQCuRgYIP+hkycc3wFj5SEJm6KQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":52834},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"2f179914c8a9abee035bad8b63bb1ea8e0f58cc0","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"bun build ./src/index.ts --outdir ./dist --target bun --watch","build":"bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types","clean":"rm -rf dist","typecheck":"tsc --noEmit","build:types":"tsc --build --force"},"_npmUser":{"name":"sns45","email":"notifyshantanu@gmail.com"},"_integrity":"sha512-NmSIkp8bjftaeY9xeYk0TbKxnmf5CMfPyGWBVTBzxXfgF6hZvoDb+evo7vJQdb13rskXSt7y29hKmGm/0OW2OQ==","repository":{"url":"https://github.com/sns45/anyq","type":"git","directory":"packages/google-pubsub"},"_npmVersion":"10.8.3","description":"Google Cloud Pub/Sub adapter for anyq","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@anyq/core":"0.3.0","@google-cloud/pubsub":"^4.7.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3"},"peerDependencies":{"@anyq/core":"0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/google-pubsub_0.3.0_1781961977418_0.4045893780737615","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@anyq/google-pubsub","version":"0.3.1","keywords":["anyq","queue","google","pubsub","gcp","message-queue"],"author":"Shantanu Sharma","license":"MIT","_id":"@anyq/google-pubsub@0.3.1","maintainers":[{"name":"sns45","email":"notifyshantanu@gmail.com"}],"homepage":"https://github.com/sns45/anyq#readme","bugs":{"url":"https://github.com/sns45/anyq/issues"},"dist":{"shasum":"5cb98d311db80e7da23052a8464870a6c9db1139","tarball":"https://registry.npmjs.org/@anyq/google-pubsub/-/google-pubsub-0.3.1.tgz","fileCount":18,"integrity":"sha512-ZIrv+i1dIcCjlwm1wFBm5XabLOdnT0TWOzy/Si2cR8YAYSK3jTC4LVOHdmCkmT+IxEDEG6FD5HBvaifCYr//AA==","signatures":[{"sig":"MEUCIQDtSDPejYcPn3j8r6i4AX9slkoYY0iCZEyYqSqyFENXsAIgfiyUpe1OEqMB9kVOAl3fwYOASnV+nR3GFv1TwYXykdc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53442},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"5cb98d311db80e7da23052a8464870a6c9db1139","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"bun build ./src/index.ts --outdir ./dist --target bun --watch","build":"bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types","clean":"rm -rf dist","typecheck":"tsc --noEmit","build:types":"tsc --build --force"},"_npmUser":{"name":"sns45","email":"notifyshantanu@gmail.com"},"_integrity":"sha512-ZIrv+i1dIcCjlwm1wFBm5XabLOdnT0TWOzy/Si2cR8YAYSK3jTC4LVOHdmCkmT+IxEDEG6FD5HBvaifCYr//AA==","repository":{"url":"https://github.com/sns45/anyq","type":"git","directory":"packages/google-pubsub"},"_npmVersion":"10.8.3","description":"Google Cloud Pub/Sub adapter for anyq","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@anyq/core":"0.3.0","@google-cloud/pubsub":"^4.7.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3"},"peerDependencies":{"@anyq/core":"0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/google-pubsub_0.3.1_1782054601198_0.49426348933529685","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@anyq/google-pubsub","version":"0.3.2","keywords":["anyq","queue","google","pubsub","gcp","message-queue"],"author":"Shantanu Sharma","license":"MIT","_id":"@anyq/google-pubsub@0.3.2","maintainers":[{"name":"sns45","email":"notifyshantanu@gmail.com"}],"homepage":"https://github.com/sns45/anyq#readme","bugs":{"url":"https://github.com/sns45/anyq/issues"},"dist":{"shasum":"f112c066dba95abde36a787c9d76df5988fc0679","tarball":"https://registry.npmjs.org/@anyq/google-pubsub/-/google-pubsub-0.3.2.tgz","fileCount":18,"integrity":"sha512-Yw3yAUjVWYMZmUa4Pa/wLRxE8TZIm0s3+p0t65ecA+uEp09RZHpIeSSxn+sQnAt30LnT6KAE2Kyl9Se4Okfmkg==","signatures":[{"sig":"MEYCIQDzUycuxPQI95FX91U2+ZF5gTUUjGsVq1PKho6F2zxQbwIhAPkFXDF2CkLrNecu8mWSp/IE8N7rw0a5xYVFcUI1w/NT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53442},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"f112c066dba95abde36a787c9d76df5988fc0679","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"bun build ./src/index.ts --outdir ./dist --target bun --watch","build":"bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types","clean":"rm -rf dist","typecheck":"tsc --noEmit","build:types":"tsc --build --force"},"_npmUser":{"name":"sns45","email":"notifyshantanu@gmail.com"},"_integrity":"sha512-Yw3yAUjVWYMZmUa4Pa/wLRxE8TZIm0s3+p0t65ecA+uEp09RZHpIeSSxn+sQnAt30LnT6KAE2Kyl9Se4Okfmkg==","repository":{"url":"https://github.com/sns45/anyq","type":"git","directory":"packages/google-pubsub"},"_npmVersion":"10.8.3","description":"Google Cloud Pub/Sub adapter for anyq","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@anyq/core":"0.3.2","@google-cloud/pubsub":"^4.7.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3"},"peerDependencies":{"@anyq/core":"0.3.2"},"_npmOperationalInternal":{"tmp":"tmp/google-pubsub_0.3.2_1784910268509_0.055258122264564724","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@anyq/google-pubsub","version":"0.4.0","keywords":["anyq","queue","google","pubsub","gcp","message-queue"],"author":"Shantanu Sharma","license":"Apache-2.0","_id":"@anyq/google-pubsub@0.4.0","maintainers":[{"name":"sns45","email":"notifyshantanu@gmail.com"}],"homepage":"https://github.com/sns45/anyq#readme","bugs":{"url":"https://github.com/sns45/anyq/issues"},"dist":{"shasum":"6428ba7d989d6ab8c66792beb535e70ca26eac47","tarball":"https://registry.npmjs.org/@anyq/google-pubsub/-/google-pubsub-0.4.0.tgz","fileCount":20,"integrity":"sha512-XJlYbNk3eXnXyOp4T/0gYpqeaTrkkYtFrVdG2MTrxT7yB2Ezq/z4TFNY59cUwhNDcx98W/v/IgLmLM9CqyOSOQ==","signatures":[{"sig":"MEUCIQDa0aZXyKNMBfe9gaJeC+rzpDJ9Tu+CNY/DkAMZgRiRtwIgTqKEr7sF9fTB2lvMLiuu6OjsvVyaevlMi2dgAk+uY5g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":65460},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"6428ba7d989d6ab8c66792beb535e70ca26eac47","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"bun build ./src/index.ts --outdir ./dist --target bun --watch","build":"bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types","clean":"rm -rf dist","typecheck":"tsc --noEmit","build:types":"tsc --build --force"},"_npmUser":{"name":"sns45","email":"notifyshantanu@gmail.com"},"_integrity":"sha512-XJlYbNk3eXnXyOp4T/0gYpqeaTrkkYtFrVdG2MTrxT7yB2Ezq/z4TFNY59cUwhNDcx98W/v/IgLmLM9CqyOSOQ==","repository":{"url":"https://github.com/sns45/anyq","type":"git","directory":"packages/google-pubsub"},"_npmVersion":"10.8.3","description":"Google Cloud Pub/Sub adapter for anyq","directories":{},"_nodeVersion":"26.3.0","dependencies":{"@anyq/core":"0.4.0","@google-cloud/pubsub":"^4.7.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3"},"peerDependencies":{"@anyq/core":"0.4.0"},"_npmOperationalInternal":{"tmp":"tmp/google-pubsub_0.4.0_1787860571772_0.5967149239590763","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@anyq/google-pubsub","version":"0.5.0","description":"Google Cloud Pub/Sub adapter for anyq","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"build":"bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types","build:types":"tsc --build --force","dev":"bun build ./src/index.ts --outdir ./dist --target bun --watch","typecheck":"tsc --noEmit","clean":"rm -rf dist"},"dependencies":{"@anyq/core":"0.5.0","@google-cloud/pubsub":"^4.7.2"},"devDependencies":{"typescript":"^5.3.3"},"peerDependencies":{"@anyq/core":"0.5.0"},"keywords":["anyq","queue","google","pubsub","gcp","message-queue"],"license":"Apache-2.0","author":"Shantanu Sharma","repository":{"type":"git","url":"https://github.com/sns45/anyq","directory":"packages/google-pubsub"},"homepage":"https://github.com/sns45/anyq#readme","bugs":{"url":"https://github.com/sns45/anyq/issues"},"publishConfig":{"access":"public"},"_id":"@anyq/google-pubsub@0.5.0","_integrity":"sha512-n2QIFsLyPw/06pmk3ipJE530Y0LVh5wZpPqIUNBRMB9FlLHMYXd0pJNWz5zTljcQBt3U/aBKlJ5x7GvMig/BHA==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"1918c2455031856dc6b7d12a04fdca6e3a787135","dist":{"integrity":"sha512-n2QIFsLyPw/06pmk3ipJE530Y0LVh5wZpPqIUNBRMB9FlLHMYXd0pJNWz5zTljcQBt3U/aBKlJ5x7GvMig/BHA==","shasum":"1918c2455031856dc6b7d12a04fdca6e3a787135","tarball":"https://registry.npmjs.org/@anyq/google-pubsub/-/google-pubsub-0.5.0.tgz","fileCount":20,"unpackedSize":65460,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICMzFgEvcQxKsvgnZKnEVpBpDKYuKcynR7TorSktOQfqAiBfKufdLrz3maO35yExnb7conz98YLLGsOn39Jbv9WR8A=="}]},"_npmUser":{"name":"sns45","email":"notifyshantanu@gmail.com"},"directories":{},"maintainers":[{"name":"sns45","email":"notifyshantanu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/google-pubsub_0.5.0_1788808996623_0.6517358828731847"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-17T17:02:43.877Z","modified":"2026-09-07T19:23:16.946Z","0.1.0":"2025-12-17T17:02:44.319Z","0.1.1":"2025-12-17T17:09:22.227Z","0.3.0":"2026-06-20T13:26:17.551Z","0.3.1":"2026-06-21T15:10:01.338Z","0.3.2":"2026-07-24T16:24:28.826Z","0.4.0":"2026-08-27T19:56:11.905Z","0.5.0":"2026-09-07T19:23:16.773Z"},"bugs":{"url":"https://github.com/sns45/anyq/issues"},"author":"Shantanu Sharma","license":"Apache-2.0","homepage":"https://github.com/sns45/anyq#readme","keywords":["anyq","queue","google","pubsub","gcp","message-queue"],"repository":{"type":"git","url":"https://github.com/sns45/anyq","directory":"packages/google-pubsub"},"description":"Google Cloud Pub/Sub adapter for anyq","maintainers":[{"name":"sns45","email":"notifyshantanu@gmail.com"}],"readme":"# @anyq/google-pubsub\n\nGoogle Cloud Pub/Sub adapter for **anyq** - global serverless messaging.\n\n## Installation\n\n```bash\nnpm install @anyq/google-pubsub @anyq/core @google-cloud/pubsub\n```\n\n## Usage\n\n```typescript\nimport { GooglePubSubProducer, GooglePubSubConsumer } from '@anyq/google-pubsub';\n\n// Create producer\nconst producer = new GooglePubSubProducer({\n  projectId: 'my-gcp-project',\n  topic: 'my-topic'\n});\n\n// Create consumer\nconst consumer = new GooglePubSubConsumer({\n  projectId: 'my-gcp-project',\n  subscription: 'my-subscription'\n});\n\nawait producer.connect();\nawait consumer.connect();\n\n// Subscribe to messages\nawait consumer.subscribe(async (message) => {\n  console.log('Received:', message.data);\n  console.log('Attributes:', message.headers);\n  await message.ack();\n});\n\n// Publish messages\nawait producer.publish({\n  event: 'file.uploaded',\n  filename: 'document.pdf'\n});\n\n// Publish with ordering key\nawait producer.publish(\n  { event: 'state.change' },\n  { orderingKey: 'entity-123' }\n);\n\n// Cleanup\nawait consumer.disconnect();\nawait producer.disconnect();\n```\n\n## Configuration\n\n```typescript\ninterface GooglePubSubConfig {\n  projectId: string;          // GCP project ID\n  topic?: string;             // Topic name (producer)\n  subscription?: string;      // Subscription name (consumer)\n  // Authentication (optional if using ADC)\n  keyFilename?: string;       // Path to service account key\n  credentials?: object;       // Inline credentials\n  // Consumer options\n  maxMessages?: number;       // Max concurrent messages\n  ackDeadline?: number;       // Ack deadline (seconds)\n  // Producer options\n  enableOrdering?: boolean;   // Enable message ordering\n  batching?: {\n    maxMessages: number;\n    maxMilliseconds: number;\n  };\n}\n```\n\n## Features\n\n- Global message delivery\n- Message ordering (by key)\n- Exactly-once delivery\n- Dead letter topics\n- Message filtering\n- Automatic batching\n\n## Authentication\n\nUses Google Cloud Application Default Credentials (ADC):\n- Set `GOOGLE_APPLICATION_CREDENTIALS` env var\n- Or provide `keyFilename` in config\n- Or use GCE/GKE default service account\n\n## Retry strategies (0.3.0)\n\nThis adapter participates in the opt-in pluggable retry strategies from `@anyq/core`. Pass a strategy via `BaseQueueConfig.strategy` and `GooglePubSubConsumer.applyStrategy()` takes over per-message error handling; omit it and the legacy catch behaviour (log; subscription redelivers based on its retry policy) runs unchanged.\n\n| Capability | Support |\n|---|---|\n| `supportsNativeDelay` | **false** (this release) |\n| `park` | downgrades to in-process retry with a `warn` log, capped by `maxAttempts`. The re-publish-with-delay implementation is a follow-up |\n| `deadLetterMessage` | default (`nack(false)`). Configure a `deadLetterPolicy` on the subscription if you want messages routed to a dedicated dead-letter topic |\n\n```typescript\nimport { retryThenDeadLetter } from '@anyq/core';\n\nconst consumer = new GooglePubSubConsumer({\n  projectId: 'my-project',\n  subscription: { name: 'orders-sub' },\n  strategy: retryThenDeadLetter({ maxAttempts: 5 }),\n});\n```\n\nSee `@anyq/core` for the full strategy catalogue.\n\n## License\n\nApache License 2.0. See [LICENSE](https://github.com/sns45/anyq/blob/main/LICENSE).\n","readmeFilename":"README.md"}