You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by YM <yo...@cdiscount.com> on 2006/09/14 10:54:06 UTC
Beginner need help starting
Hi,
Here's the situation:
Whe are now using Websphere MQ to transfer files (text/binary) between 3
hosts (2 Windows, 1 Unix).
For example on one hand, a file is put in a "inbox" forler. It's then
transferred by MQ to a queue on a remote machine. A Shell/BAT script is used
on the remote machine to get the files/messages out of the queue and then
process them.
My problem is: I have no Idea of how to achieve this using ActiveMQ.
I successfully installed ActiveMQ on a Unix (Linux RHEL4) host, and can use
the provider/consumer sample, or launch a Broker. But as I'm new to this, I
don't know how to
. Configure a queue, and have a broker permanently accepting entries on the
queue - configure multiple queues
. Insert a file in the queue from host 1 to be sent on host 2
. Retrieve files from the queue
I've tried using HermesJMS (v1.10). It's working locally, but can't find how
to set up the "remote" thig. And furthermore, it can't be automated or
scripted, which is not good for me.
I've tried ServiceMix, but I don't think it's the right thing.
I've tried to setup the WebConsole, but it won't work : throws lots of
errors though Maven 2.0.4 is installed.
I haven't been able to find any info in the Documentation (nor anywhere
else), no tutorials, anything.
So would you please guide me, at least on the general steps I'll have to do
to have something as functionnal (and simple) to use as WebSphere MQ ?
Thanks in advance,
YM
--
View this message in context: http://www.nabble.com/Beginner-need-help-starting-tf2270359.html#a6301776
Sent from the ActiveMQ - User forum at Nabble.com.
Re: Beginner need help starting
Posted by James Strachan <ja...@gmail.com>.
On 9/15/06, YM <yo...@cdiscount.com> wrote:
>
> Ok, so now all I have to do is learn Java, create the sender program and then
> the reader program. Great, absolutely fabulous.
>
> Do you actually mean that I'll have to build the code from scratch? That
> nowhere can be found any already built code that do that?
There are pre-packaged examples that ship with ActiveMQ that you can
use for sending and receiving messages - though the examples don't use
the JMS streams feature.
--
James
-------
http://radio.weblogs.com/0112098/
Re: Beginner need help starting
Posted by YM <yo...@cdiscount.com>.
Ok, so now all I have to do is learn Java, create the sender program and then
the reader program. Great, absolutely fabulous.
Do you actually mean that I'll have to build the code from scratch? That
nowhere can be found any already built code that do that?
Thanks,
YM
James.Strachan wrote:
>
> On 9/14/06, YM <yo...@cdiscount.com> wrote:
>>
>> Ok, great!
>>
>> Now I set a queue up and the broker is working.
>> What's the next step? ;)
>>
>> Where is the binary used to send a file to a host on a queue?
>> And where is the binary to get the sent file from the queue and write it
>> on
>> a local path?
>
> Instructions on sending & receiving files via code is here...
>
> http://incubator.apache.org/activemq/jms-streams.html
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>
--
View this message in context: http://www.nabble.com/Beginner-need-help-starting-tf2270359.html#a6326376
Sent from the ActiveMQ - User forum at Nabble.com.
Re: Beginner need help starting
Posted by James Strachan <ja...@gmail.com>.
On 9/14/06, YM <yo...@cdiscount.com> wrote:
>
> Ok, great!
>
> Now I set a queue up and the broker is working.
> What's the next step? ;)
>
> Where is the binary used to send a file to a host on a queue?
> And where is the binary to get the sent file from the queue and write it on
> a local path?
Instructions on sending & receiving files via code is here...
http://incubator.apache.org/activemq/jms-streams.html
--
James
-------
http://radio.weblogs.com/0112098/
Re: Beginner need help starting
Posted by YM <yo...@cdiscount.com>.
Ok, great!
Now I set a queue up and the broker is working.
What's the next step? ;)
Where is the binary used to send a file to a host on a queue?
And where is the binary to get the sent file from the queue and write it on
a local path?
Thanks,
YM
Adrian Co wrote:
>
> Sorry, forgot to mention that this would only work for ActiveMQ 4.1. Try
> downloading and building it from source:
> https://svn.apache.org/repos/asf/incubator/activemq/trunk/
>
> YM wrote:
>> Thanks for your reply.
>> When I use some default sample broker initialization file, the broker
>> starts. But as soon as I want to define a queue or topic, it fails.
>>
>> myBroker2.xml:
>> <beans>
>>
>> <bean
>> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
>> />
>>
>> <broker xmlns="http://activemq.org/config/1.0">
>> <destinations>
>> <queue physicalName="FOO.BAR" />
>> <topic physicalName="SOME.TOPIC" />
>> </destinations>
>>
>> </broker>
>>
>> </beans>
>>
>>
>> Startup of activemq:
>> [root@hostname activemq]# activemq
>> xbean:file:$ACTIVEMQ_HOME/myBroker2.xml
>> ACTIVEMQ_HOME: /usr/local/activemq
>> Loading message broker from: xbean:file:/usr/local/activemq/myBroker2.xml
>> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean
>> with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in URL
>> [file:/usr/local/activemq/myBroker2.xml]: Error setting property values;
>> nested exception is
>> org.springframework.beans.NotWritablePropertyException:
>> Invalid property 'destinations' of bean class
>> [org.apache.activemq.xbean.XBeanBrokerService]: Bean property
>> 'destinations'
>> is not writable or has an invalid setter method: Does the parameter type
>> of
>> the setter match the return type of the getter?
>> ERROR: java.lang.Exception:
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean
>> with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in URL
>> [file:/usr/local/activemq/myBroker2.xml]: Error setting property values;
>> nested exception is
>> org.springframework.beans.NotWritablePropertyException:
>> Invalid property 'destinations' of bean class
>> [org.apache.activemq.xbean.XBeanBrokerService]: Bean property
>> 'destinations'
>> is not writable or has an invalid setter method: Does the parameter type
>> of
>> the setter match the return type of the getter?
>>
>> Any Idea?
>>
>> Thanks,
>>
>> YM
>>
>>
>>
>> Adrian Co wrote:
>>
>>> Hi,
>>>
>>> You can try:
>>> http://www.activemq.org/site/getting-started.html
>>> http://www.activemq.org/site/hello-world.html
>>>
>>> I don't know if I understood your scenario, but you could try starting a
>>> broker in one machine, and just have JMS clients on the other machines.
>>> You can configure queues statically if you want refer to:
>>> http://www.activemq.org/site/configure-startup-destinations.html
>>>
>>> You can use JMS text messages, stream messages, or object messages
>>> depending on the data you want to transfer.
>>>
>>> Hope any of these helps.
>>>
>>>
>>> YM wrote:
>>>
>>>> Hi,
>>>>
>>>> Here's the situation:
>>>> Whe are now using Websphere MQ to transfer files (text/binary) between
>>>> 3
>>>> hosts (2 Windows, 1 Unix).
>>>> For example on one hand, a file is put in a "inbox" forler. It's then
>>>> transferred by MQ to a queue on a remote machine. A Shell/BAT script is
>>>> used
>>>> on the remote machine to get the files/messages out of the queue and
>>>> then
>>>> process them.
>>>>
>>>> My problem is: I have no Idea of how to achieve this using ActiveMQ.
>>>>
>>>> I successfully installed ActiveMQ on a Unix (Linux RHEL4) host, and can
>>>> use
>>>> the provider/consumer sample, or launch a Broker. But as I'm new to
>>>> this,
>>>> I
>>>> don't know how to
>>>> . Configure a queue, and have a broker permanently accepting entries on
>>>> the
>>>> queue - configure multiple queues
>>>> . Insert a file in the queue from host 1 to be sent on host 2
>>>> . Retrieve files from the queue
>>>>
>>>> I've tried using HermesJMS (v1.10). It's working locally, but can't
>>>> find
>>>> how
>>>> to set up the "remote" thig. And furthermore, it can't be automated or
>>>> scripted, which is not good for me.
>>>> I've tried ServiceMix, but I don't think it's the right thing.
>>>> I've tried to setup the WebConsole, but it won't work : throws lots of
>>>> errors though Maven 2.0.4 is installed.
>>>>
>>>> I haven't been able to find any info in the Documentation (nor anywhere
>>>> else), no tutorials, anything.
>>>>
>>>> So would you please guide me, at least on the general steps I'll have
>>>> to
>>>> do
>>>> to have something as functionnal (and simple) to use as WebSphere MQ ?
>>>>
>>>> Thanks in advance,
>>>>
>>>> YM
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
>
--
View this message in context: http://www.nabble.com/Beginner-need-help-starting-tf2270359.html#a6303186
Sent from the ActiveMQ - User forum at Nabble.com.
Re: Beginner need help starting
Posted by Adrian Co <ac...@exist.com>.
Sorry, forgot to mention that this would only work for ActiveMQ 4.1. Try
downloading and building it from source:
https://svn.apache.org/repos/asf/incubator/activemq/trunk/
YM wrote:
> Thanks for your reply.
> When I use some default sample broker initialization file, the broker
> starts. But as soon as I want to define a queue or topic, it fails.
>
> myBroker2.xml:
> <beans>
>
> <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
> />
>
> <broker xmlns="http://activemq.org/config/1.0">
> <destinations>
> <queue physicalName="FOO.BAR" />
> <topic physicalName="SOME.TOPIC" />
> </destinations>
>
> </broker>
>
> </beans>
>
>
> Startup of activemq:
> [root@hostname activemq]# activemq xbean:file:$ACTIVEMQ_HOME/myBroker2.xml
> ACTIVEMQ_HOME: /usr/local/activemq
> Loading message broker from: xbean:file:/usr/local/activemq/myBroker2.xml
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in URL
> [file:/usr/local/activemq/myBroker2.xml]: Error setting property values;
> nested exception is org.springframework.beans.NotWritablePropertyException:
> Invalid property 'destinations' of bean class
> [org.apache.activemq.xbean.XBeanBrokerService]: Bean property 'destinations'
> is not writable or has an invalid setter method: Does the parameter type of
> the setter match the return type of the getter?
> ERROR: java.lang.Exception:
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in URL
> [file:/usr/local/activemq/myBroker2.xml]: Error setting property values;
> nested exception is org.springframework.beans.NotWritablePropertyException:
> Invalid property 'destinations' of bean class
> [org.apache.activemq.xbean.XBeanBrokerService]: Bean property 'destinations'
> is not writable or has an invalid setter method: Does the parameter type of
> the setter match the return type of the getter?
>
> Any Idea?
>
> Thanks,
>
> YM
>
>
>
> Adrian Co wrote:
>
>> Hi,
>>
>> You can try:
>> http://www.activemq.org/site/getting-started.html
>> http://www.activemq.org/site/hello-world.html
>>
>> I don't know if I understood your scenario, but you could try starting a
>> broker in one machine, and just have JMS clients on the other machines.
>> You can configure queues statically if you want refer to:
>> http://www.activemq.org/site/configure-startup-destinations.html
>>
>> You can use JMS text messages, stream messages, or object messages
>> depending on the data you want to transfer.
>>
>> Hope any of these helps.
>>
>>
>> YM wrote:
>>
>>> Hi,
>>>
>>> Here's the situation:
>>> Whe are now using Websphere MQ to transfer files (text/binary) between 3
>>> hosts (2 Windows, 1 Unix).
>>> For example on one hand, a file is put in a "inbox" forler. It's then
>>> transferred by MQ to a queue on a remote machine. A Shell/BAT script is
>>> used
>>> on the remote machine to get the files/messages out of the queue and then
>>> process them.
>>>
>>> My problem is: I have no Idea of how to achieve this using ActiveMQ.
>>>
>>> I successfully installed ActiveMQ on a Unix (Linux RHEL4) host, and can
>>> use
>>> the provider/consumer sample, or launch a Broker. But as I'm new to this,
>>> I
>>> don't know how to
>>> . Configure a queue, and have a broker permanently accepting entries on
>>> the
>>> queue - configure multiple queues
>>> . Insert a file in the queue from host 1 to be sent on host 2
>>> . Retrieve files from the queue
>>>
>>> I've tried using HermesJMS (v1.10). It's working locally, but can't find
>>> how
>>> to set up the "remote" thig. And furthermore, it can't be automated or
>>> scripted, which is not good for me.
>>> I've tried ServiceMix, but I don't think it's the right thing.
>>> I've tried to setup the WebConsole, but it won't work : throws lots of
>>> errors though Maven 2.0.4 is installed.
>>>
>>> I haven't been able to find any info in the Documentation (nor anywhere
>>> else), no tutorials, anything.
>>>
>>> So would you please guide me, at least on the general steps I'll have to
>>> do
>>> to have something as functionnal (and simple) to use as WebSphere MQ ?
>>>
>>> Thanks in advance,
>>>
>>> YM
>>>
>>>
>>>
>>
>>
>
>
Re: Beginner need help starting
Posted by YM <yo...@cdiscount.com>.
Thanks for your reply.
When I use some default sample broker initialization file, the broker
starts. But as soon as I want to define a queue or topic, it fails.
myBroker2.xml:
<beans>
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
/>
<broker xmlns="http://activemq.org/config/1.0">
<destinations>
<queue physicalName="FOO.BAR" />
<topic physicalName="SOME.TOPIC" />
</destinations>
</broker>
</beans>
Startup of activemq:
[root@hostname activemq]# activemq xbean:file:$ACTIVEMQ_HOME/myBroker2.xml
ACTIVEMQ_HOME: /usr/local/activemq
Loading message broker from: xbean:file:/usr/local/activemq/myBroker2.xml
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in URL
[file:/usr/local/activemq/myBroker2.xml]: Error setting property values;
nested exception is org.springframework.beans.NotWritablePropertyException:
Invalid property 'destinations' of bean class
[org.apache.activemq.xbean.XBeanBrokerService]: Bean property 'destinations'
is not writable or has an invalid setter method: Does the parameter type of
the setter match the return type of the getter?
ERROR: java.lang.Exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in URL
[file:/usr/local/activemq/myBroker2.xml]: Error setting property values;
nested exception is org.springframework.beans.NotWritablePropertyException:
Invalid property 'destinations' of bean class
[org.apache.activemq.xbean.XBeanBrokerService]: Bean property 'destinations'
is not writable or has an invalid setter method: Does the parameter type of
the setter match the return type of the getter?
Any Idea?
Thanks,
YM
Adrian Co wrote:
>
> Hi,
>
> You can try:
> http://www.activemq.org/site/getting-started.html
> http://www.activemq.org/site/hello-world.html
>
> I don't know if I understood your scenario, but you could try starting a
> broker in one machine, and just have JMS clients on the other machines.
> You can configure queues statically if you want refer to:
> http://www.activemq.org/site/configure-startup-destinations.html
>
> You can use JMS text messages, stream messages, or object messages
> depending on the data you want to transfer.
>
> Hope any of these helps.
>
>
> YM wrote:
>> Hi,
>>
>> Here's the situation:
>> Whe are now using Websphere MQ to transfer files (text/binary) between 3
>> hosts (2 Windows, 1 Unix).
>> For example on one hand, a file is put in a "inbox" forler. It's then
>> transferred by MQ to a queue on a remote machine. A Shell/BAT script is
>> used
>> on the remote machine to get the files/messages out of the queue and then
>> process them.
>>
>> My problem is: I have no Idea of how to achieve this using ActiveMQ.
>>
>> I successfully installed ActiveMQ on a Unix (Linux RHEL4) host, and can
>> use
>> the provider/consumer sample, or launch a Broker. But as I'm new to this,
>> I
>> don't know how to
>> . Configure a queue, and have a broker permanently accepting entries on
>> the
>> queue - configure multiple queues
>> . Insert a file in the queue from host 1 to be sent on host 2
>> . Retrieve files from the queue
>>
>> I've tried using HermesJMS (v1.10). It's working locally, but can't find
>> how
>> to set up the "remote" thig. And furthermore, it can't be automated or
>> scripted, which is not good for me.
>> I've tried ServiceMix, but I don't think it's the right thing.
>> I've tried to setup the WebConsole, but it won't work : throws lots of
>> errors though Maven 2.0.4 is installed.
>>
>> I haven't been able to find any info in the Documentation (nor anywhere
>> else), no tutorials, anything.
>>
>> So would you please guide me, at least on the general steps I'll have to
>> do
>> to have something as functionnal (and simple) to use as WebSphere MQ ?
>>
>> Thanks in advance,
>>
>> YM
>>
>>
>
>
>
--
View this message in context: http://www.nabble.com/Beginner-need-help-starting-tf2270359.html#a6302504
Sent from the ActiveMQ - User forum at Nabble.com.
Re: Beginner need help starting
Posted by Adrian Co <ac...@exist.com>.
Hi,
You can try:
http://www.activemq.org/site/getting-started.html
http://www.activemq.org/site/hello-world.html
I don't know if I understood your scenario, but you could try starting a
broker in one machine, and just have JMS clients on the other machines.
You can configure queues statically if you want refer to:
http://www.activemq.org/site/configure-startup-destinations.html
You can use JMS text messages, stream messages, or object messages
depending on the data you want to transfer.
Hope any of these helps.
YM wrote:
> Hi,
>
> Here's the situation:
> Whe are now using Websphere MQ to transfer files (text/binary) between 3
> hosts (2 Windows, 1 Unix).
> For example on one hand, a file is put in a "inbox" forler. It's then
> transferred by MQ to a queue on a remote machine. A Shell/BAT script is used
> on the remote machine to get the files/messages out of the queue and then
> process them.
>
> My problem is: I have no Idea of how to achieve this using ActiveMQ.
>
> I successfully installed ActiveMQ on a Unix (Linux RHEL4) host, and can use
> the provider/consumer sample, or launch a Broker. But as I'm new to this, I
> don't know how to
> . Configure a queue, and have a broker permanently accepting entries on the
> queue - configure multiple queues
> . Insert a file in the queue from host 1 to be sent on host 2
> . Retrieve files from the queue
>
> I've tried using HermesJMS (v1.10). It's working locally, but can't find how
> to set up the "remote" thig. And furthermore, it can't be automated or
> scripted, which is not good for me.
> I've tried ServiceMix, but I don't think it's the right thing.
> I've tried to setup the WebConsole, but it won't work : throws lots of
> errors though Maven 2.0.4 is installed.
>
> I haven't been able to find any info in the Documentation (nor anywhere
> else), no tutorials, anything.
>
> So would you please guide me, at least on the general steps I'll have to do
> to have something as functionnal (and simple) to use as WebSphere MQ ?
>
> Thanks in advance,
>
> YM
>
>