ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JMSProvider configurable service to connect to HornetQ

Post new topic  Reply to topic
 JMSProvider configurable service to connect to HornetQ « View previous topic :: View next topic » 
Author Message
FBothma01
PostPosted: Thu Aug 07, 2014 3:08 am    Post subject: JMSProvider configurable service to connect to HornetQ Reply with quote

Newbie

Joined: 07 Aug 2014
Posts: 2
Location: Edinburgh

After trying various options and searching for examples, I eventually managed to create a Configurable service that can be referenced from an IIB message flow's JMSInput and JMSOutput nodes. The requirement was to read messages from a HornetQ queue or Topic and then process them through the IIB (v9). The most difficult part was to understand and define suitable values to the Configurable Service (JMSProviders) to allow it find the target objects via JNDI.

So here are the steps.

1. The configurable service will need access to the HornetQ Client classes. Copy and store those in a location the QM has access to. I decided on storing them under "/var/mqsi/jars/hornet-2.2.14" (on Linux off course ). This will allow new services to be created if there is a HornetQ upgrade in future.


2. Ensure you have the JNDI connection details and that, when required, firewall rules have been updated to allow traffic between the MQ server and the HornetQ server. You will need to know the IP address and port number the HornetQ JNDI server is listening on.

3. Decide on which InitialContext Factory you need. I found "org.jnp.interfaces.NamingContextFactory" to work just fine.



Next create your Configurable Service based on the IBM supplied JMSProviders Template.

The following Properties are set. I am only referencing the ones that are not left to default values.

1. Name (set to the name of your Configurable service. This will referenced in your JMSInput/JMSOutput nodes (JMS Connection/JMS provider name propertyof the nodes)

2. connectionFactoryName ("ConnectionFactory")
3. initialContextFactory ("org.jnp.interfaces.NamingContextFactory")
4. jarsURL (example "/var/mqsi/jars/hornet-2.2.14" or wherever you decided to copy the HornetQ client jar files)[
5. jndiBindingsLocation (using protocol jnp "ip or dns of the JNDI server:JNDI listener port".


That's it!

Now use your Configurable service (by name) as the JMS provider name in your JMS-type nodes. You may also consider defining the Basic properties on those nodes to direct your flow to read or write to particular queues or topics. In my case the flow needs to subscribe to a HornetQ topic and receive messages from there so the following properties are defined:-

Basic/Subscription topic ("topic/HornetQTestTopic")



Back to top
View user's profile Send private message
FBothma01
PostPosted: Thu Aug 07, 2014 3:11 am    Post subject: Re: JMSProvider configurable service to connect to HornetQ Reply with quote

Newbie

Joined: 07 Aug 2014
Posts: 2
Location: Edinburgh

After trying various options and searching for examples, I eventually managed to create a Configurable service that can be referenced from an IIB message flow's JMSInput and JMSOutput nodes. The requirement was to read messages from a HornetQ queue or Topic and then process them through the IIB (v9). The most difficult part was to understand and define suitable values to the Configurable Service (JMSProviders) to allow it find the target objects via JNDI.

So here are the steps.

1. The configurable service will need access to the HornetQ Client classes. Copy and store those in a location the QM has access to. I decided on storing them under "/var/mqsi/jars/hornet-2.2.14" (on Linux off course ). This will allow new services to be created if there is a HornetQ upgrade in future.


2. Ensure you have the JNDI connection details and that, when required, firewall rules have been updated to allow traffic between the MQ server and the HornetQ server. You will need to know the IP address and port number the HornetQ JNDI server is listening on.

3. Decide on which InitialContext Factory you need. I found "org.jnp.interfaces.NamingContextFactory" to work just fine.



Next create your Configurable Service based on the IBM supplied JMSProviders Template.

The following Properties are set. I am only referencing the ones that are not left to default values.

1. Name (set to the name of your Configurable service. This will referenced in your JMSInput/JMSOutput nodes (JMS Connection/JMS provider name propertyof the nodes)

2. connectionFactoryName ("ConnectionFactory")
3. initialContextFactory ("org.jnp.interfaces.NamingContextFactory")
4. jarsURL (example "/var/mqsi/jars/hornet-2.2.14" or wherever you decided to copy the HornetQ client jar files)[
5. jndiBindingsLocation (using protocol jnp "ip or dns of the JNDI server:JNDI listener port".


That's it!

Now use your Configurable service (by name) as the JMS provider name in your JMS-type nodes. You may also consider defining the Basic properties on those nodes to direct your flow to read or write to particular queues or topics. In my case the flow needs to subscribe to a HornetQ topic and receive messages from there so the following properties are defined:-

Basic/Subscription topic ("topic/HornetQTestTopic")



[/quote]
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Aug 07, 2014 5:11 am    Post subject: Re: JMSProvider configurable service to connect to HornetQ Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

FBothma01 wrote:
1. The configurable service will need access to the HornetQ Client classes. Copy and store those in a location the QM has access to. I decided on storing them under "/var/mqsi/jars/hornet-2.2.14" (on Linux off course ).


My gut instinct says it's a bad idea to put stuff under /var/mqsi. At least you didn't put these jar files in .../classes...

The rest of this is spot on, and well done by you.
Back to top
View user's profile Send private message
GSnyder13
PostPosted: Sat Oct 04, 2014 12:12 pm    Post subject: Reply with quote

Novice

Joined: 29 Mar 2005
Posts: 13
Location: United States

We have recently implemented broker flows that send Textmessages to HornetQ using the JMSOutput node. For the most part it works great except...when we get this:
Code:
<usr><ExceptionList><RecoverableException><File>/build/slot1/S800_P/src/DataFlowEngine/PluginInterface/ImbJniNode.cpp</File><Line>1253</Line><Function>ImbJniNode::evaluate</Function><Type>ComIbmJMSClientOutputNode</Type><Name>RetailOps_Pack_Cost_Tomax_Reformat#FCMComposite_1_3</Name><Label>RetailOps_Pack_Cost_Tomax_Reformat.IN_QUEUE</Label><Catalog>BIPmsgs</Catalog><Severity>3</Severity><Number>2230</Number><Text>Caught exception and rethrowing</Text><Insert><Type>14</Type><Text>RetailOps_Pack_Cost_Tomax_Reformat.IN_QUEUE</Text></Insert><RecoverableException><File>JMSClientErrors.java</File><Line>695</Line><Function>JMSClientRequestResponseHelper::setupJMSRequest()</Function><Type></Type><Name></Name><Label></Label><Catalog>BIPmsgs</Catalog><Severity>1</Severity><Number>4644</Number><Text>Error creating JMS Message</Text><Insert><Type>5</Type><Text>Broker &apos;BRKP02&apos;; Execution Group &apos;Retail&apos;; Message Flow &apos;RetailOps_Pack_Cost_Tomax_Reformat&apos;; Node &apos;IN_QUEUE::ComIbmJMSClientOutputNode&apos; </Text></Insert><Insert><Type>5</Type><Text>Session is closed</Text></Insert><Insert><Type>5</Type><Text> Session is closed</Text></Insert></RecoverableException></RecoverableException></ExceptionList></usr>


These errors seem to be happening randomly. When the backout messages are placed back on the input MQ queues, they go through with no problem. Just wondering if anyone else has experienced this problem?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Oct 05, 2014 7:42 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Seems to come from a problem when trying to use a closed session.
Open a PMR.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JMSProvider configurable service to connect to HornetQ
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.