Step 1: Create ManagedEventSubscription with Tooling API
Step 2: Start the Managed Subscription
Step 3: Publish Events and Verify the Managed Subscription
Code Examples
Start a managed subscription by using the ManagedSubscribe.java class, which calls the ManagedSubscribe RPC method (beta).
arguments.yaml by following the steps in Step 3: Configure Client Parameters in the main Java quick start.arguments.yaml, specify the managed subscription ID. In this case, you use the ID MANAGED_SUB_ID=18xKj000000000BIAQ.ManagedSubscribe RPC example, enter ./run.sh genericpubsub.ManagedSubscribe.When you create a ManagedEventSubscription record, there can be a delay before the new configuration takes effect in Pub/Sub API. If the subscription returns an error saying that the managed subscription configuration isn’t found, wait several minutes and then restart it.
Important
Because no events are published yet, the client doesn’t receive any events yet. In the next step, you publish some events.