Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View andrewstevenson's full-sized avatar

Andrew Stevenson andrewstevenson

View GitHub Profile
wget https://github.com/datamountaineer/coap-test-server/releases/download/v1.0/start-server.sh
chmod +x start-server.sh
./start-server.sh
hazelcast[default] > ns dev
namespace: dev
hazelcast[dev] > q.take
<public-address>localhost</public-address>
name=hazelcast-sink
connector.class=com.datamountaineer.streamreactor.connect.hazelcast.sink.HazelCastSinkConnector
max.tasks=1
topics = coap_sensor_topic
connect.hazelcast.sink.cluster.members=localhost
connect.hazelcast.sink.group.name=dev
connect.hazelcast.sink.group.password=dev-pass
connect.hazelcast.sink.kcql=INSERT INTO dev SELECT * FROM coap_sensor_topic WITHFORMAT JSON STOREAS QUEUE
#start the console app (client node)
export CLASSPATH=~/Downloads/hazelcast-3.7.5/bin/hazelcast.xml
cd demo
clientConsole.sh
INFO: [127.0.0.1]:5701 [dev] [3.7.4] TcpIpConnectionManager configured with Non Blocking IO-threading model: 3 input threads and 3 output threads
Jan 19, 2017 11:21:20 AM com.hazelcast.internal.cluster.impl.MulticastJoiner
INFO: [127.0.0.1]:5701 [dev] [3.7.4]
Members [1] {
Member [127.0.0.1]:5701 - 2cc01773-6525-48a0-a9a3-09ba943fd478 this
}
Jan 19, 2017 11:21:20 AM com.hazelcast.core.LifecycleService
#start hazeclast server node
hazelcast-3.7.4/bin/start.sh
bin/cli.sh create hazelcast-sink < conf/hazelcast-coap-sink.properties
bin/cli.sh create coap-source < conf/coap-hazelcast-source.properties
${CONFLUENT_HOME}/bin/kafka-avro-console-consumer --zookeeper localhost --topic coap-hazelcast --from-beginning