You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Gary Jarrel <ga...@jarrel.com.au> on 2008/03/17 14:23:12 UTC

Deploying the Resource Adapter (was: Receipt of Simple Text Message)

Thank you for a quick answer James!

I have configured the application partly as per your instructions, in 
that I'm using another method to receive the messages, and converting 
them to JSM TextMessage to forward onto the ActiveMQ connector.

I have deployed the connector in Glassfish setting the only property: 
ServerUrl tcp://localhost:25001 and have made the message bean aware of 
the adapter. However when the server starts up, I am unable to connect 
to port 25001 (using simple telnet) and I notice the following message 
in the logs:

[2008-03-18 00:21:25,519] ERROR 
org.apache.activemq.ra.ActiveMQEndpointWorker 
(ActiveMQEndpointWorker.java:243) - Endpoint connection to JMS broker 
failed: Could not connect to broker URL: tcp://localhost:6969. Reason: 
java.net.ConnectException: Connection refused
[2008-03-18 00:21:25,519] ERROR 
org.apache.activemq.ra.ActiveMQEndpointWorker 
(ActiveMQEndpointWorker.java:244) - Endpoint will try to reconnect to 
the JMS broker in 30 seconds

Is there anything I'm missing here.

Please excuse the myriad of questions, I have spent quite some time 
reading all the docs and doing my research.

Thank you!

Gary

James Strachan wrote:
> On 17/03/2008, Gary Jarrel <ga...@jarrel.com.au> wrote:
>   
>> Hi All!
>>
>>  I've very new to ActiveMQ and my research so far has proven fruitless.
>>
>>  I need to be able to receive simple one line text messages from a remote server.
>>
>>  I do not have any control over this server hence I can not request any changes to the way the data is sent. The remote server basically connects to my server on an IP address and a port and sends one line text messages, end of each message is indicated by a new line character. Eg:
>>
>>  01,Sample1,-10
>>
>>  I can not seem to figure out a way to configure an ActiveMQ resource adapter to be able to handled this scenario. The remote server does not need and/or care whether our servers have received the message, it's a very simple system on the other end.
>>     
>
> So ActiveMQ is a message broker designed such that the clients either
> use the ActiveMQ JMS client or use one of the standard protocols to
> communicate with the ActiveMQ broker such as OpenWire, REST or STOMP.
>
> If you want to send or consume over custom wire protocols such as the
> one you describe then I'd recommend using Camel to do this & to route
> custom protocols to and from ActiveMQ.
> http://activemq.apache.org/camel/
>
>
> e.g. Camel comes with a MINA component that can be used to support
> custom socket protocols...
> http://activemq.apache.org/camel/mina.html
>
>
> So inside the broker you'd have a route something like...
>
> <camelContext ...>
>  <route>
>    <from uri="myMina:localhost:1234"/>
>    <to uri="activemq:MyQueue"/>
>   </route>
>  </camelContext>
>
>
>   
>>  I would ideally like to utilize the Active MQ resource adapter to receive these messages and forward them onto my message bean running inside a Glassfish server. The only important issue is that the message volumes can be quite high during peak periods, so the resource adapter needs to be able to queue the messages so that the server does not run out of resources.
>>     
>
> Once the message is actually on an ActiveMQ queue (e.g. using Camel)
> you'll then be able to use the AMQ RA if you wanna use MDBs or you
> could just use Spring's MessageListenerContainer stuff
>
>