You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by kirkal <bi...@gmail.com> on 2006/06/26 02:26:53 UTC

ActiveMQ remote broker problem!

hi! 

  I'm a relative newbie to  JMS. 

 would really like to know how to
connect to a remote ActiveMQ broker.

 i use the following line :

 ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("remote://tcp://remotehost:61616");

but i don't seem to be able to connect at all and the program goes ahead and
uses the embedded connection.

 please let me know how to configure activeMQ to use a remote broker.

 thanks!


  please let me know!
--
View this message in context: http://www.nabble.com/ActiveMQ-remote-broker-problem%21-t1846354.html#a5039866
Sent from the ActiveMQ - User forum at Nabble.com.


Re: ActiveMQ remote broker problem!

Posted by kirkal <bi...@gmail.com>.
hmmm...i tried that - does not work. any other suggestions?

any suggestions on how i could possibly check if the broker is visible /
check if any messages are being sent ?

do let me know.

thanks!


--
View this message in context: http://www.nabble.com/ActiveMQ-remote-broker-problem%21-t1846354.html#a5042118
Sent from the ActiveMQ - User forum at Nabble.com.


Re: ActiveMQ remote broker problem!

Posted by James Strachan <ja...@gmail.com>.
to connect to a remote broker in 4.x of ActiveMQ just use the tcp:// connector.

Try

 tcp://remotehost:61616

If that doesn't work - maybe DNS is not working for you; so try using
the IP address

tcp://1.2.3.4:61616

etc


On 6/26/06, kirkal <bi...@gmail.com> wrote:
>
> hi!
>
>   I'm a relative newbie to  JMS.
>
>  would really like to know how to
> connect to a remote ActiveMQ broker.
>
>  i use the following line :
>
>  ActiveMQConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory("remote://tcp://remotehost:61616");
>
> but i don't seem to be able to connect at all and the program goes ahead and
> uses the embedded connection.
>
>  please let me know how to configure activeMQ to use a remote broker.
>
>  thanks!
>
>
>   please let me know!
> --
> View this message in context: http://www.nabble.com/ActiveMQ-remote-broker-problem%21-t1846354.html#a5039866
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: ActiveMQ remote broker problem!

Posted by kirkal <bi...@gmail.com>.
hmmm...i don't get any exception messages...i printed out the message headers
as i was sending them and this is how my output looked after running my
program:

log4j:WARN No appenders could be found for logger
(org.activemq.broker.impl.BrokerContainerImpl).
log4j:WARN Please initialize the log4j system properly.
Sample application publishing a message to a topic.
TEST.FOO
ACTIVEMQ_TEXT_MESSAGE: id = 0 ActiveMQMessage{ , jmsMessageID =
ID:kubk-32780-1151305058623-12:2, bodyAsBytes = null, readOnlyMessage =
false, jmsClientID = 'null' , jmsCorrelationID = 'null' , jmsDestination =
TEST.FOO, jmsReplyTo = null, jmsDeliveryMode = 2, jmsRedelivered = false,
jmsType = 'null' , jmsExpiration = 0, jmsPriority = 4, jmsTimestamp =
1151305065184, properties = null, readOnlyProperties = false,
entryBrokerName = 'null' , entryClusterName = 'null' , consumerNos = null,
transactionId = 'null' , xaTransacted = false, consumerIdentifer = 'null' ,
messageConsumed = false, transientConsumed = false, sequenceNumber = 0,
deliveryCount = 1, dispatchedFromDLQ = false, messageAcknowledge = null,
jmsMessageIdentity = null, producerKey = null }, text = Hello world
Message published0TEST.FOO


where TEST.FOO is the topic i am attempting to send my messages to.


 PS: ok....showing how much of a newbie I am, how DO i check whether the
other machine is behind a firewall?

--
View this message in context: http://www.nabble.com/ActiveMQ-remote-broker-problem%21-t1846354.html#a5042933
Sent from the ActiveMQ - User forum at Nabble.com.


Re: ActiveMQ remote broker problem!

Posted by Jonas Lim <jl...@exist.com>.
You can use Activemq's jmx support to monitor  your remote broker

http://incubator.apache.org/activemq/jmx.html

Btw,  can you check that your remote broker is not behind a firewall. Also, 
do you get any exception message (broker or client) when sending the 
message?

Regards,
Jonas



----- Original Message ----- 
From: "kirkal" <bi...@gmail.com>
To: <ac...@geronimo.apache.org>
Sent: Monday, June 26, 2006 2:59 PM
Subject: Re: ActiveMQ remote broker problem!


>
> hmmm...i tried that - does not work. any other suggestions?
>
> any suggestions on how i could possibly check if the broker is visible /
> check if any messages are being sent ?
>
> do let me know.
>
> thanks!
>
> --
> View this message in context: 
> http://www.nabble.com/ActiveMQ-remote-broker-problem%21-t1846354.html#a5042371
> Sent from the ActiveMQ - User forum at Nabble.com. 


Re: ActiveMQ remote broker problem!

Posted by kirkal <bi...@gmail.com>.
hmmm...i tried that - does not work. any other suggestions?

any suggestions on how i could possibly check if the broker is visible /
check if any messages are being sent ?

do let me know.

thanks!

--
View this message in context: http://www.nabble.com/ActiveMQ-remote-broker-problem%21-t1846354.html#a5042371
Sent from the ActiveMQ - User forum at Nabble.com.


Re: ActiveMQ remote broker problem!

Posted by Jonas Lim <jl...@exist.com>.
Hi,

Try removing the "remote" in your url  (ie. tcp://remotehost:61616)

Btw,  more details on other transports here :
http://incubator.apache.org/activemq/configuring-transports.html


Regards,
Jonas

----- Original Message ----- 
From: "kirkal" <bi...@gmail.com>
To: <ac...@geronimo.apache.org>
Sent: Monday, June 26, 2006 8:26 AM
Subject: ActiveMQ remote broker problem!


>
> hi!
>
>  I'm a relative newbie to  JMS.
>
> would really like to know how to
> connect to a remote ActiveMQ broker.
>
> i use the following line :
>
> ActiveMQConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory("remote://tcp://remotehost:61616");
>
> but i don't seem to be able to connect at all and the program goes ahead 
> and
> uses the embedded connection.
>
> please let me know how to configure activeMQ to use a remote broker.
>
> thanks!
>
>
>  please let me know!
> --
> View this message in context: 
> http://www.nabble.com/ActiveMQ-remote-broker-problem%21-t1846354.html#a5039866
> Sent from the ActiveMQ - User forum at Nabble.com. 


Re: ActiveMQ remote broker problem!

Posted by Adrian Co <ac...@exist.com>.
Hi,

One common oversight is not starting the connection. Did you call 
connection.start()?

BTW, you might want to use AMQ 4.0.1 as it has more features and bug 
fixes. :)
http://www.activemq.org/site/activemq-401-release.html

Regards,
Adrian

kirkal wrote:
> hi! 
>
>   I'm a relative newbie to  JMS. 
>
>  would really like to know how to
> connect to a remote ActiveMQ broker.
>
>  i use the following line :
>
>  ActiveMQConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory("remote://tcp://remotehost:61616");
>
> but i don't seem to be able to connect at all and the program goes ahead and
> uses the embedded connection.
>
>  please let me know how to configure activeMQ to use a remote broker.
>
>  thanks!
>
>
>   please let me know!
> --
> View this message in context: http://www.nabble.com/ActiveMQ-remote-broker-problem%21-t1846354.html#a5039866
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>