I am working on implementing event driven using GCP Pub/Sub.
I have a topic called orders, and that topic will have a subscription named orderPlacedSubscription
I have two services that want to listen to all messages for this subscription and perform different actions,
so I have paymentService and notificationService, the paymentService will listen to each message filtered by orderPlacedSubscription
and process the payment as well as the notification service will listen to the same message and send a notification.
Yes, a subscription can have multiple subscriber clients.
In a subscription workflow, if a message is not acknowledged by a subscriber, Pub/Sub will attempt to redeliver the outstanding message. In the process of redelivering the outstanding message, Pub/Sub holds back and tries not to deliver the outstanding message to any other subscriber on the same subscription. Once the outstanding message is acknowledged it can be delivered to other subscribers.
You can refer subscription workflow and this documentation for more information.