This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 44ce4b900cf4150f0a28043000ce06aa8be51b31
Author: Adriano Machado <unknown>
AuthorDate: Wed Jun 1 10:05:01 2022 -0400
Adding example.
---
examples/wiretap/README.md | 3 +++
examples/wiretap/WireTap.java | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+)
diff --git a/examples/wiretap/README.md b/examples/wiretap/README.md
new file mode 100644
index 000000000..daed2a363
--- /dev/null
+++ b/examples/wiretap/README.md
@@ -0,0 +1,3 @@
+# Camel K WireTap example
+
+Find useful examples about how use a "WireTap" EIP in a Camel K integration.
diff --git a/examples/wiretap/WireTap.java b/examples/wiretap/WireTap.java
new file mode 100644
index 000000000..556b524d5
--- /dev/null
+++ b/examples/wiretap/WireTap.java
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+// To run this integrations use:
+//
+// kamel run WireTap.java --dev
+//
+
+import org.apache.camel.builder.RouteBuilder;
+
+public class WireTap extends RouteBuilder {
+
+ @Override
+ public void configure() throws Exception {
+ from("timer:tick")
+ .wireTap("direct:tap")
+ .log("Hello from the timer!");
+
+ from("direct:tap")
+ .log("Hello from the tap!");
+ }
+}