Skip to content

Conversation

@jusemon
Copy link

@jusemon jusemon commented Oct 16, 2025

Add Pub/Sub Emulator Support

Implements support for the Google Cloud Pub/Sub emulator based on feedback from #381. This PR addresses the feature request in #290 with a cleaner boolean configuration approach.

Changes

  • Added cps.useEmulator config (defaults to false)
  • Respects PUBSUB_EMULATOR_HOST environment variable
  • Falls back to cps.endpoint if env var not set
  • Uses proper emulator connection setup (no credentials, plaintext)
  • Updated README documentation
  • Added unit tests

Usage

cps.useEmulator=true
cps.endpoint=localhost:8085  # optional

All tests pass (81 tests, 0 failures). Fixes #290 ☕️

@jusemon jusemon requested review from a team as code owners October 16, 2025 04:46
@google-cla
Copy link

google-cla bot commented Oct 16, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Oct 16, 2025
Introduced a new configuration option cps.useEmulator to allow users to switch between the production service and the Pub/Sub emulator. Updated the README to document this feature and modified the relevant classes to handle the emulator endpoint based on the configuration. Added a test to verify the emulator configuration is correctly defined and parsed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connector cps.endpoint config does not target emulator

1 participant