Sometimes, data can originate from asynchronous message queues. For these cases, you can use Flume's JMS source to create events read from a JMS Queue or Topic. While it is theoretically possible to use any Java Message Service (JMS) implementation, Flume has only been tested with ActiveMQ, so be sure to test thoroughly if you use a different provider.
Like the previously covered ElasticSearch sink in Chapter 4, Sinks and Sink Processors, Flume does not come packaged with the JMS implementation you'll be using, as the versions need to match up, so you'll need to include the necessary implementation JAR files on the Flume agent's classpath. The preferred method is to use the --plugins-dir
parameter mentioned in Chapter 2, A Quick Start Guide to Flume, which we'll cover in more detail in the next chapter.
Note
ActiveMQ is just one provider of the Java Message Service API. For more information, see the project homepage at http://activemq.apache.org.