Threads

I am using IS 6.0.1SP2,Developer6.0.1SP1,MQAdapter6.0
i need to invoke a flow service 42times/sec.Can anybody tell how to accomplish this task??

Puneet,

Welcome to WMUsers! It’s not acceptable to contact members directly with your questions, but since your new here I’ll make an exception.

From the details you included in your email, I understand that you need to process 150,000 messages per hour from 10 queues. That’s approximately 15,000 messages from each if they were evenly distributed which works out to about 250 messages per second from each queue or 2500 per second in total.

I would not attempt to process each individual message, but rather to schedule services to get a batch of messages to be processed. I don’t have the 6.0 adapter installed on my laptop at present, but I know that the MQ Series API itself supports getting multiple messages.

I would also ask whether it was feasible or possible to combine multiple MQ Series messages into batches before putting them on the queues.

The algorithm would go something like this:

  1. Read a batch of 2500 - 10000 messages (configurable batch size)
  2. Process that batch as needed
  3. Commit that batch if transactional processing is needed

In short, I don’t know how to schedule something 42 times per second and even if I could would not implement my solution this way.

If the load to process all of these messages turned out to be more than a single IS instance could handle, you would need to create a cluster of IS servers and configure the MQ Series adapter to support the cluster.

Of course there’s a lot of additional information that I would need like how fast these messages need to be processed by IS and how much work is involved to process each one.

Thanks,
Mark

Thanks Mark,
I will ask my other team members and get back to you.
Meantime, Can this task be accomplished by configuring a listener??

regards,
puneet saxena

I created a java service that makes threaded calls to the service that makes the call to the MQ Adapter. I then put that in a repeat (or can be a loop also) for X amount of times. There is a threaded service in PSUtilities…but its messy…mine takes service and path as input.

IDataCursor idc=pipeline.getCursor();

idc.first(“path”);
String path=(String)idc.getValue();
idc.first(“service”);
String service=(String)idc.getValue();
try
{
IData pipelineCopy = IDataUtil.clone(pipeline);
Service.doThreadInvoke(path,service,pipelineCopy);
}

catch(Exception e)
{

}

Puneet,
The WmSamples package holds some threading source code which demonstrates this sort of thing - including the use of ServiceThread.
I’m uncertain if developing multithreaded applications in webMethods has improved since 4.6. The provided threading libraries were fairly simplistic in 4.6 but you could get the work you needed done if you were comfortable programming in Java.

Nick

Hi Nick & Brian,

Thanx for contributing in solution,well as of now i am trying with MQ listener,once done with that i will try with your solutions.

Regards,
Puneet Saxena