$ ./app --help
Usage: cometd [-hV] [COMMAND]
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
subscribe, s
$ ./app subscribe --help
Usage: cometd subscribe [-hV] [-t=<timeout>] <server> <channels>
<server>
<channels>
-h, --help Show this help message and exit.
-t, --timeout=<timeout> Choose how many milliseconds to wait for the
connection. Default: 60000
-V, --version Print version information and exit.
$ ./app subscribe http://localhost:8080/cometd /chat/**
{chat=brandon has joined, membership=join, user=brandon}
{chat=test, user=brandon}
{chat=brandon has left, membership=leave, user=brandon}
$ export JAVA_OPTS='-Dorg.slf4j.simpleLogger.defaultLogLevel=debug'
$ ./app subscribe http://localhost:8080/cometd /chat/** 2>&1 | grep 'State updated'
[main] DEBUG org.cometd.client.BayeuxClient.68999068 - State updated: DISCONNECTED -> HANDSHAKING
[OkHttp http://localhost:8080/...] DEBUG org.cometd.client.BayeuxClient.68999068 - State updated: HANDSHAKING -> HANDSHAKEN
[OkHttp http://localhost:8080/...] DEBUG org.cometd.client.BayeuxClient.68999068 - State updated: HANDSHAKEN -> CONNECTING
[OkHttp http://localhost:8080/...] DEBUG org.cometd.client.BayeuxClient.68999068 - State updated: CONNECTING -> CONNECTED