title: How to implement the "locked" feature in AWS/SQS when using Google Cloud Pub/Sub?
body: <p>When you want to implement a producer/consumer pattern on top of Google Cloud Pub/Sub, you would expect each message can only be processed by one consumer. But Google Cloud Pub/Sub would send each message to all the subscribers.</p>
  
  <p>But the AWS/SQS has the following feature to easy guarantee this:</p>
  
  <blockquote>
    <p>When a message is received, it becomes “locked” while being processed.
    This keeps other computers from processing the message simultaneously.
    If the message processing fails, the lock will expire and the message
    will be available again. In the case where the application needs more
    time for processing, the “lock” timeout can be changed dynamically via
    the ChangeMessageVisibility operation.</p>
  </blockquote>
  
  <p>How to implement the producer/consumer pattern on top of Google Cloud Pub/Sub? Or there is other alternative Google Cloud product?</p>