This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git
The following commit(s) were added to refs/heads/main by this push: new 0977e7c Move ftp example here 0977e7c is described below commit 0977e7c15aa631986236b7afd3073e855007b85e Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue Dec 3 14:31:43 2024 +0100 Move ftp example here --- jbang/ftp/README.adoc | 99 +--------------------------------------- jbang/ftp/application.properties | 19 -------- jbang/ftp/compose.yaml | 25 ---------- jbang/ftp/ftp.camel.yaml | 12 ----- jbang/ftp/payload.xml | 3 -- 5 files changed, 1 insertion(+), 157 deletions(-) diff --git a/jbang/ftp/README.adoc b/jbang/ftp/README.adoc index 5d38908..765e07c 100644 --- a/jbang/ftp/README.adoc +++ b/jbang/ftp/README.adoc @@ -1,100 +1,3 @@ == ActiveMQ to FTP -This example shows how to integrate ActiveMQ with FTP server. - -=== Running ActiveMQ and FTP server - -You need both an ActiveMQ Artemis broker, and FTP server up and running. - -You can run both via Docker Compose - -[source,sh] ----- -$ docker compose up --detach ----- - -=== Install JBang - -First install JBang according to https://www.jbang.dev - -When JBang is installed then you should be able to run from a shell: - -[source,sh] ----- -$ jbang --version ----- - -This will output the version of JBang. - -To run this example you can either install Camel on JBang via: - -[source,sh] ----- -$ jbang app install camel@apache/camel ----- - -Which allows to run CamelJBang with `camel` as shown below. - -=== How to run - -Then you can run this example using: - -[source,sh] ----- -$ camel run * ----- - -=== Sending Messages to ActiveMQ - -When the example is running, you need to trigger Camel, by sending messages to the ActiveMQ broker. -You can either do this via the broker web console http://localhost:8161 (login with `artemis/artemis` -or by using Camel JBang: - -[source,sh] ----- -$ camel cmd send --body=file:payload.xml ----- - -=== Browsing FTP server - -When you have send some messages to ActiveMQ then Camel will route these to the FTP server. -To see which files has been uploaded, you can remote shell into Docker or use Camel JBang: - -[source,sh] ----- -$ camel cmd browse ----- - -Which shows a status page of pending messages in the systems. - -To see the content of these messages, you can tell Camel to dump via - -[source,sh] ----- -$ camel cmd browse --dump ----- - -TIP: To see more options use `camel cmd browse --help`. - - -=== Developer Web Console - -You can enable the developer console via `--console` flag as show: - -[source,sh] ----- -$ camel run * --console ----- - -Then you can browse: http://localhost:8080/q/dev to introspect the running Camel Application. - - -=== Help and contributions - -If you hit any problem using Camel or have some feedback, then please -https://camel.apache.org/community/support/[let us know]. - -We also love contributors, so -https://camel.apache.org/community/contributing/[get involved] :-) - -The Camel riders! +This example has been moved to: https://github.com/apache/camel-jbang-examples/tree/main/ftp diff --git a/jbang/ftp/application.properties b/jbang/ftp/application.properties deleted file mode 100644 index 73cdd56..0000000 --- a/jbang/ftp/application.properties +++ /dev/null @@ -1,19 +0,0 @@ -# artemis connection factory -camel.beans.artemisCF = #class:org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory -# URL for broker -camel.beans.artemisCF.brokerURL = tcp://localhost:61616 - -# if broker requires specific login -camel.beans.artemisCF.user = artemis -camel.beans.artemisCF.password = artemis - -# pooled connection factory -camel.beans.poolCF = #class:org.messaginghub.pooled.jms.JmsPoolConnectionFactory -camel.beans.poolCF.connectionFactory = #bean:artemisCF -camel.beans.poolCF.maxSessionsPerConnection = 500 -camel.beans.poolCF.connectionIdleTimeout = 20000 -# more options can be configured -# https://github.com/messaginghub/pooled-jms/blob/main/pooled-jms-docs/Configuration.md - -# setup JMS component to use connection factory -camel.component.jms.connection-factory = #bean:poolCF diff --git a/jbang/ftp/compose.yaml b/jbang/ftp/compose.yaml deleted file mode 100644 index 2348bfb..0000000 --- a/jbang/ftp/compose.yaml +++ /dev/null @@ -1,25 +0,0 @@ -services: - - artemis: - container_name: my-artemis - image: apache/activemq-artemis:2.37.0 - ports: - - "8161:8161" - - "61616:61616" - - "5672:5672" - environment: - ARTEMIS_USER: artemis - ARTEMIS_PASSWORD: artemis - ANONYMOUS_LOGIN: false - - ftp-server: - container_name: my-ftp-server - environment: - - FTP_PASS=mypassword - - FTP_USER=myuser - image: garethflowers/ftp-server - ports: - - '20-21:20-21/tcp' - - '40000-40009:40000-40009/tcp' # Only needed for passive mode -# volumes: -# - '/data:/home/user' diff --git a/jbang/ftp/ftp.camel.yaml b/jbang/ftp/ftp.camel.yaml deleted file mode 100644 index cc083b3..0000000 --- a/jbang/ftp/ftp.camel.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- from: - uri: "jms:cheese" - steps: - - log: "Incoming: ${body}" - - to: - uri: ftp - parameters: - host: localhost - port: 21 - username: myuser - password: mypassword - passiveMode: true \ No newline at end of file diff --git a/jbang/ftp/payload.xml b/jbang/ftp/payload.xml deleted file mode 100644 index a087424..0000000 --- a/jbang/ftp/payload.xml +++ /dev/null @@ -1,3 +0,0 @@ -<order id="123"> - <item id="444">Camel in Action</item> -</order> \ No newline at end of file