Venu,
I am traveling for meetings in NY right now, so it may be a few days
until I get back to you with examples (we don't have anything
precanned).
Have you looked at ActivceMQ-CPP
(
http://activemq.apache.org/openwire-cpp-client.html) or the OpenWire
documentation at
http://activemq.apache.org/openwire-cpp-client.html ?
On Tue, Sep 9, 2008 at 3:10 AM, VENU <venu4_s@yahoo.co.in> wrote:
>
> Hi Toli,
>
>
> Thanks for your support.
>
>
> as i am creating a producer and consumer
>
> try {
> // // Create a ConnectionFactory
> connectionFactory = new
> ActiveMQConnectionFactory("tcp://localhost:61616");
>
> connectionFactory->setUsername((char*)(LPCTSTR)usr);//xxxxx
> connectionFactory->setPassword((char*)(LPCTSTR)pswd);//xxxxxxx
>
> connection = connectionFactory->createConnection();
> connection->start();
>
> // // Create a Session
> session = connection->createSession( Session::AUTO_ACKNOWLEDGE );
> destination = session->createQueue("ors-commands");
>
> AfxMessageBox("session created by producer !");
> //
> // Create a MessageProducer from the Session to the Topic or Queue
> producer = session->createProducer( destination );
> producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
> }catch ( CMSException& e )
> {
> e.printStackTrace();
> MessageBox("ActiveMQConnectionFactory Error !");
> }
> //AfxBeginThread(startApp,this);
>
>
>
>
> creating consumer
> ----------------------
> std::string brokerURI = "tcp://localhost:61616";
>
> bool useTopics = true;
> bool sessionTransacted = false;
> int numMessages = 20000;
>
> try {
>
> HelloWorldConsumer consumer( brokerURI, numMessages, useTopics,
> sessionTransacted );
>
> // Start the consumer thread.
> Thread consumerThread( &consumer );
> consumerThread.start();
>
> // Wait for the consumer to indicate that its ready to go.
> consumer.waitUntilReady();
> consumerThread.join();
>
>
> AfxMessageBox("consumer waiting for the messages !");
> }
> catch ( CMSException& e )
> {
> e.printStackTrace();
> AfxMessageBox("ActiveMQConnection Consumer Factory Error !");
> }
>
>
> but i don't see any messages coming in. so please help in this issue.
>
> Regards
> venu
>
>
> --
> View this message in context:
http://n2.nabble.com/onMessage--event-in-C%2B%2B-never-raised.-tp1077315p1077315.html> Sent from the m-etc-dev mailing list archive at Nabble.com.
>
> _______________________________________________
> Marketcetera Developers mailing list
> Marketcetera Documentation:
http://trac.marketcetera.org> To unsubscribe, go to
>
http://lists.marketcetera.org/cgi-bin/mailman/listinfo/m-etc-dev or send an email to unsubscribe@marketcetera.com.
>
--
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.
_______________________________________________
Marketcetera Developers mailing list
Marketcetera Documentation:
http://trac.marketcetera.orgTo unsubscribe, go to
http://lists.marketcetera.org/cgi-bin/mailman/listinfo/m-etc-dev or send an email to unsubscribe@marketcetera.com.