PubSub subscription with ack_deadline set causes HTTP 400
See original GitHub issuePage Name: pubsub-usage Release: 0.7.1
This appears to return an API error:
subscription = topic.subscription('subscription_name', ack_deadline=600)
Here is what I am seeing:
...
File "/home/greg.taylor/workspace/aclima/sig-cassandra-extractor/aclima/cass_extractor/queue.py", line 42, in run
self.subscription.create()
File "/home/greg.taylor/.virtualenvs/cas-e/lib/python3.4/site-packages/gcloud/pubsub/subscription.py", line 121, in create
client.connection.api_request(method='PUT', path=self.path, data=data)
File "/home/greg.taylor/.virtualenvs/cas-e/lib/python3.4/site-packages/gcloud/connection.py", line 419, in api_request
error_info=method + ' ' + url)
gcloud.exceptions.BadRequest: 400 Invalid JSON payload received. Unknown name "ack_deadline": Cannot find field. (PUT https://pubsub.googleapis.com/v1/projects/aclima-gsa/subscriptions/cassandra_extractor)
If I remove the ack_deadline kwarg, all is well. We definitely want the ack_deadline, thoguh.
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Error Codes | Cloud Pub/Sub Documentation
Error HTTP Code Description
UNAUTHENTICATED 401 The client is not authenticated properly.
UNAVAILABLE 503 The service was unable to process a request.
Read more >google cloud platform - PubSub acknowledge deadline
In general, accommodating more-than-once delivery requires your subscriber to be idempotent when processing messages. You can achieve exactly ...
Read more >Spring Cloud GCP
Publish and subscribe to Google Cloud Pub/Sub topics. Configure Spring JDBC with a few properties to use Google Cloud SQL.
Read more >Things I wish I knew about Google Cloud Pub/Sub: Part 2
Pub/Sub delivers this message to all subscriptions. ... which optimizes the ack deadline extensions with a frequency distribution model ...
Read more >Google Pubsub - Apache Camel
The number of parallel streams consuming from the subscription. 1. Integer. maxAckExtensionPeriod (consumer). Set the maximum period a message ack deadline ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Here’s the whole class:
@gtaylor I can see a bug (passing
ackDeadlineinstead ofackDeadlineSecondsin thecreateAPI request), but it wouldn’t produce the traceback you show above: is it possible you accidentally “fixed” it to showack_deadlineinstead ofackDeadline?