'Google Pub Sub/Lite vs RabbitMQ

I would like to confront my understanding of google pubSub/lite vs RabbitMQ (using MQTT over WSS).

My use case is that I need something like a topic exchange. To send messages individually or to all or to some.

Having RabbitMQ I understand that I can create a topic have multiple queues linked via routingKey. E.g. amqTopic.routingKey1-10. And I can push a message to a specific queue e.g. like this amqTopic.routingKey8 or push to the entire topic(all queues routed) like this amqTopic.*

Is it possible to create topic exchange structure with Google PubSub and if so how? I am not sure if I miss something. But from what I read I am inclined to say no, because google works like a direct exchange.

Thank you for helping..



Solution 1:[1]

This kind of topic exchange structure is possible to re-create using Cloud Pub/Sub filters. You can attach attributes to your messages when they are published (e.g. "routingKey": "8" or "routingKey": "all") and configure filters on your subscriptions to receive only messages meant for a particular routing key (attributes.routingKey="8" OR attributes.routingKey="all" in this scenario).

It's not currently possible to create this kind of topic exchange structure in Pub/Sub Lite.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Lauren