Ver Fonte

增加康凯斯协议报文转发

syg há 4 anos atrás
pai
commit
a283831ce4

+ 0 - 16
src/main/java/com/tidecloud/dataacceptance/service/HexBinaryAcceptanceHandlerAdapter.java

@@ -81,23 +81,7 @@ public abstract class HexBinaryAcceptanceHandlerAdapter extends AcceptanceInboun
         boolean isInitial = Constants.MSG_TERMINAL_REGISTER.equals(msgId);
         sendOriginalMsg(dataByteArray, deviceId, isInitial,0);
     }
-    protected void sendOriginalMsg(byte[] dataByteArray, String deviceId, boolean isInitial) {
-        MsgWrapper msgWrapper = new MsgWrapper(deviceId, DatatypeConverter.printHexBinary(dataByteArray), isInitial);
-        msgWrapper.setProtocolCode(0);
-        final Integer key = deviceId.hashCode();
-        kafkaTemplate.send(originalTopic, key, StringUtil.convert2String(msgWrapper))
-                .addCallback(new ListenableFutureCallback<SendResult<Integer, String>>() {
-                    @Override
-                    public void onFailure(Throwable ex) {
-                        logger.error(ex.getMessage(), ex);
-                    }
 
-                    @Override
-                    public void onSuccess(SendResult<Integer, String> result) {
-                        logger.info("send original msg success");
-                    }
-                });
-    }
 
     protected void sendOriginalMsg(byte[] dataByteArray, String deviceId, boolean isInitial,Integer protocolCode) {
         MsgWrapper msgWrapper = new MsgWrapper(deviceId, DatatypeConverter.printHexBinary(dataByteArray), isInitial);