Class PubSubIT

java.lang.Object
io.debezium.server.pubsub.PubSubIT

@QuarkusTestResource(io.debezium.testing.testcontainers.PostgresTestResourceLifecycleManager.class) @QuarkusTestResource(PubSubTestResourceLifecycleManager.class) public class PubSubIT extends Object
Integration test that verifies basic reading from PostgreSQL database and writing to a Google Cloud PubSub stream running on a Google PubSub Emulator
Author:
Jiri Pechanec
  • Field Details

    • MESSAGE_COUNT

      private static final int MESSAGE_COUNT
      See Also:
    • STREAM_NAME

      private static final String STREAM_NAME
      See Also:
    • SUBSCRIPTION_NAME

      private static final String SUBSCRIPTION_NAME
      See Also:
    • subscriber

      protected static com.google.cloud.pubsub.v1.Subscriber subscriber
    • subscriptionName

      private static com.google.pubsub.v1.ProjectSubscriptionName subscriptionName
    • topicName

      private static com.google.pubsub.v1.TopicName topicName
    • channel

      private static io.grpc.ManagedChannel channel
    • channelProvider

      private static com.google.api.gax.rpc.TransportChannelProvider channelProvider
    • credentialsProvider

      private static com.google.api.gax.core.CredentialsProvider credentialsProvider
    • server

      @Inject DebeziumServer server
    • postgresPort

      String postgresPort
    • messages

      private static final List<com.google.pubsub.v1.PubsubMessage> messages
  • Constructor Details

    • PubSubIT

      public PubSubIT()
  • Method Details

    • stop

      @AfterAll static void stop() throws IOException
      Throws:
      IOException
    • setupDependencies

      void setupDependencies(@Observes io.debezium.server.events.ConnectorStartedEvent event) throws IOException
      Throws:
      IOException
    • createChannel

      void createChannel()
    • createSubscriber

      com.google.cloud.pubsub.v1.Subscriber createSubscriber()
    • createSubscriptionAdminClient

      static com.google.cloud.pubsub.v1.SubscriptionAdminClient createSubscriptionAdminClient() throws IOException
      Throws:
      IOException
    • createTopicAdminClient

      static com.google.cloud.pubsub.v1.TopicAdminClient createTopicAdminClient() throws IOException
      Throws:
      IOException
    • connectorCompleted

      void connectorCompleted(@Observes io.debezium.server.events.ConnectorCompletedEvent event) throws Exception
      Throws:
      Exception
    • testPubSub

      @Test public void testPubSub() throws Exception
      Throws:
      Exception
    • defaultJdbcConfig

      private io.debezium.jdbc.JdbcConfiguration defaultJdbcConfig()