Skip to content

Provision Pub/Sub topics and subscriptions for local testing with firebase-tools

License

Notifications You must be signed in to change notification settings

JonnyOrman/pubsub-provisioner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pubsub-provisioner

A simple program for provisioning Pub/Sub topics and subscriptions for the firebase-tools emulator for local testing.

How to use

See a working example of how to use it here.

In a docker-compose file with a firebase-tools service, add another service that pulls the pubsub-provisioner docker image.

On your pubsub-provisioner service, set the PUBSUB_EMULATOR_HOST environment variable and pass the JSON config for your Pub/Sub in this format:

{
    "projectId": "pubsub-provisioner-example",
    "topics": [
        {
            "topicId": "my-topic",
            "subscriptions": [
                {
                    "type": "push",
                    "subscriptionId": "my-topic-subscription",
                    "ackDeadlineSeconds": 10,
                    "pushEndpoint": "http://my-push-endpoint:1234"
                }
            ]
        }
    ]
}

About

Provision Pub/Sub topics and subscriptions for local testing with firebase-tools

Resources

License

Stars

Watchers

Forks

Packages

No packages published