Change to the ActiveMQ bin directory lib/providers/activemq/bin/ and start ActiveMQ:
./activemq start
Open the web console to verify ActiveMQ is running ok: http://localhost:8161/admin/ with the username and password admin/admin.
Tip: To run ActiveMQ on a computer other than the one SharePlex for Oracle is installed: Download and install ActiveMQ as per the instructions above. Additionally, install ActiveMQ on a second computer. Run ActiveMQ from the second computer. The second computer requires network access to SharePlex for Oracle and SharePlex Connector for Hadoop.
From the SharePlex for Oracle shareplex/prod/bin directory start the sp_cop process.
/u01/app/shareplex/prod/bin > ./sp_cop &
Leave this session open.
Set the environment parameters for the JNDI environment as follows. For more information on JNDI and ActiveMQ see http://activemq.apache.org/jndi-support.html
Start a SharePlex sp_ctrl session
/u01/app/shareplex/prod/bin > ./sp_ctrl
sp_ctrl ()>
Set the Factory Class
sp_ctrl ()> target x.jms queue PostQueueName set jms factory_class = org.apache.activemq.jndi.ActiveMQInitialContextFactory
This creates the SharePlex post queue (name PostQueueName) and sets the JNDI property java.naming.factory.initial.
Declare the ActiveMQ URL
sp_ctrl ()> target x.jms queue PostQueueName set jms provider_url = url
This sets the JNDI property java.naming.provider.url. Set it to the host name or IP address of the host running ActiveMQ. Example URLs are tcp://w2k3-64bit:61616 or tcp://localhost:61616
Declare the location of the ActiveMQ JAR files
sp_ctrl ()> target x.jms queue PostQueueName set jms lib_location = activemq
Set lib_location to the directory in the SharePlex /lib/providers directory where you copied the ActiveMQ JAR files. The above example assumes the JAR files were copied to the SharePlex /lib/providers/activemq directory.
The JMS Queue name
By default the JMS queue name is OpenTarget.
You can create an additional JMS queue with the following command. The JMS queue name in the example is JMSQueueName.
sp_ctrl> target x.jms queue PostQueueName set jms queuename = JMSQueueName
NOTE: The following JMS queue names are reserved for internal use by SharePlex Connector for Hadoop. Do not use them. They are: Command_Queue, OpenTargetHBaseQueue and OpenTargetHDFSQueue.
Further Commands
Command | Description |
---|---|
sp_ctrl ()> target jms show |
Show the current configuration of the JMS. |
sp_ctrl ()> help target jms |
Ask for help on target jms. This shows all the options that can be configured for JMS and their usage. |
Execute the following SharePlex for Oracle command. SharePlex Connector for Hadoop will use the information from this command to ensure the integrity of the data inside of checking for duplicate and missing messages.
sp_ctrl ()> target jms set metadata size
Tip: You can confirm the setting by running the target jms show command which will show size as a metadata parameter set on the queue. Refer to the SharePlex for Oracle documentation for more information.