Showing posts with label IBM MQ. Show all posts
Showing posts with label IBM MQ. Show all posts

Saturday 18 February 2017

Rfhutilc error: Error getting queue names in rfhutilc

Rfhutilc error: Error getting queue names in rfhutilc


Problem: Z/OS system installed with IBM MQ and system configured with Queue manager and Queues. Using rfhutilc.exe, I try to connect and load queues from my window system to Z/OS system, rfhutilc.exe displays as "error getting queue names".

I also set environment variables for MQSERVER but my window system is not installed with IBM MQ.

Solution: rfhutilc.exe will not work alone, system must have installed with IBM MQ to connect with remote Queue manager.


Related Topic:






Friday 17 February 2017

How to achieve IBM MQ with high availability configuration

How to achieve IBM MQ with high availability configuration


High availability refers to the ability of a system or component to be operational and accessible when required for use for a specified period of time. The system or component is equipped to handle faults in an unplanned outage gracefully to continue providing the intended functionality.

Daisy chains: Bad for high availability:

Daisy-chained components represent a single point of failure as they do not allow for an alternative route in the event of a component failure. A failure of any individual component might result in an outage of the entire application infrastructure.

How to achieve IBM MQ with high availability configuration

Active–active configuration:

To overcome this obstacle, we can employ redundant components . Network connectivity between the redundant components ensures that all components in the architecture are reachable even if one or more components fail. Redundant components can be added in an active pattern where they are actively participating in processing transactions. For push-based technologies (such as HTTP), a load balancer can distribute the traffic equally on the available components.

How to achieve IBM MQ with high availability configuration

Active-Standby Configuration:

An active-passive deployment uses hot or cold standby components to take over in the event that the main component fails. The standby components often exchange heartbeat information with the active components at a configurable time. If a specific number of heartbeats are missed, the standby component takes over as the active component. Some hardware components can also take over the MAC addresses of the network interface card, which allows network switches and load balancers to function normally without having to change any network behaviour.

How to achieve IBM MQ with high availability configuration



Different technologies to achieve WebSphere MQ High Avaiability 
  •  Queue manager clusters
  •  Queue-sharing groups
  •  Multi-instance queue managers
  •  HA clusters
  •  Client reconnection

Queue manager clusters:

A queue manager cluster is a logical group of queue managers. The queue managers can be on most of the platforms supported by MQ. When queue managers are grouped in a cluster, each queue manager can make the queues(and other resources it hosts) available to every cluster member.

The queue manager cluster solution provides a highly available messaging service. It allows messages to be forwarded to any queue manager in the cluster hosting the target queue for application processing. If any queue manager in the cluster fails, new incoming messages continue to be processed by the remaining queue managers as long as at least one of the queue managers hosts an
instance of the target queue.

Sharing cluster queues on multiple queue managers prevents a queue from being a Single point of failures.Cluster workload algorithm automatically routes traffic away from failed queue managers.One of the benefits of queue manager clustering is workload balancing functionality.

Queue-sharing groups:

Shared queues are only available on WebSphere MQ for z/OS. They rely on z/OS-specific features not available on other platforms.

Multi-instance queue managers:

Two instances of a queue manager on different machines,Instances are the SAME queue manager – only one set of data files. One is the “active” instance, other is the “standby” instance.Active instance “owns” the queue manager’s files,Accepts connections from applications.Standby instance monitors the active instance,Applications cannot connect to the standby instance,If active instance fails, standby restarts queue manager and becomes active.

How to achieve IBM MQ with high availability configuration

How to achieve IBM MQ with high availability configuration
How to achieve IBM MQ with high availability configuration

How to achieve IBM MQ with high availability configuration

How to achieve IBM MQ with high availability configuration

HA clusters:

