How can I send and receive messages in those two cases?
We are migrating our app from appengine to kubernetes. We have two microservices distributed in this way:
Development environment
Problem is that Service 1 keeps sending pubsub messages to service 2 on AppEngine. It should send pubsub messages to service 2 running on Kubernetes
Production environment
In production environment, nowadays service 1 and 2 communicate via pubsub. Which (and in what order) is the best way to start migrating both services in production environment to Kubernetes pods?
I was thinking about moving both service 1 and 2 at the same time to Kubernetes and start using http rest to send and receives message between them (that would mean stop using Google PubSub) but I am not sure. Another problem I see is that Push endpoints require https and my external ip from my kubernetes service is http
The solution was:
1) To change pubsub subscription to pull type
2) Create service account credentials
3) Adapted service code (now running in Kubernetes) so that it actually pulls pubsub messages
PubSub messages are sent to a topic. Every listener to that topic (E.g. both GAE service 2 and k8s service 2) will receive the messages sent.
If you want to differentiate the messages based on the origin (GAE and k8s) the easiest way to create another topic. And only configure this new topic in the k8s services.
However, I don't see which could be the issue of sharing the pubsub topic if the services do the same.