Connect

This page shows how to connect to HStreamDB using Java SDK.

Prerequisites

Make sure you have HStreamDB running and accessible.

Example

  1. package io.hstream.example;
  2. import io.hstream.HStreamClient;
  3. public class ConnectExample {
  4. public static void main(String[] args) throws Exception {
  5. final String serviceUrl = "localhost:6570";
  6. HStreamClient client = HStreamClient.builder().serviceUrl(serviceUrl).build();
  7. System.out.println("Connected");
  8. client.close();
  9. }
  10. }