Information on CommandLineInterface of swiftmq

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Information on CommandLineInterface of swiftmq

pavan
Hi,

    I want to use the CLI  client programatically  to perform multiple operations(move,remove,view) in parallel. As per the doc it said that connection cannot be shared across multiple threads for executing operations in parallel.  Does having separate cli connection per thread ensures parallelism on operations?.  


Ref:
http://www.swiftmq.com/products/router/admin/adminapi/javadoc/com/swiftmq/admin/cli/CLI.html

Note2: CLI can be used only from a single thread of execution. Executing methods from different threads concurrently can result in an unexpected behavior.

Thanks,
Pavan
Reply | Threaded
Open this post in threaded view
|

Re: Information on CommandLineInterface of swiftmq

IIT Software
Administrator
Yes, use one CLI connection per thread.
Reply | Threaded
Open this post in threaded view
|

Re: Information on CommandLineInterface of swiftmq

pavan
Hi,
   
  I want to know bit more information on how multiple threads cli connections works. In two cases
   1)  Two threads with different cli connections  perfoming different operations(move,remove) on the same queue.
    2) Two threads with different cli connections  perfoming different operations(move,remove) on the different queue.



Thanks,
Pavan
Reply | Threaded
Open this post in threaded view
|

Re: Information on CommandLineInterface of swiftmq

IIT Software
Administrator
I think single threaded should be clear. The CLI object is single threaded. Either you use different CLI objects per thread or you synchronize access to the CLI object.
Reply | Threaded
Open this post in threaded view
|

Re: Information on CommandLineInterface of swiftmq

pavan
Thanks