Hello folks,
I have a generic JMS application which works with following JMS providers WebSphere, HornetQ and ActiveMq. I'm trying to use this application against RabbitMq adding the required RabbitMQ JMSClient dependency in the classpath of my application. I'm quite stuck at the place where I pass few parameters to my application like Context.INITIAL_CONTEXT_FACTORY, Context.PROVIDER_URL whose values I'm not able to determine for RabbitMQ. I understand RabbitMQ isn't a JMS provider so it doesn't have those InitialContext classes and Provider URL but
RabbitMQ JMSClient documentation says to put the configuration parameters in a configuration file something like this
<Resource name="jms/ConnectionFactory"
type="javax.jms.ConnectionFactory"
factory="com.rabbitmq.jms.admin.RMQObjectFactory"
username="guest"
password="guest"
virtualHost="/"
host="localhost"
ssl="true"/>
What is this file? And how do I associate this file with my application? The closest thing I could find is putting this in a binding file and give its location as Provider URL and "com.sun.jndi.fscontext.RefFSContextFactory" as the InitialContext class. But I'm still not clear with the format of this file.
Can somebody throw light on how I can use RabbitMQ JMSClient with my application? Also if possible share some code snippets.
Regards,
Niranjan