Feature/3.0.0-beta how to exit after unsubscribing


I have followed the examples for streaming in https://github.com/datasift/datasift-java/blob/feature/3.0.0-beta/MIGRATING_TO_V-3.0.0.md
After unsubscribing from the only stream that exists using


There is still a thread running that is preventing the application from closing.
Is there another method that needs to be called?


The HTTP client uses a thread pool that must be shutdown for the process to end. If you shutdown then you must do a restart before any requests will work. See:



Thanks for the reply,
I’ve been trying to use HttpRequestBuilder.shutdown(); but it still won’t shutdown.

Here is my code:

datasift.liveStream().subscribe(new StreamSubscription(result) {
public void onDataSiftLogMessage(DataSiftMessage di) {
System.out.println((di.isError() ? “Error” : di.isInfo() ? “Info” : “Warning”) + “:\n” + di);

        public void onMessage(Interaction interaction) {
            System.out.println("INTERACTION:\n" + interaction);



I’ve also tried datasift.shutdown();