HA clusters are groups of two or more computers an  resources such as disks and networks, connected together and configured in such a way that, if one fails, a high availability manager, IBM PowerHA for AIX (formerly HACMP), Veritas Cluster Server, Microsoft Cluster Server, HP  Serviceguard performs a failover. The failover transfers the state data of applications from the failing computer to another computer in the cluster and re-initiates their operation there. This provides high availability of services running within the HA cluster.HA clusters can:
  •    Coordinate multiple resources such as application server database
  •    Consist of more than two machines
  •    Failover more than once without operator intervention
  •    Takeover IP address as part of failover
  •    Likely to be more resilient in cases of MQ and OS defects
  •    In HA clusters, queue manager data and logs are placed on a shared disk
  •    Disk is switched between machines during failover
  •    The queue manager has its own “service” IP address
  •    IP address is switched between machines during failover
  •    Queue manager’s IP address remains the same after failover
  •    The queue manager is defined to the HA cluster as a resource dependent on the shared disk        and the IP address
  •    During failover, the HA cluster will switch the disk, take over the IP address and then start     the queue manager.
How to achieve IBM MQ with high availability configuration

How to achieve IBM MQ with high availability configuration

Reference:

https://www.ibm.com/support/knowledgecenter/SSKM8N_8.0.0/com.ibm.etools.mft.doc/fa70161_.htm

Related Topic

How to install HermesJMS with SoapUI

How to configure HermesJMS in SOAP UI for IBM MQ

Spring jms code with ibm websphere mq example

How to use RFHUTILC.EXE to connect to a remote queue manager




Wednesday 15 February 2017

How to install HermesJMS with SoapUI

How to install HermesJMS with SoapUI


HermesJMS is a handy open source project hosted by Sourceforge,that can be used to monitor, inspect, and interact with JMS Queues, Topics, and Messages.

HermesJMS is an extensible console that helps you interact with JMS providers making it easy to browse or search queues and topics, copy messages around and delete them. It fully integrates with JNDI letting you discover administered objects stored, create JMS sessions from the connection factories and use any destinations found. Many providers include a plugin that uses the native API to do non-JMS things like getting queue depths (and other statistics) or finding queue and topic names.

It works with many of the popular JMS providers such as Active MQ, Arjuna MQ, Tibco EMS, Fiorano MQ, JBoss MQ, JORAM, OpenJMS, Oracle, Pramati, SAP, SeeBeyond ICAN, SeeBeyond JCAPS, Sonic MQ, WebLogic JMS, WebMethods, and WebSphere MQ

Download open Source Latest version of SOAP UI with HermesJMS.

Step 1: Start it by just double-clicking on it. The installer will start immediately.

How to install HermesJMS with SoapUI

Step 2: You'll see the starting screen.

How to install HermesJMS with SoapUI

Step 3: Just click Next to continue. You'll be asked to accept our license agreement.

How to install HermesJMS with SoapUI

Step 4: After accepting and clicking Next, you'll be able to select the destination folder, which by default is set to C:\Program Files\SmartBear\SoapUI-5.2.0, but can be changed.

How to install HermesJMS with SoapUI

Step 5: Next step gives you the opportunity to include, as additional components, soapUI source files and Hermes installation. You must check HermesJms option.

How to install HermesJMS with SoapUI

Step 6: In case you've chosen to install Hermes, you'll get the Hermes license agreement.

How to install HermesJMS with SoapUI

Step 7:  Then, specify the path to the directory where the tutorials will be installed.


How to install HermesJMS with SoapUI

Step 8: Then, you'll be able to select the Start Menu folder where you want the soapUI shortcut to be added.

How to install HermesJMS with SoapUI

Step 9: and whether you would like desktop icon added.

How to install HermesJMS with SoapUI

Step 10: Finally, by clicking Next, the installation starts.After couple of minutes at most, the installation should be finished and you should see the next screen.

How to install HermesJMS with SoapUI




Related Topic:

How to configure HermesJMS in SOAP UI for IBM MQ







How to configure HermesJMS in SOAP UI for IBM MQ

How to configure HermesJMS in SOAP UI for IBM MQ


How to install HermesJMS in Soap UI, please visit my previous post.

HermesJMS is a handy open source project hosted by Sourceforge,that can be used to monitor, inspect, and interact with JMS Queues, Topics, and Messages.

HermesJMS is an extensible console that helps you interact with JMS providers making it easy to browse or search queues and topics, copy messages around and delete them. It fully integrates with JNDI letting you discover administered objects stored, create JMS sessions from the connection factories and use any destinations found. Many providers include a plugin that uses the native API to do non-JMS things like getting queue depths (and other statistics) or finding queue and topic names.

