On 10/03/2013 05:16 AM, Rajesh Khan wrote:
Sure here is how I create multiple topics

     Void CreateDynamicTopic(int con)
     {
     std::string queue_name = std::string("amq.topic/")  + "Symbol_Topic_" +
boost::lexical_cast<std::string>(con);
     std::string sender_string =  queue_name +";{node:{type:topic}}";
     connection = qpid::messaging::Connection("127.0.0.1");
     connection.open();
     connection.setOption("tcp-nodelay", true);
     Session session  = connection.createSession();
     sender = session.createSender(sender_string) ;
     sender.setCapacity(sender_capacity);
     }


     for(int i=0 ; i<900;i++)
     {
       CreateDynamicQueue(i)
     }

I wanted to know if there could be a faster way that I could just pass a
whole list to Qpid and it creates topics from that list

It's not actually 'creating' topics, it is just creating senders for the amq.topic topic, each with a specific default subject.

So you could just create one sender to amq.topic, and then set the subject of each message you send out.

Not sure if that answers the wider question or not, however(?).


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to