The siddhi-io-jms extension is an extension to Siddhi that used to receive and publishe events via JMS Message. This extension allows users to subscribe to a JMS broker and receive/publish JMS messages.
Find some useful links below:
Latest API Docs is 1.0.25.
Using the extension in WSO2 Stream Processor
Prerequisites for using the feature
-
Using this feature with Apache ActiveMQ and WSO2 Stream Processor
-
Download and install Apache ActiveMQ JMS-5.x.x.
-
Start the Apache ActiveMQ server with the following command:
bin/activemq start
. -
Download activemq-client-5.x.x.jar.
-
Register the InitialContextFactory implementation according to the OSGi JNDI spec and copy the client jar to the
<SP_HOME>/libs
directory as follows:-
Navigate to {WSO2SPHome}/bin and run the following command:
-
For Linux:
./icf-provider.sh org.apache.activemq.jndi.ActiveMQInitialContextFactory <Downloaded Jar Path>/activemq-client-5.x.x.jar <Output Jar Path>
-
For Windows:
./icf-provider.bat org.apache.activemq.jndi.ActiveMQInitialContextFactory <Downloaded Jar Path>\activemq-client-5.x.x.jar <Output Jar Path>
Provide privileges if necessary using chmod +x icf-provider.(sh|bat)
-
-
If converted successfully then it will create 'activemq-client-5.x.x' directory in the
<Output Jar Path>
with OSGi converted and original jars:- activemq-client-5.x.x.jar (Original Jar)
- activemq-client-5.x.x_1.0.0.jar (OSGi converted Jar)
-
Following messages would be shown on the terminal
- INFO: Executing 'jar uf
<absolute_path>/activemq-client-5.x.x/activemq-client-5.x.x.jar
-C<absolute_path>/activemq-client-5.x.x/internal/CustomBundleActivator.class'
[timestamp] org.wso2.carbon.tools.spi.ICFProviderTool addBundleActivatorHeader - INFO: Running jar to bundle conversion [timestamp] org.wso2.carbon.tools.converter.utils.BundleGeneratorUtils convertFromJarToBundle
- INFO: Created the OSGi bundle activemq_client_5.x.x_1.0.0.jar for JAR file
<absolute_path>/activemq-client-5.x.x/activemq-client-5.x.x.jar
- INFO: Executing 'jar uf
-
You can find the osgi converted libs in activemq-client-5.x.x folder. You can copy
'activemq-client-5.x.x/activemq_client_5.x.x_1.0.0.jar'
to{WSO2SPHome}/lib
and 'activemq-client-5.x.x/activemq-client-5.x.x.jar' to{WSO2SPHome}/samples/sample-clients/lib
-
-
Convert and copy following jars from the
<ActiveMQ_HOME>/libs
directory to the<SP_HOME>/libs
directory as follows.-
Create a directory (SOURCE_DIRECTORY) in a preferred location in your machine and copy the following JARs to it from the
<ActiveMQ_HOME>/libs
directory.- hawtbuf-1.9.jar
- geronimo-j2ee-management_1.1_spec-1.0.1.jar
- geronimo-jms_1.1_spec-1.1.1.jar
-
Create another directory (DESTINATION_DIRECTORY) in a preferred location in your machine.
-
To convert all the jars you copied into the
<SOURCE_DIRECTORY>
, issue the following command.- For Windows:
<SP_HOME>/bin/jartobundle.bat <SOURCE_DIRECTORY_PATH> <DESTINATION_DIRECTORY_PATH>
- For Linux:
<SP_HOME>/bin/jartobundle.sh <SOURCE_DIRECTORY_PATH> <DESTINATION_DIRECTORY_PATH>
- For Windows:
-
Copy the converted files from the
<DESTINATION_DIRECTORY>
to the<SP_HOME>/libs directory
. -
Copy the jars that are not converted from the
<SOURCE_DIRECTORY>
to the<SP_HOME>/samples/sample-clients/lib
directory.
-
-
-
You can use this extension in the latest WSO2 Stream Processor that is a part of WSO2 Analytics offering, with editor, debugger and simulation support.
-
This extension is shipped by default with WSO2 Stream Processor, if you wish to use an alternative version of this extension you can replace the component jar that can be found in the
<STREAM_PROCESSOR_HOME>/lib
directory.
Using the extension as a java library
- This extension can be added as a maven dependency along with other Siddhi dependencies to your project.
<dependency>
<groupId>org.wso2.extension.siddhi.io.jms</groupId>
<artifactId>siddhi-io-jms</artifactId>
<version>x.x.x</version>
</dependency>
Branch | Build Status |
---|---|
master |
- jms ((Sink))
JMS Sink allows users to subscribe to a JMS broker and publish JMS messages.
- jms ((Source))
JMS Source allows users to subscribe to a JMS broker and receive JMS messages. It has the ability to receive Map messages and Text messages.
-
Please report issues at GitHub Issue Tracker.
-
Send your contributions as pull requests to master branch.
-
Post your questions with the "Siddhi" tag in Stackoverflow.
-
Siddhi developers can be contacted via the mailing lists:
Developers List : dev@wso2.org
Architecture List : architecture@wso2.org
-
We are committed to ensuring support for this extension in production. Our unique approach ensures that all support leverages our open development methodology and is provided by the very same engineers who build the technology.
-
For more details and to take advantage of this unique opportunity contact us via http://wso2.com/support/.