ALPHA Release - v7 - Complete refactoring #615
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Release v7 - Alpha
Do not merge this on the master branch. Create an
alpha
git branch so it can create a pre-releaseDescription
This alpha release contains huge breaking changes!
BREAKING CHANGES
PubSubFactory.create
method options have changed and do not rely on Google typeslisten
andemit
methods have been replaced bypublish
andsubscribe
Other changes:
Motivation and Context
The @algoan/pubsub has been created to be cloud agnostic. This factory's goal is to switch from one cloud to another with a simple parameter change.
However, this library became more and more specific to Google Cloud Pub/Sub, and it is now difficult to add more transports. Thus, I wanted to rewrite the lib, even though it is highly inspired by
@google-cloud/pubsub
package,. I also want it easy to use.This alpha release is not finished. There are still missing features that I want to tackle:
getNativeClient()
or thegetOriginalMessage()
methods to return Google typesI've changed the test framework because the latest version of ava does not force exit child processes, and tests couldn't end properly. Thanks to the
detectOpenHandles
option of jest, I've discovered that this was due to the subscription connection with the emulator. Indeed, HTTP2 connections were still open, I just needed to close server connections.Types of changes