File tree Expand file tree Collapse file tree
samples/snippets/src/main/java/pubsub Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717package pubsub ;
1818
19- // [START pubsub_create_unwrapped_push_subscription ]
19+ // [START pubsub_create_push_no_wrapper_subscription ]
2020
2121import com .google .cloud .pubsub .v1 .SubscriptionAdminClient ;
2222import com .google .pubsub .v1 .PushConfig ;
@@ -45,10 +45,15 @@ public static void createPushSubscriptionExample(
4545 SubscriptionName subscriptionName = SubscriptionName .of (projectId , subscriptionId );
4646 NoWrapper noWrapper =
4747 NoWrapper .newBuilder ()
48- // Determines if message metadata is added to the HTTP headers of the delivered message.
48+ // Determines if message metadata is added to the HTTP headers of
49+ // the delivered message.
4950 .setWriteMetadata (true )
5051 .build ();
51- PushConfig pushConfig = PushConfig .newBuilder ().setPushEndpoint (pushEndpoint ).setNoWrapper (noWrapper ).build ();
52+ PushConfig pushConfig =
53+ PushConfig .newBuilder ()
54+ .setPushEndpoint (pushEndpoint )
55+ .setNoWrapper (noWrapper )
56+ .build ();
5257
5358 // Create a push subscription with default acknowledgement deadline of 10 seconds.
5459 // Messages not successfully acknowledged within 10 seconds will get resent by the server.
@@ -58,4 +63,4 @@ public static void createPushSubscriptionExample(
5863 }
5964 }
6065}
61- // [END pubsub_create_unwrapped_push_subscription ]
66+ // [END pubsub_create_push_no_wrapper_subscription ]
You can’t perform that action at this time.
0 commit comments