We are currently evaluating our options on google cloud platform for a solution that works this way. We are expecting a lot of messages from our application and we intend to queue these transactions using google cloud pub/ sub. Now a typical message can have multiple JSON objects in it like this :
{
groupId: "3003030330",
groupTitle: "Multiple Payments Processing",
transactions: [
{id: "3030303" , amount: "2000" , to: "XXXX-XXX"},
{id: "3030304" , amount: "5000" , to: "XXXX-XXX"},
{id: "3030304" , amount: "5000" , to: "XXXX-XXX"},
]
}
Now we need to pass each of these transactions to our payment gateway synchronously and in parallel using google cloud dataflow then collate the responses into a different PCollection and write it to another pub / sub topic . My confusion is if Google Cloud Dataflow is the most efficient and scalable solution to this problem or using the Kubernetes HorizontalPodAutoScaler to scale based on the messages in the pub/sub queue. Any ideas and thoughts would be appreciated.