CLI save commad does not persist all topics in routerConfig.xnl
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ASHOK_Chawla
Posted On:   Sunday, November 28, 2004 08:35 PM

Hi , We are using SwiftMQ 5.0 on HP-UX. We are facing very strange problem. Few topics created using cli does not get persisted (in routerConfig.xml) using save command of cli. It happens few topic only. We are having around 60 topics , but only 41 are saved. We are creating topic one by one , then use them. Once our apllication shutdown , we save everythig in JMS router using save cli command. After calling save we halt router and then exit from cli. below is code snippet for creating topic. LogTrace.debug("cli " + cli ); cli.executeCommand("cc sys$topicmanager"); LogTrace.debug("   More>>

Hi ,

We are using SwiftMQ 5.0 on HP-UX.


We are facing very strange problem. Few topics created using cli does not get persisted (in routerConfig.xml) using save command of cli. It happens few topic only.


We are having around 60 topics , but only 41 are saved.


We are creating topic one by one , then use them. Once our apllication shutdown , we save everythig in JMS router using save cli command.


After calling save we halt router and then exit from cli.



below is code snippet for creating topic.


LogTrace.debug("cli " + cli );


cli.executeCommand("cc sys$topicmanager");


LogTrace.debug("cc sys$topicmanager done" );


cli.executeCommand("cc topics");


cli.executeCommand("new " + topicName);


cli.executeCommand("cc ..");


cli.executeCommand("cc ..");


Here is code snippet for saving configuration.


cli = new CLI(connection);

LogTrace.debug("Connecting to router");


cli.waitForRouter(router);


LogTrace.debug("switching to router");


cli.executeCommand("sr "+ router);


LogTrace.debug("save conf of router");


cli.executeCommand("save");


LogTrace.debug("halt router");


cli.executeCommand("halt");


LogTrace.debug("exit cli");


cli.executeCommand("exit");


This was working in swiftmq 2.1.3.


Regards


Ashok Chawla

   <<Less

Re: CLI save commad does not persist all topics in routerConfig.xnl

Posted By:   Andreas_Mueller  
Posted On:   Sunday, November 28, 2004 11:49 PM

Are you calling the part to save the config from a different thread/program? May be there is an overlap in time and the save command arrives in the middle of creating new topics from another thread/program?


You don't must call "exit" to exit from CLI. The "exit" command is for the command line CLI shell only. Instead use cli.close() from you program.
About | Sitemap | Contact