Assuming you’re getting a connection refused response from a request to the collector, then no, the pubsub topic shouldn’t make a difference - once the collector is set up, it should return a 200 response regardless of what exists downstream of it.
Apologies for the delay. Couldn’t find anything that caused the issue, so decided to start with a fresh project in GCP. Set everything up, sent my test request, and got the “ok” message that I needed.
Set up a subscription, and got the connection refused message. Removed the subscription, and now I’m still getting the connection refused message.
That’s a bit puzzling. Did you change anything in the collector configuration, or its configuration when you set up the topic?
Connection refused suggests to me that a good place to start is actually the firewall settings. Note that each individual rule on GCP can be for ingress or egress, not both. Also note that the default is to deny everything. So if you have changed something in the process of setting up PubSub, perhaps you have accidentally reverted back to the default deny all rule.
In case it helps pin down the issue - the collector should have an endpoint that is publicly open to the web (in a production setup this endpoint might actually not be in the collector but the load balancer, but we can ignore that for now). So the public endpoint should have at least an ingress rule of ‘allow all traffic’ (0.0.0.0/0). When you set up an output to Pub/Sub, it should separately have an egress rule that allows output just to that topic.
So, I would probably start by looking into what has changed in the collector configuration and any rules associated with it. If you’re still stumped, maybe remove all rules, and attach only a new one that allows all traffic, and see if you can get a response.
I hope that helps you debug!