Skip to content

Commit 4862935

Browse files
committed
samples: Payload Unwrapping
1 parent 2948268 commit 4862935

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

samples/snippets/src/main/java/pubsub/CreatePushNoWrapperSubscriptionExample.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package pubsub;
1818

19-
// [START pubsub_create_unwrapped_push_subscription]
19+
// [START pubsub_create_push_no_wrapper_subscription]
2020

2121
import com.google.cloud.pubsub.v1.SubscriptionAdminClient;
2222
import 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]

0 commit comments

Comments
 (0)