In this example, we will retrieve the messages we put on the message queue in post Sending Local Files to a JMS Queue and stored them locally. Edit JMSCopier.java Add the retrieveFileFromJMS method to the JMSCopier class as follows: JMSCopier.java Edit JMSCopierTest.java Add the method testRetrieveLocalFilesFromJMSQueue to the JMSCopierTest class as follows: JMSCopierTest.java Note, you will... Continue Reading →
Sending Local files to a JMS Queue
In our next example we will send local files to a JMS Queue and then view the Queue using the console. Edit pom.xml First we need to add the dependencies for JMS as follows: pom.xml Create JMSCopier.java Next we want to create the JMSCopier.java code that will use Camel to send our local files to... Continue Reading →
Installing ActiveMQ JMS Messaging System
For our next Camel example we need to install ActiveMQ to use as a JMS Messaging System. Download ActiveMQ Download the latest version of ActiveMQ from activemq.apache.org To run on a Mac, I downloaded the apache-activemq-5.9.0-bin.tar.gz and copied it to /Applications/Development, where I expanded it to give: /Applications/Development/apache-activemq-5.9.0 Configure ActiveMQ You need to set ACTIVEMQ_HOME to point to /Applications/Development/apache-activemq-5.9.0, and set... Continue Reading →
Downloading Files using Camel and SFTP
In this example, we will download files from a Server using SFTP and store them in a local directory. Create a Maven Project Create a Maven Project groupId: com.skills421.examples.camelartifactId: CamelBasicsversion: 0.0.1-SNAPSHOT Update Pom.xml pom.xml Edit FTPCopier.java Edit ftpCopier.java to add the method sftpDownload as follows: FTPCopier.java Edit FTPCopierTest.java Edit FTPCopierTest.java to @Ignore the ftp test and add... Continue Reading →
Downloading Files using Camel and FTP
In this example, we will download files from a Server using FTP and store them in a local directory Create a Maven Project Create a Maven Project groupId: com.skills421.examples.camelartifactId: CamelBasicsversion: 0.0.1-SNAPSHOT Update Pom.xml pom.xml Edit FTPCopier.java Create the FTPCopier.java code as follows: FTPCopierTest.java Note that you will need to define your own FTP Server to use to... Continue Reading →
Copying Files using Camel
This post continues on from Copying Files Using Java Edit FileCopier.java Edit the file FileCopier.java to add a new copyFile method, giving the following code FileCopier.java Edit FileCopierTest.java Edit the FileCopierTest.java code to add a second Test Case as follows: FileCopierTest.java Remember to change your inputPath and outputPath to match your own filesystem. Run the... Continue Reading →
Copying Files using Java
I'm getting into Camel for the first time, and working through some of the examples in Camel In Action. These posts are my efforts at some of the examples, working on a Mac using Spring STS. The following example is pretty much a copy and paste from the Camel In Action Book, but I've broken... Continue Reading →