• Welcome to KonaKart Community Forum. Please login or sign up.
 

Konakart and Activemq Integration

Started by theodor.gorunescu, February 06, 2014, 01:14:35 pm

Previous topic - Next topic

theodor.gorunescu

Try starting Konakart with ActiveMQ .

I modified the file web.xml to :

<! - Apache ActiveMQ - >

<servlet>
<servlet-name> KonaKartMQServlet < / servlet -name >
<servlet-class>
com.konakart.mq.KKMQServer
< / servlet -class >
<init-param>
<param-name> sites < / param -name >
<param-value> tcp :/ / localhost : 8791 < / param - value>
< / init- param >
<init-param>
<param-name> mqEnabled < / param -name >
<param-value> true < / param - value>
< / init- param >
<init-param>
<param-name> mqName < / param -name >
<param-value> KonaKart.Broker.1 < / param - value>
< / init- param >
<init-param>
<param-name> mqAdminUserName < / param -name >
<param-value> kkadmin < / param - value>
< / init- param >
<init-param>
<param-name> mqAdminUserPassword < / param -name >
<param-value> princess < / param - value>
< / init- param >
<init-param>
<param-name> mqUserUserName < / param -name >
<param-value> kkuser < / param - value>
< / init- param >
<init-param>
<param-name> mqUserPassword < / param -name >
<param-value> prince < / param - value>
< / init- param >
<init-param>
<param-name> mqKonaKartQStub < / param -name >
<param-value> KonaKart . < / param - value>
< / init- param >
<load-on-startup> 20 < / load -on - startup >
< / servlet >
<! - End Of Apache ActiveMQ - >

.

Next I defined properties in the konakart.properties and konakartadmin.properties ( not  in konakartadmin.proprties)

I started Konakart.

Just started a java program that read KonaKart.Orders.Queue, but nothing happens, even I make orders, change staus, etc. 



ming

You have to modify the OrderIntegrationMgr to actually post messages to the queue:

            // Post the order to the order message queue for processing by some other system
            // postOrderToQueue(order);

You'll find it's commented out by default as not everyone will want this.

You cna find the source for this here:
"*\KonaKart\custom\appn\src\com\konakart\bl\OrderIntegrationMgr.java"

theodor.gorunescu


theodor.gorunescu

after I change OrderIntegrationMgr and I compile it,   how can I integrate the new version of OrderIntegrationMgr in KonaKart?



theodor.gorunescu

March 12, 2014, 09:54:40 am #6 Last Edit: March 12, 2014, 09:59:09 am by theodor.gorunescu
Can I use an external ActiveMQ and if so what would be the settings that I need to do in web.xml?

ming

I've never actually tried it but you should be able to use an external ActiveMQ (just fill out the attributes of the MqOptionsIf object appropriately).

Another option is to configure a topology whereby you have a KonaKart ActiveMQ that links to your other queue.   In some ways this could be beneficial in that it is more likely that messages from KonaKart can be successfully posted to a queue that KonaKart initialises than one controlled elsewhere.    You have to consider what happens if KonaKart (or your custom code) posts to the external queue when it isn't available.   (The same is true for posting to the KonaKart queue but it is probably a lot less likely to be unavailable if KonaKart is up and running).