It works with many of the popular JMS providers such as Active MQ, Arjuna MQ, Tibco EMS, Fiorano MQ, JBoss MQ, JORAM, OpenJMS, Oracle, Pramati, SAP, SeeBeyond ICAN, SeeBeyond JCAPS, Sonic MQ, WebLogic JMS, WebMethods, and WebSphere MQ.

Configure HermesJMS

Prerequisites
Before configuration, make sure the following has been done:

IBM MQ is installed and started.
HermesJMS is installed with SOAP UI.
HermesJMS has been added to Preferences as per below.

How to configure HermesJMS in SOAP UI for IBM MQ
How to configure HermesJMS in SOAP UI for IBM MQ

Launch HermesJms: Start HermesJMS from the Project menu:
     Select Project > Start HermesJMS
The HermesJMS Manager opens.

How to configure HermesJMS in SOAP UI for IBM MQ

How to configure HermesJMS in SOAP UI for IBM MQ

Create Session: To access a provider you need to configure a session. This should include a connection factory for your provider and the needed connection details. Click on New session and Enter a name for the session: LocalMQ and then click apply and OK.

How to configure HermesJMS in SOAP UI for IBM MQ

How to configure HermesJMS in SOAP UI for IBM MQ

  The session is now accessible in the HermesJMS manager:

How to configure HermesJMS in SOAP UI for IBM MQ

Add Provider: Start with a created Session, click on Edit and Choose the Providers tab first at the bottom.

How to configure HermesJMS in SOAP UI for IBM MQ

How to configure HermesJMS in SOAP UI for IBM MQ

Select Classpath Groups (it may be the only one available).Right-click in the Classpath Groups area,Select Add Group and Enter the name : MQ

How to configure HermesJMS in SOAP UI for IBM MQ

Add these all jar files in Library section.If the scan window opens, click Scan. Click Apply and OK.

How to configure HermesJMS in SOAP UI for IBM MQ
The new (or modified) session is available in the HermesJMS manager:In order to have configuration loaded, HermesJMS must be restarted.

Add Connection Factory: A connection factory is an object used to create connections to the provider. Click Apply and OK.

How to configure HermesJMS in SOAP UI for IBM MQ

The modified session is now accessible in the HermesJMS manager:

Add Properties:

In order for HermesJMS to handle the connections, you need to add plugin and properties properties containing addresses to use for the broker and service.Right-click in the Plugin Property area. Click apply and OK.

How to configure HermesJMS in SOAP UI for IBM MQ

Enter Queue or Topic. Enter all queues, topic of Local_Queue queue manager. Click apply and OK.

How to configure HermesJMS in SOAP UI for IBM MQ

In order to have configuration loaded, HermesJMS must be restarted.The created session in HermesJMS named LocalMQ, containing four queues which we can use from within SoapUI.

How we can use created session from within SoapUI, I will post on my later post.

Related Topics

How to install HermesJMS with SoapUI





Monday 13 February 2017

How to use RFHUTILC.EXE to connect to a remote queue manager

How to use RFHUTILC.EXE to connect to a remote queue manager


RfhUtil is IBM WebSphere MQ Client, use for read data from files and/or queues; write data to files and/or queues and display data in a variety of formats. However, it is not an editor. While the user data portion of the message can be displayed in a variety of formats, it cannot be changed. 

Prerequisite: 

1. Remote system installed with IBM WebSphere MQ.
2. System have RfhUtil Client.

Step 1: Create Queue manager on Remote system and check below option during creation of Queue Manager.

How to use RFHUTILC.EXE to connect to a remote queue manager

If you already have Queue Manager than check if SYSTEM.ADMIN.SVRCONN channel exists or not.
How to use RFHUTILC.EXE to connect to a remote queue manager

How to use RFHUTILC.EXE to connect to a remote queue manager

If value not showed Exists than click on Create.

Step 2: Create Queue in newly created Queue Manager.

Step 3: Create new System variable in the system from where you want to connect Remote Queue manager.

How to use RFHUTILC.EXE to connect to a remote queue manager

Variable name : MQSERVER
Variable value : SYSTEM.ADMIN.SVRCONN/TCP/IP address of remote system(listener port of Queue manager)

Step 4: Open rfhutilc.exe

How to use RFHUTILC.EXE to connect to a remote queue manager

Step 5: Give Queue manager name as created new system variables. Click on Load names, it will display all Queue name which you have created on remote system.

