identify the consumer for GCP queue

28 views
Skip to first unread message

Peeyush Nema

unread,
Mar 10, 2021, 12:14:33 PM3/10/21
to Google Cloud Pub/Sub Discussions
Hi , 

We are publishing the message in a GCP queue which is being consumed by one Consumer. 
It was reported to us that the message was not received by Consumer after publishing upon some research we see messages are getting consumed as we publish but again consumer is not receiving it... Our fear is someone else got hold of the credentials and may be start subscribing to the messages from the queue. 

My question is , is there anyway to figure out the IP of the consumer  and how can this be avoided happening in future, can we give IP based access to GCP.

Thanks ,

Samar Amara

unread,
Mar 14, 2021, 12:38:15 PM3/14/21
to Google Cloud Pub/Sub Discussions

It seems to me you are reporting two issues here: 

1- Why the legitimate consumer is not getting the message 

2- How to avoid having illegitimate consumer in pubsub

For question 2,  This document describes the access control options available to you in Pub/Sub[1].

For question 1 it is hard to troubleshoot this without having the subscription id  and a code snippet, As Google groups are not the proper place to share those infos and troubleshoot a specific issue, I would advise you to report the issue here [2], when you do so,  you need to provide more detail  how do you see messages are getting consumed?



[1]:https://cloud.google.com/pubsub/docs/access-control

[2]https://cloud.google.com/support/docs/issue-trackers 

Kir Titievsky

unread,
Mar 15, 2021, 9:51:58 AM3/15/21
to Samar Amara, Google Cloud Pub/Sub Discussions
Peeyush, if you are concerned that you've lost credentials, one thing to try is to delete or deactivate existing keys for service and human accounts that have permissions to interact with Pub/Sub subscriptions.  You can then create new ones and try again. Is that an option that might work?  

But before you do that, it might be worthwhile to check the simpler things:
1. Are your publish requests actually succeeding?  You can confirm this by looking at Monitoring metrics for the topic -- see "Publish message operations" and break those down by code.
2. Is anyone actually consuming the messages?  Look at subscription metrics, and in particular "ack_message_count"  as well as "sent_message_count" .

k

--
You received this message because you are subscribed to the Google Groups "Google Cloud Pub/Sub Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-pubsub-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/f617a5d2-ff0a-4389-8e78-93e8065339ecn%40googlegroups.com.


--
Kir Titievsky | Product Manager | Google Cloud Pub/Sub 
Reply all
Reply to author
Forward
0 new messages