appengine standard env and flex env with pubsub#120
Conversation
|
Travis says: |
|
Wow - Thanks -- Could you put apache licenses on the source files please. If you could fix travis that would be great, but if you add the licenses, I can figure out travis. |
|
Hi Les. Alternatively I'm happy to hand over the repository (https://github.com/willedwards/google-pubsub-clientwrapper). I have added the licence files. Any advice most welcome. |
|
We've now pushed the wrapper to maven-central: com.google.cloud.samples shared-configuration If that's enough cool. You might wish to consider moving the sample to a new repo we just created and are in the process of populating. github.com/googlecloudplatform/spring-samples |
|
Hi Les Ok. I refactored the wrapper last night, so you've probably pulled that - which is good. Please let me know when the github.com/googlecloudplatform/spring-samples is ready for contribution as I can add both an appengine standard and appengine flex environment example that send to google pubsub. |
|
On another note : I'm a bit confused by the official documentation I saw because the sample code points at but, not to this repo. So which repo should I be using ? because each repo has a different set of core pubsub dependencies. |
|
I have just pushed the latest version of my code here. This version still uses my wrapper, but, only needs the projectId in two places (appengine-web.xml and application.properties). This code allows topics and subscriptions to be created without thinking about /project/projectId/topics/ etc. It just works under the covers as it is abstracted away. It also lists the topics and subscriptions via GET endpoints, but using the PubSub client under the covers, again, abstracted away. I also added some basic tests, but these need building out. Finally, as before, the register callback allows another endpoint to be triggered by the subscription push. I decided that using types gave certain advantages:
|
|
I'm going to need to check internally regarding using your wrapper as a key step. What we usually do if it has to happen is include the source in a THIRD_PARTY directory where appropriate, rather than how you've done it. (You can include a README of some kind pointing folks to your repository) It should have an Apache License. I also note, you haven't passed travis. |
|
I'm not sure what happened to this, but I'm going to close. |
Demo of async messaging from appengine, to gcloud pubsub, along with a callback url to be triggered after an event has been processed.
This contains code for both the standard and flex appengines, using gcloud pubub. I needed this, and it was missing, so I hope it's useful for others who want a template for async messaging and callbacks.