How to use RFHUTILC.EXE to connect to a remote queue manager

Step 6: Write data to queue. Click on open file and pass  text file or XML file with some value. Go to MQMD tab and choose "MQSTR" for MQ Message format.

How to use RFHUTILC.EXE to connect to a remote queue manager


Step 7: Read data from Queue.

How to use RFHUTILC.EXE to connect to a remote queue manager


Note : If error 2035 is returned you will need to add a authorised user id to the MCA field of the target queue. I will post solution in my further post.


Related Topic:

Spring jms code with ibm websphere mq example





Friday 10 February 2017

Spring jms code with ibm websphere mq example

  Spring jms code with ibm websphere mq example


In this tutorial I am going to discuss How to send,read and listen Messages to IBM MQ using spring jmstemplate. I am going to cover how to configure the IBM MQ, connection factory, Message Queue,Listener container and JmsTemplate.


I used below technologies to execute below program

1.Maven 4.0.0
2.JDK 1.8
3.Spring (spring-core) 4.0.0.RELEASE
4.Spring (spring-jms) 4.0.0.RELEASE
5.Websphere MQ 7.5.0.1
6. springTestVersion 4.0.0.RELEASE
7. junitVersion 4.6

Prerequisite: System installed with IBM WebSphere MQ.

Click here to download full code of this example.

For example, created 3 files (App-context.xml,main.properties and spring.xml under \src\main\resources\)
created 2 files MessageService.java and RequestSendMessageCreator.java under \src\main\java\com\test\testspringjmsmq
created 1 file MessageServiceTest.java under \src\test\java\com\test\testspringjmsmq\
created 2 files DemoMain.java and TestMessageListener.java under \src\main\java\com\example\listener
1 pom.xml file which is automatic created by spring project.
Spring jms code with ibm websphere mq example

POM.xml: To start off we need to obtain the WebSphere MQ JARs. These JARs are proprietary - hence they will not resolve through a public Maven repository like Maven Central. These JARs need to be obtained from the WebSphere MQ installation directory and manually deployed to our local Maven repository. The config below defines the WebSphere MQ dependencies in our Maven POM file.
Spring jms code with ibm websphere mq example

Spring jms code with ibm websphere mq example

main.properties: This properties file contains information about QueueManager, Queue, host and port(listener port).

fromRtpQueue  is Queue name where listener will read messages.
RES.IDS.QUEUE is Queue name where JmsTemplate send messages.
queue_Idsmanager is Queue manager name.
queue_Idshostname is system ip address or localhost.
queue_Idsport is listener port of Queue manager.

Spring jms code with ibm websphere mq example

spring.xml: Spring's JMSTemplate class is the key to simplifying access to the conventional JMS API. It abstracts the common and repetitive boiler-plate code by handling the creation and closing of connections and sessions, sending and receiving of messages and handling of exceptions. JMSTemplate and a few other beans need to be defined in our Spring config.

Spring jms code with ibm websphere mq example

Spring jms code with ibm websphere mq example

Spring jms code with ibm websphere mq example

App-context.xml: This file import spring.xml and create bean for MessageService class.

Spring jms code with ibm websphere mq example


DemoMain.java: This class have main method and method to load application context file.

Spring jms code with ibm websphere mq example

TestMessageListener.java: This class is used for listen text messages from IBM MQ. Whenever any messages will come on configured Queue(I will tell how to configure queue for listener later on this post), this class will listen messages from that queue and as per requirement process.

Spring jms code with ibm websphere mq example

MessageService.java: This class is used for send messages to IBM MQ. For sending message, I used send(destination,messageCreator) of JmsTemplate where messageCreator is object of RequestSendMessageCreator. In RequestSendMessageCreator class you can create message as per your requirement(will discuss on this later on post) and destination is default destination where we need to send message. We can set destination in JmsTemplate or using annotate in MessageService class.
Spring jms code with ibm websphere mq example

RequestSendMessageCreator.java: This class is used for creating message.

Spring jms code with ibm websphere mq example

MessageServiceTest.java: This class will use for Junit test.

Spring jms code with ibm websphere mq example

How to run :  You can run this example by using DemoMain class or Junit test through MessageServiceTest.


Related Topic

IBM MQ reason code 2087 (AMQ4048)