sruehl commented on a change in pull request #14: WIP: Api Refactoring URL: https://github.com/apache/incubator-plc4x/pull/14#discussion_r213964940
########## File path: integrations/apache-camel/src/main/java/org/apache/plc4x/camel/Plc4XConsumer.java ########## @@ -84,22 +79,29 @@ public void setExceptionHandler(ExceptionHandler exceptionHandler) { } @Override - protected void doStart() throws InterruptedException, ExecutionException, TimeoutException { - PlcSubscriptionRequest request = new PlcSubscriptionRequest(); - @SuppressWarnings("unchecked") - SubscriptionRequestCyclicItem subscriptionRequestCyclicItem = new SubscriptionRequestCyclicItem(dataType, address, TimeUnit.SECONDS, 3, this); - request.addItem(subscriptionRequestCyclicItem); + protected void doStart() throws InterruptedException, ExecutionException, TimeoutException, PlcException { + PlcSubscriber plcSubscriber = plcConnection.getSubscriber().orElseThrow( + () -> new PlcException("Connection doesn't support subscriptions.")); + // TODO: Is it correct to only support one field? Review comment: it depends how the camel uri is defined. In ads and modbus I omit query params so they can be used by camel ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services