Currently there's a limit of about 100 topics when calling Kane.Topic.all function, as the pubsub API paginates the results. There are several ways of removing this 100 topic limit, but the easiest one is, by default, traversing the next pages.
When listing topics, we get a map of the following kind:
%{
"topics" => list(%Kane.Topic{}),
"nextPageToken" => str
}
We can GET projects/#{project}/topics?pageToken=#{page_token} to get the next page. If we use this recursively we can get all of the tokens until the map no longer has the nextPageToken present and we conclude that's the last page.
Currently there's a limit of about 100 topics when calling
Kane.Topic.allfunction, as the pubsub API paginates the results. There are several ways of removing this 100 topic limit, but the easiest one is, by default, traversing the next pages.When listing topics, we get a map of the following kind:
We can
GET projects/#{project}/topics?pageToken=#{page_token}to get the next page. If we use this recursively we can get all of the tokens until the map no longer has thenextPageTokenpresent and we conclude that's the last page.