This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 50d9bb0 CAMEL-14191: EIP docs - Add links to last EIP patterns and
add new pages if missing content
50d9bb0 is described below
commit 50d9bb0d073ba7267224b20b7a40d1f2f3ddd281
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Nov 20 12:19:59 2019 +0100
CAMEL-14191: EIP docs - Add links to last EIP patterns and add new pages if
missing content
---
.../ROOT/assets/images/eip/ChannelAdapterIcon.gif | Bin 0 -> 941 bytes
.../assets/images/eip/ChannelAdapterSolution.gif | Bin 0 -> 2898 bytes
.../modules/ROOT/pages/channel-adapter.adoc | 54 +++++++++++++++++++++
.../pages/enterprise-integration-patterns.adoc | 4 ++
.../modules/ROOT/pages/message-channel.adoc | 4 +-
.../modules/ROOT/pages/pojo-consuming.adoc | 2 +-
6 files changed, 60 insertions(+), 4 deletions(-)
diff --git
a/docs/user-manual/modules/ROOT/assets/images/eip/ChannelAdapterIcon.gif
b/docs/user-manual/modules/ROOT/assets/images/eip/ChannelAdapterIcon.gif
new file mode 100644
index 0000000..3bfd4c4
Binary files /dev/null and
b/docs/user-manual/modules/ROOT/assets/images/eip/ChannelAdapterIcon.gif differ
diff --git
a/docs/user-manual/modules/ROOT/assets/images/eip/ChannelAdapterSolution.gif
b/docs/user-manual/modules/ROOT/assets/images/eip/ChannelAdapterSolution.gif
new file mode 100644
index 0000000..ae5ede0
Binary files /dev/null and
b/docs/user-manual/modules/ROOT/assets/images/eip/ChannelAdapterSolution.gif
differ
diff --git a/docs/user-manual/modules/ROOT/pages/channel-adapter.adoc
b/docs/user-manual/modules/ROOT/pages/channel-adapter.adoc
new file mode 100644
index 0000000..6becd8e
--- /dev/null
+++ b/docs/user-manual/modules/ROOT/pages/channel-adapter.adoc
@@ -0,0 +1,54 @@
+[[Channel-Adapter]]
+= Channel Adapter
+
+Camel supports the
+https://www.enterpriseintegrationpatterns.com/patterns/messaging/ChannelAdapter.html[Channel
Adapter]
+from the xref:enterprise-integration-patterns.adoc[EIP patterns].
+
+How can you connect an application to the messaging system so that it can send
and receive messages?
+
+image::eip/ChannelAdapterSolution.gif[image]
+
+Use a Channel Adapter that can access the application's API or data and
publish messages on a
+channel based on this data, and that likewise can receive messages and invoke
functionality
+inside the application.
+
+The Channel Adapter is implemented in Camel by components.
+Each component adapters between the systems and Camel where all details are
hidden in the implementation
+of the component, which allows applications to easily send and receive data.
+
+== Samples
+
+An application must receive messages from a Kafka topic, which can be done by
using the
+xref:components::kafka-component.adoc[Kafka] component.
+
+One solution is to use a Camel route which consumes from the Kafka topic which
calls a bean with the data.
+
+[source,java]
+----
+from("kafka:cheese?brokers={{kafka.host}}:{{kafka.port}}"
+ .to("bean:cheeseBean");
+----
+
+And the bean has method which accepts the message payload as a byte array.
+
+[source,java]
+----
+public class CheeseBean {
+ public void receiveCheeseData(byte[] data) {
+ // do something
+ }
+}
+----
+
+You can also use xref:pojo-consuming.adoc[POJO consuming] with `@Consume`
annotation.
+
+[source,java]
+----
+public class CheeseBean {
+ @Consume("kafka:cheese?brokers={{kafka.host}}:{{kafka.port}}")
+ public void receiveCheeseData(byte[] data) {
+ // do something
+ }
+}
+----
diff --git
a/docs/user-manual/modules/ROOT/pages/enterprise-integration-patterns.adoc
b/docs/user-manual/modules/ROOT/pages/enterprise-integration-patterns.adoc
index c95a9f3..c2094a8 100644
--- a/docs/user-manual/modules/ROOT/pages/enterprise-integration-patterns.adoc
+++ b/docs/user-manual/modules/ROOT/pages/enterprise-integration-patterns.adoc
@@ -58,6 +58,10 @@ a|image::eip/DeadLetterChannelIcon.gif[image]
|xref:dead-letter-channel.adoc[Dead Letter Channel] |What will the
messaging system do with a message it cannot deliver?
+a|image::eip/ChannelAdapterIcon.gif[image]
+|xref:channel-adapter.adoc[Channel Adapter] |How can you connect an
+application to the messaging system so that it can send and receive messages?
+
a|image::eip/GuaranteedMessagingIcon.gif[image]
|xref:guaranteed-delivery.adoc[Guaranteed Delivery] |How can the sender
make sure that a message will be delivered, even if the messaging system
diff --git a/docs/user-manual/modules/ROOT/pages/message-channel.adoc
b/docs/user-manual/modules/ROOT/pages/message-channel.adoc
index 73aa34a..2620f22 100644
--- a/docs/user-manual/modules/ROOT/pages/message-channel.adoc
+++ b/docs/user-manual/modules/ROOT/pages/message-channel.adoc
@@ -5,9 +5,7 @@ Camel supports the
http://www.enterpriseintegrationpatterns.com/MessageChannel.html[Message
Channel] from the xref:enterprise-integration-patterns.adoc[EIP
patterns]. The Message Channel is an internal implementation detail of
-the
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html[Endpoint]
-interface and all interactions with the Message Channel are via the
+the `Endpoint` interface and all interactions with the Message Channel are via
the
Endpoint interfaces.
image::eip/MessageChannelSolution.gif[image]
diff --git a/docs/user-manual/modules/ROOT/pages/pojo-consuming.adoc
b/docs/user-manual/modules/ROOT/pages/pojo-consuming.adoc
index 346dafb..4c2efef 100644
--- a/docs/user-manual/modules/ROOT/pages/pojo-consuming.adoc
+++ b/docs/user-manual/modules/ROOT/pages/pojo-consuming.adoc
@@ -16,7 +16,7 @@ a TextMessage from JMS
----
public class Foo {
- @Consume(uri="activemq:cheese")
+ @Consume("activemq:cheese")
public void onCheese(String name) {
...
}