Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difference between topic/send_message_operation_count and topic/send_request_count in google pubsub

What is the difference between topic/send_message_operation_count and topic/send_request_count in google pubsub.

The requirement is though i can calculate no.of messages present in subscriber by undeliver_messages but I need to calculate how many messages are pushed to the topic.

Thanks, Santosh

like image 270
santosh.a Avatar asked Oct 25 '17 15:10

santosh.a


1 Answers

The docs for topic/send_message_operation_count say:

Cumulative count of publish message operations, grouped by result.

The docs for topic/send_request_count say:

Cumulative count of publish requests, grouped by result.

Pub/Sub allows multiple messages to be batched in a single API request. send_request_count is the number of publish API calls, while send_message_operation_count is the number of actual messages in those calls.

So if on average each request sends 10 messages, send_message_operation_count will be 10x send_request_count. If you publish one message per API call, they will be the same.

like image 127
David Avatar answered Oct 29 '22 09:10

David