You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Gaya3 <wa...@hotmail.com> on 2012/02/05 06:56:00 UTC

Active MQ C program Doubt

Hi Experts

   What is the API to check /verify the queue is existing or not in the
Active MQ.

    CreateQueue API is always creating the queue, are there any options to
avoid this.

 Regards
Gayathri

--
View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-C-program-Doubt-tp4358480p4358480.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Active MQ C program Doubt

Posted by Gaya3 <wa...@hotmail.com>.
great, i tried it, its working, still i am fire fighting with ActiveMQ c
program APIs

1. There is no option to browse the queue in AMQ C API
2. Not clear about how to set the client ID and get Client ID, its throwing
error while i am trying to set it and try to get it.

Please help on this regard.

Regards
Gayathri

--
View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-C-program-Doubt-tp4358480p4369125.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Active MQ C program Doubt

Posted by Gary Tully <ga...@gmail.com>.
security is configured on the broker so it is client agnostic.
see: http://activemq.apache.org/security.html

google really is your friend here :-)

On 7 February 2012 03:37, Gaya3 <wa...@hotmail.com> wrote:
> Thanks gtully,
>
> here the challenge is i'm using AMQ C APIs for sending and receiving
> messages are there options available, i persume the security options are
> available only for JMS / Java based.
>
> Please advice on this regard, let me know some links which can help me.
>
> Regards
> Gayathri
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-C-program-Doubt-tp4358480p4363665.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
http://fusesource.com
http://blog.garytully.com

Re: Active MQ C program Doubt

Posted by Gaya3 <wa...@hotmail.com>.
Thanks gtully,

here the challenge is i'm using AMQ C APIs for sending and receiving
messages are there options available, i persume the security options are
available only for JMS / Java based.

Please advice on this regard, let me know some links which can help me.

Regards
Gayathri

--
View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-C-program-Doubt-tp4358480p4363665.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Active MQ C program Doubt

Posted by Gary Tully <ga...@gmail.com>.
http://activemq.apache.org/how-do-i-create-new-destinations.html

On 5 February 2012 05:56, Gaya3 <wa...@hotmail.com> wrote:
> Hi Experts
>
>   What is the API to check /verify the queue is existing or not in the
> Active MQ.
>
>    CreateQueue API is always creating the queue, are there any options to
> avoid this.
>
>  Regards
> Gayathri
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-C-program-Doubt-tp4358480p4358480.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
http://fusesource.com
http://blog.garytully.com

Re: How to create temporary topic without blocking?

Posted by Aleksi Kallio <al...@csc.fi>.
Thanks! So there is no way to have both long and short timeouts in one 
connection?

I would like to keep the infinite failover, but then for certain API 
calls, have it fail immediately if connection is lost.


On 2012-02-06 17:06, Timothy Bish wrote:
> You need to use the Failover transport options to configure the
> transport to fail after some amount of time, the timeout option will let
> you do that, see:
>
> http://activemq.apache.org/failover-transport-reference.html
>
>
>
> On Mon, 2012-02-06 at 10:51 +0200, Aleksi Kallio wrote:
>> Hi,
>>
>> We have client apps connecting to our server environment using ActiveMQ,
>> with failover enabled. Our users can have the app open on a laptop while
>> moving from one network to another or to a completely unconnected place.
>>
>> ActiveMQ does beautiful failover, keeping the system running between
>> network connections. However there are certain cases when we would like
>> to use our own "failover mechanism".
>>
>> To do that, we would need to be able to check connection state or have
>> an exception thrown when connection is not active. Now when you try to
>> send a message and create a temporary reply topic without network
>> connection it hangs on session.createTemporaryTopic().
>>
>> How to not block on session.createTemporaryTopic() when the network is
>> disconnected?
>>
>> I tried setting useAsyncSend to true and checking
>> connection.isTransportFailed() before calling createTemporaryTopic(),
>> but neither of them helped.
>>
>> Creating a throwaway thread for the send attempt is a solution, but a
>> very crude one.
>>
>> All the best,
>> Aleksi
>>
>

Re: How to create temporary topic without blocking?

Posted by Timothy Bish <ta...@gmail.com>.
You need to use the Failover transport options to configure the
transport to fail after some amount of time, the timeout option will let
you do that, see:

http://activemq.apache.org/failover-transport-reference.html



On Mon, 2012-02-06 at 10:51 +0200, Aleksi Kallio wrote: 
> Hi,
> 
> We have client apps connecting to our server environment using ActiveMQ, 
> with failover enabled. Our users can have the app open on a laptop while 
> moving from one network to another or to a completely unconnected place.
> 
> ActiveMQ does beautiful failover, keeping the system running between 
> network connections. However there are certain cases when we would like 
> to use our own "failover mechanism".
> 
> To do that, we would need to be able to check connection state or have 
> an exception thrown when connection is not active. Now when you try to 
> send a message and create a temporary reply topic without network 
> connection it hangs on session.createTemporaryTopic().
> 
> How to not block on session.createTemporaryTopic() when the network is 
> disconnected?
> 
> I tried setting useAsyncSend to true and checking 
> connection.isTransportFailed() before calling createTemporaryTopic(), 
> but neither of them helped.
> 
> Creating a throwaway thread for the send attempt is a solution, but a 
> very crude one.
> 
> All the best,
> Aleksi
> 

-- 
Tim Bish
Sr Software Engineer | FuseSource Corp
tim.bish@fusesource.com | www.fusesource.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


How to create temporary topic without blocking?

Posted by Aleksi Kallio <al...@csc.fi>.
Hi,

We have client apps connecting to our server environment using ActiveMQ, 
with failover enabled. Our users can have the app open on a laptop while 
moving from one network to another or to a completely unconnected place.

ActiveMQ does beautiful failover, keeping the system running between 
network connections. However there are certain cases when we would like 
to use our own "failover mechanism".

To do that, we would need to be able to check connection state or have 
an exception thrown when connection is not active. Now when you try to 
send a message and create a temporary reply topic without network 
connection it hangs on session.createTemporaryTopic().

How to not block on session.createTemporaryTopic() when the network is 
disconnected?

I tried setting useAsyncSend to true and checking 
connection.isTransportFailed() before calling createTemporaryTopic(), 
but neither of them helped.

Creating a throwaway thread for the send attempt is a solution, but a 
very crude one.

All the best,
Aleksi