Re: How to send a textMessage to an exising queue (destination)

2011-05-02 Thread Aleksandar Ivanisevic
mruan writes: > Thanks Aleksandar! Tim suggested similar solution yesterday, and I tried ... > I'll try again. Now I hope that you guys understand what I want, and do you > still think that nobody needs to do like this? Unfortunately, very few programmers think like you do. If they mistype a nam

Re: How to send a textMessage to an exising queue (destination)

2011-04-29 Thread mruan
Thanks Aleksandar! Tim suggested similar solution yesterday, and I tried ... I'll try again. Now I hope that you guys understand what I want, and do you still think that nobody needs to do like this? The new suggestions of Tim seem OK to me as well, though they are new for me, I'll try them as well

Re: How to send a textMessage to an exising queue (destination)

2011-04-29 Thread Aleksandar Ivanisevic
mruan writes: > What I want is to modify some code (e.g. built-in checks) in the function > f() so that when the second case happens, the function will NOT create the > wrong queue. > > I hope that I am now clear to you. You will have to precreate the destinations (http://activemq.apache.org/con

Re: How to send a textMessage to an exising queue (destination)

2011-04-29 Thread Timothy Bish
On Fri, 2011-04-29 at 07:42 -0700, mruan wrote: > Something like this: > > f(string &queuename, string &text) > { > ... > if (queueName Existing) // is it possible to check if a queue exists in > the session??? >destination = session->createQueue( queueName ); > else > // queue do

Re: How to send a textMessage to an exising queue (destination)

2011-04-29 Thread mruan
Something like this: f(string &queuename, string &text) { ... if (queueName Existing) // is it possible to check if a queue exists in the session??? destination = session->createQueue( queueName ); else // queue does not exist, something wrong return; producer = session

Re: How to send a textMessage to an exising queue (destination)

2011-04-29 Thread mruan
"So are you asking why you have to call 'createQueue' on the client side?" --> YES! "If I understand what you asking then calling the createQueue doesn't create a new one if there's already on there that matches the name you've given it, it just create the local representation of the queue object

Re: How to send a textMessage to an exising queue (destination)

2011-04-29 Thread Timothy Bish
On Fri, 2011-04-29 at 06:40 -0700, mruan wrote: > Then it's will be very strange indeed that nobody needs to do what I am > supposed to do. Why do we have to create a queue in order to send a message > even if the queue exists already? > > I study the faq's carefully which Tim told me to do, but I

Re: How to send a textMessage to an exising queue (destination)

2011-04-29 Thread mruan
Then it's will be very strange indeed that nobody needs to do what I am supposed to do. Why do we have to create a queue in order to send a message even if the queue exists already? I study the faq's carefully which Tim told me to do, but I am sorry that I still don't find the solution. Put the pr

Re: How to send a textMessage to an exising queue (destination)

2011-04-29 Thread Oscar Pernas
Hi Ming, I think that nobody needs to do something like this because, guessing about your problem, you could be trying to dont allow to send messages to a queue/topic, if you have no consumer of the same one? (the consumer creates the queue/topic). is it? (if I'm wrong sorry) One of the features

Re: How to send a textMessage to an exising queue (destination)

2011-04-28 Thread Timothy Bish
On Thu, 2011-04-28 at 07:43 -0700, mruan wrote: > Thank you very much! In fact I read a lot of your posts on activeMQ. > > I'm sorry that I still cannot find the solution by reading the faq. I hope > that you understand what I want: just send a textMessage to an existing > queue, that's it. Now t

Re: How to send a textMessage to an exising queue (destination)

2011-04-28 Thread mruan
Thank you very much! In fact I read a lot of your posts on activeMQ. I'm sorry that I still cannot find the solution by reading the faq. I hope that you understand what I want: just send a textMessage to an existing queue, that's it. Now the situation is as follows: - if the queue does exist, no

Re: How to send a textMessage to an exising queue (destination)

2011-04-28 Thread Timothy Bish
On Thu, 2011-04-28 at 07:19 -0700, mruan wrote: > I’m new here! > > I am using activeMQ-CPP to develop an application in C++. > > As you may know that we can send a textMessage to an queue, in most case we > use the following code: > > > -Destination *destination = session->createQueue(