Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add BigQuery configuration for subscriptions #1133

Merged
merged 2 commits into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ public SubscriberStub getStub() {
* messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be
* `_deleted-topic_` if the topic has been deleted.
* @param pushConfig If push delivery is used with this subscription, this field is used to
* configure it. An empty `pushConfig` signifies that the subscriber will pull and ack
* messages using API methods.
* configure it. Either `pushConfig` or `bigQueryConfig` can be set, but not both. If both are
* empty, then the subscriber will pull and ack messages using API methods.
* @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits
* for the subscriber to acknowledge receipt before resending the message. In the interval
* after the message is delivered and before it is acknowledged, it is considered to be
Expand Down Expand Up @@ -303,8 +303,8 @@ public final Subscription createSubscription(
* messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be
* `_deleted-topic_` if the topic has been deleted.
* @param pushConfig If push delivery is used with this subscription, this field is used to
* configure it. An empty `pushConfig` signifies that the subscriber will pull and ack
* messages using API methods.
* configure it. Either `pushConfig` or `bigQueryConfig` can be set, but not both. If both are
* empty, then the subscriber will pull and ack messages using API methods.
* @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits
* for the subscriber to acknowledge receipt before resending the message. In the interval
* after the message is delivered and before it is acknowledged, it is considered to be
Expand Down Expand Up @@ -371,8 +371,8 @@ public final Subscription createSubscription(
* messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be
* `_deleted-topic_` if the topic has been deleted.
* @param pushConfig If push delivery is used with this subscription, this field is used to
* configure it. An empty `pushConfig` signifies that the subscriber will pull and ack
* messages using API methods.
* configure it. Either `pushConfig` or `bigQueryConfig` can be set, but not both. If both are
* empty, then the subscriber will pull and ack messages using API methods.
* @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits
* for the subscriber to acknowledge receipt before resending the message. In the interval
* after the message is delivered and before it is acknowledged, it is considered to be
Expand Down Expand Up @@ -439,8 +439,8 @@ public final Subscription createSubscription(
* messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be
* `_deleted-topic_` if the topic has been deleted.
* @param pushConfig If push delivery is used with this subscription, this field is used to
* configure it. An empty `pushConfig` signifies that the subscriber will pull and ack
* messages using API methods.
* configure it. Either `pushConfig` or `bigQueryConfig` can be set, but not both. If both are
* empty, then the subscriber will pull and ack messages using API methods.
* @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits
* for the subscriber to acknowledge receipt before resending the message. In the interval
* after the message is delivered and before it is acknowledged, it is considered to be
Expand Down Expand Up @@ -494,6 +494,7 @@ public final Subscription createSubscription(
* .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
* .setPushConfig(PushConfig.newBuilder().build())
* .setBigqueryConfig(BigQueryConfig.newBuilder().build())
* .setAckDeadlineSeconds(2135351438)
* .setRetainAckedMessages(true)
* .setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down Expand Up @@ -752,6 +753,7 @@ public final Subscription createSubscription(
* .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
* .setPushConfig(PushConfig.newBuilder().build())
* .setBigqueryConfig(BigQueryConfig.newBuilder().build())
* .setAckDeadlineSeconds(2135351438)
* .setRetainAckedMessages(true)
* .setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import com.google.protobuf.FieldMask;
import com.google.protobuf.Timestamp;
import com.google.pubsub.v1.AcknowledgeRequest;
import com.google.pubsub.v1.BigQueryConfig;
import com.google.pubsub.v1.CreateSnapshotRequest;
import com.google.pubsub.v1.DeadLetterPolicy;
import com.google.pubsub.v1.DeleteSnapshotRequest;
Expand Down Expand Up @@ -140,6 +141,7 @@ public void createSubscriptionTest() throws Exception {
.setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
.setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
.setPushConfig(PushConfig.newBuilder().build())
.setBigqueryConfig(BigQueryConfig.newBuilder().build())
.setAckDeadlineSeconds(2135351438)
.setRetainAckedMessages(true)
.setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down Expand Up @@ -202,6 +204,7 @@ public void createSubscriptionTest2() throws Exception {
.setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
.setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
.setPushConfig(PushConfig.newBuilder().build())
.setBigqueryConfig(BigQueryConfig.newBuilder().build())
.setAckDeadlineSeconds(2135351438)
.setRetainAckedMessages(true)
.setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down Expand Up @@ -264,6 +267,7 @@ public void createSubscriptionTest3() throws Exception {
.setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
.setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
.setPushConfig(PushConfig.newBuilder().build())
.setBigqueryConfig(BigQueryConfig.newBuilder().build())
.setAckDeadlineSeconds(2135351438)
.setRetainAckedMessages(true)
.setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down Expand Up @@ -326,6 +330,7 @@ public void createSubscriptionTest4() throws Exception {
.setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
.setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
.setPushConfig(PushConfig.newBuilder().build())
.setBigqueryConfig(BigQueryConfig.newBuilder().build())
.setAckDeadlineSeconds(2135351438)
.setRetainAckedMessages(true)
.setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down Expand Up @@ -388,6 +393,7 @@ public void getSubscriptionTest() throws Exception {
.setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
.setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
.setPushConfig(PushConfig.newBuilder().build())
.setBigqueryConfig(BigQueryConfig.newBuilder().build())
.setAckDeadlineSeconds(2135351438)
.setRetainAckedMessages(true)
.setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down Expand Up @@ -440,6 +446,7 @@ public void getSubscriptionTest2() throws Exception {
.setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
.setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
.setPushConfig(PushConfig.newBuilder().build())
.setBigqueryConfig(BigQueryConfig.newBuilder().build())
.setAckDeadlineSeconds(2135351438)
.setRetainAckedMessages(true)
.setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down Expand Up @@ -492,6 +499,7 @@ public void updateSubscriptionTest() throws Exception {
.setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
.setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
.setPushConfig(PushConfig.newBuilder().build())
.setBigqueryConfig(BigQueryConfig.newBuilder().build())
.setAckDeadlineSeconds(2135351438)
.setRetainAckedMessages(true)
.setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down
Loading