jpos / jPOS

jPOS Project
http://jpos.org
GNU Affero General Public License v3.0
609 stars 461 forks source link

Channel Class that wraps the JMS objects #569

Closed mehrdad2000 closed 10 months ago

mehrdad2000 commented 10 months ago

Hi Need to write Channel Class that wraps the JMS objects.

It would have to implement ISOChannel to be able to connect, send, receive etc. via JMS queue.

It should implement Configurable so i can pass in required properties via the test plan.

Here is the scenario:

I try to send message from jmeter-iso8583 to mq, but it’s not work.

here is the my current JSR223 sampler that work correctly and send “mymessage“ to mq, now question is how can i send output of iso8583 plugin to mq server? Is it possible to add “queue manager, channel, user, pass, queue name,…) in connection manager of jmeter-iso8583?

import com.ibm.jms.JMSTextMessage; import com.ibm.mq.jms.*; import com.ibm.msg.client.wmq.WMQConstants;

import javax.jms.JMSException; import javax.jms.Session;

MQQueueConnectionFactory cf = new MQQueueConnectionFactory(); cf.setHostName("192.168.1.1"); cf.setPort(1443); // or other port cf.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE, WMQConstants.WMQ_CM_CLIENT); cf.setQueueManager("qm"); cf.setChannel("my.SVRCONN"); cf.setStringProperty(WMQConstants.USERID, "user"); cf.setStringProperty(WMQConstants.PASSWORD, "pass"); connection = (MQQueueConnection) cf.createQueueConnection(); MQQueueSession session = (MQQueueSession) connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); MQQueue queue = (MQQueue) session.createQueue("queue:///my.queue"); MQQueueSender sender = (MQQueueSender) session.createSender(queue); JMSTextMessage message = (JMSTextMessage) session.createTextMessage("mymessage"); connection.start(); sender.send(message);

Related issue: https://github.com/tilln/jmeter-iso8583/issues/73

Any idea? Thanks

ar commented 10 months ago

This is not a jPOS issue.