Details
-
New Feature
-
Status: In Progress
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
add push-base subscription client sdk
only client sdk,Does not include server
// use case try (IPushConsumer pushConsumer = (new SubscriptionFactory()) .createPushConsumer( new SubscriptionConfiguration.Builder() .host("localhost") .port(6667) .localHost("localhost") .localPort(9997) .username("root") .password("root") .topicStrategy(new SingleTopicStrategy("root.sg1")) .disorderHandlingStrategy(new IntolerableStrategy()) .build())) { pushConsumer.registerDataArrivalListener( (data) -> { System.out.println("Start Data arrived----------------------------------"); data.forEach( (item) -> { System.out.printf( "Time: %s, paths: %s, values: ", item.getTime(), String.join("、", item.getColumnNames())); if (item.getColumnNames().size() > 0) { for (int i = 0; i < item.getColumnNames().size(); i++) { System.out.printf("%s, ", item.Data().getInt(i)); } } System.out.println(); }); System.out.println("End Data arrived----------------------------------"); }); pushConsumer.openSubscription(); pushConsumer.start();
添加推送模式的消息订阅客户端sdk
只有客户端,不含订阅服务的