# Listen to multiple topics for google-pub sub plugin Logstash

**URL:** <https://discuss.elastic.co/t/listen-to-multiple-topics-for-google-pub-sub-plugin-logstash/261894>\
**Category:** Logstash\
**Created:** [January 22, 2021, 9:51am UTC](https://discuss.elastic.co/t/listen-to-multiple-topics-for-google-pub-sub-plugin-logstash/261894 "2021-01-22T09:51:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![curiousmind](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/curiousmind/32/69452_2.png) [@curiousmind](https://discuss.elastic.co/u/curiousmind)\
**Post date:** [January 22, 2021, 9:51am UTC](https://discuss.elastic.co/t/listen-to-multiple-topics-for-google-pub-sub-plugin-logstash/261894/1 "2021-01-22T09:51:41Z")

</div>

My current configuration is like below:

```auto
  google_pubsub {
    project_id => "svg-nsg-log-51mx7"
    topic => "audit_logs"
    subscription => "logstash-sub-audit_logs"
    include_metadata => true
    codec => "json"
    json_key_file => "/tmp/keyfile.json"
    type => "google-pubsub-test"
  }

```

I have multiple topics, can I just change the configuration like `topic => ["audit_logs","system_logs"]` etc to get the logs from multiple topics (just as in Kafka configuration).  
Else, I need to keep repeating the above with changing topic names in the input configuration?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 19, 2021, 9:51am UTC](https://discuss.elastic.co/t/listen-to-multiple-topics-for-google-pub-sub-plugin-logstash/261894/2 "2021-02-19T09:51:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
