You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streampipes.apache.org by "dominikriemer (via GitHub)" <gi...@apache.org> on 2023/01/23 08:30:28 UTC

[GitHub] [streampipes] dominikriemer commented on a diff in pull request #1135: Sp 1133

dominikriemer commented on code in PR #1135:
URL: https://github.com/apache/streampipes/pull/1135#discussion_r1083757522


##########
streampipes-config/src/main/java/org/apache/streampipes/config/backend/DefaultMessagingSettings.java:
##########
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.streampipes.config.backend;
+
+import org.apache.streampipes.model.config.MessagingSettings;
+import org.apache.streampipes.model.config.SpDataFormat;
+import org.apache.streampipes.model.config.SpProtocol;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DefaultMessagingSettings {
+
+  public static MessagingSettings make() {
+    List<SpProtocol> protocolList;
+    if (System.getenv(BackendConfigKeys.PRIORITIZED_PROTOCOL) != null) {
+      switch (System.getenv(BackendConfigKeys.PRIORITIZED_PROTOCOL).toLowerCase()) {
+        case "mqtt":
+          protocolList = Arrays.asList(SpProtocol.MQTT, SpProtocol.KAFKA, SpProtocol.JMS, SpProtocol.NATS);

Review Comment:
   This is used in the configuration view, where users can change the priority of protocols used for inter-pipeline communication (e.g., when "NATS" is selected, pipeline elements supporting nats and kafka would communicate over Nats, and "Kafka" would be selected as the second choice in case Nats is not supported by one of the two connected pipeline elements).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org