protected String getKafkaUrl(SpDataStream stream) { // TODO add also jms support return protocol(stream).getBrokerHostname() + ":" + ((KafkaTransportProtocol) protocol(stream)).getKafkaPort(); }
protected String getKafkaUrl(SpDataStream stream) { // TODO add also jms support return protocol(stream).getBrokerHostname() + ":" + ((KafkaTransportProtocol) protocol(stream)).getKafkaPort(); }
public String getBrokerHostname() { if (getEventGrounding() == null || getEventGrounding().getTransportProtocol() == null || getEventGrounding().getTransportProtocol().getBrokerHostname() == null) { return ""; } else { return getEventGrounding().getTransportProtocol().getBrokerHostname(); } }
public static String extractBroker(AdapterDescription adapterDescription) { EventGrounding eventGrounding = getEventGrounding(adapterDescription); String host = eventGrounding.getTransportProtocol().getBrokerHostname(); int port = ((KafkaTransportProtocol) eventGrounding.getTransportProtocol()).getKafkaPort(); return host + ":" + port; }
public TransportProtocol(TransportProtocol other) { super(other); this.brokerHostname = other.getBrokerHostname(); if (other.getTopicDefinition() != null) { this.topicDefinition = new Cloner().topicDefinition(other.getTopicDefinition()); } }
public static String extractBroker(AdapterDescription adapterDescription) { String host = adapterDescription.getEventGrounding().getTransportProtocol().getBrokerHostname(); int port = ((KafkaTransportProtocol) adapterDescription.getEventGrounding().getTransportProtocol()).getKafkaPort(); return host + ":" + port; }
private AdapterPipeline getAdapterPipeline(T adapterDescription) { List<AdapterPipelineElement> pipelineElements = new ArrayList<>(); // Must be before the schema transformations to ensure that user can move this event property TimestampTransformationRuleDescription timestampTransformationRuleDescription = getTimestampRule(adapterDescription); if (timestampTransformationRuleDescription != null) { pipelineElements.add(new AddTimestampPipelineElement(timestampTransformationRuleDescription.getRuntimeKey())); } AddValueTransformationRuleDescription valueTransformationRuleDescription = getAddValueRule(adapterDescription); if (valueTransformationRuleDescription != null) { pipelineElements.add(new AddValuePipelineElement(valueTransformationRuleDescription.getRuntimeKey(), valueTransformationRuleDescription.getStaticValue())); } // first transform schema before transforming vales // value rules should use unique keys for of new schema pipelineElements.add(new TransformSchemaAdapterPipelineElement(adapterDescription.getSchemaRules())); pipelineElements.add(new TransformValueAdapterPipelineElement(adapterDescription.getValueRules())); RemoveDuplicatesTransformationRuleDescription duplicatesTransformationRuleDescription = getRemoveDuplicateRule(adapterDescription); if (duplicatesTransformationRuleDescription != null) { pipelineElements.add(new DuplicateFilterPipelineElement(duplicatesTransformationRuleDescription.getFilterTimeWindow())); } // Needed when adapter is if (adapterDescription.getEventGrounding() != null && adapterDescription.getEventGrounding().getTransportProtocol() != null && adapterDescription.getEventGrounding().getTransportProtocol().getBrokerHostname() != null) { pipelineElements.add(new SendToKafkaAdapterSink( adapterDescription)); } return new AdapterPipeline(pipelineElements); }