What is the best practise concerning the topic name using google-pubsub.
If I have theses events :
What is the best practise concerning topic names :
customer
topic and an article
topic containing each one the events of its domaindeleted
topic that will contains customer deleted
and article deleted
, etc ..customer:created
, customer:deleted
, etc ...Or an other ..
Kafka topic names are case-sensitive.
Naming conventions make sure users know how to name digital assets so that filenames or titles are consistent and contain all the right information. They help you store and organise your files. Without them, your asset library can become chaotic and make it much harder to find images when you need them.
topicName has changed. No translations currently exist.
The decision one would make on topics really depends on the use case. If your entire system architecture has a clear delineation across customer/article or across created/updated/deleted, then it could make sense to split the topics along those same lines. If not, then there may be less use in splitting into multiple topics.
One way to determine how to do the split could be to consider the type of each message. If you split across all these topics, would they all have the same type of message (maybe an "event" message) or are the message types going to be different? If they are different, then different topics may make sense.
Most interesting might be the behavior on the subscribe side. Will the same subscriber be interested in events for both customers and articles or are their different subscribers for each? What about create/delete/update? A split along these lines sounds less likely. If all subscribers are going to be interested in all messages, then a single topic is probably reasonable. Otherwise, a subscriber will have to receive messages from multiple subscriptions. If some subscribers are interested in a subset of messages, then separate topics (and therefore, separate subscriptions) could be beneficial. Otherwise, the subscribers will have to look at all messages and immediately ack the messages they are not interested in, since Google Cloud Pub/Sub does not support filtering at this time. If it is a mix, then it is a tradeoff between more complexity in the subscriber interested in all messages (using different topics) and complexity in the subscriber interested in a subset (using the same topic and having to filter).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With