Re: [NMS] download of Spring.Messaging.Nms available

2007-04-03 Thread sparky2708

Would it be possible to provide some example like you guys did for
ActiveMQ.NET. I didn't see any examples on the website for Spring.NET or in
the zip file that I downloaded. Just looking for some quick start
documentation -- a sample async subscriber, a sample publisher and I can
take it from there...


James.Strachan wrote:
> 
> On 4/3/07, sparky2708 <[EMAIL PROTECTED]> wrote:
>>
>> How is this different from the NMS that used to be provided by ActiveMQ?
> 
> It uses the NMS from ActiveMQ; its a utility layer above NMS. So if
> you're aware of Spring and Java, think NMS is like JMS (along with
> providers) and Spring.Messaging.Nms is like the JMS classes in Spring
> like JmsTemplate and the MessageListenerContainer stuff.
> 
>>  Does
>> this support failover URLS?
> 
> NMS still does not support failover URLs yet.
> -- 
> 
> James
> ---
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-NMS--download-of-Spring.Messaging.Nms-available-tf3481248s2354.html#a9821460
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Re: [NMS] download of Spring.Messaging.Nms available

2007-04-03 Thread sparky2708

How is this different from the NMS that used to be provided by ActiveMQ? Does
this support failover URLS?


James.Strachan wrote:
> 
> For folks using .Net with ActiveMQ we highly recommend the use of
> Spring.Messaging.Nms for working with NMS.
> 
> You can grab a binary download here...
> http://www.springframework.net/downloads/Spring.Messaging.Nms/
> 
> For more on NMS see
> http://www.springframework.net/downloads/Spring.Messaging.Nms/
> -- 
> 
> James
> ---
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-NMS--download-of-Spring.Messaging.Nms-available-tf3481248s2354.html#a9820366
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Re: [NMS] download of Spring.Messaging.Nms available

2007-04-03 Thread James Strachan

On 4/3/07, sparky2708 <[EMAIL PROTECTED]> wrote:


How is this different from the NMS that used to be provided by ActiveMQ?


It uses the NMS from ActiveMQ; its a utility layer above NMS. So if
you're aware of Spring and Java, think NMS is like JMS (along with
providers) and Spring.Messaging.Nms is like the JMS classes in Spring
like JmsTemplate and the MessageListenerContainer stuff.


 Does
this support failover URLS?


NMS still does not support failover URLs yet.
--

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


Re: How do I delete a queue or topic that I no longer need?

2007-04-03 Thread sparky2708

Found the easy answer to this question:

In your activemq.xml file put:


Run JCONSOLE from your java directory.

TO REMOVE A TOPIC/QUEUE:
(1) In the MBEANS tab under org.apache.activemq there will be something
called "BROKER" (sometimes under master if you have master/slave setup)
(2) Click on the tab "Operations"
(3) Invoke the method "Remove Topic" with the topic name as the argument

Thanks for everyone's help!


bsnyder wrote:
> 
> On 4/2/07, sparky2708 <[EMAIL PROTECTED]> wrote:
>>
>> How do I delete a queue or topic that I no longer need? Can I do this
>> through
>> JConsole? If not, how?
> 
> This functionality is available via the JMX APIs in ActiveMQ. Attached
> is a very small project that includes functionality to query for a
> topic and then remove it. I think the list disallows attachments, so
> I'll also CC you directly so you receive the attachment.
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E );'
> 
> Apache Geronimo - http://geronimo.apache.org/
> Apache ActiveMQ - http://activemq.org/
> Apache ServiceMix - http://servicemix.org/
> Castor - http://castor.org/
> 
>  
> 

-- 
View this message in context: 
http://www.nabble.com/How-do-I-delete-a-queue-or-topic-that-I-no-longer-need--tf3507018s2354.html#a9820364
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Re: Java Heap Space Exception

2007-04-03 Thread Karthik.Gopalakrishnan

Hi 
   I am able to get ActiveMQBytesMessage from the c#
client(with openwire) successfully. But when i try sending a
ActiveMQTextMessage from the c# client i am getting that java heap space
problem even though this is a small string which has been .I dont think
something has to be modified in the Heap Space of JBoss JVM(though i tried
increasing it ).I think its something to do with the OpenWire protocol being
used in the c# client that prevents the ActiveMQTextMessage being sent.If
anyone has faced such a problem please let help me on how to solve this
issue.

   Has anyone used C# client to send a
ActiveMQTextMessage properly to ActiveMQ using openwire.






Karthik.Gopalakrishnan wrote:
> 
> I tried setting that but was not helping me solve the issue. I guess its
> something specific to the openwire protocol being used 
> 
> 
> James.Strachan wrote:
>> 
>> Try setting a bigger heap for running jboss?
>> 
>> On 3/29/07, Karthik.Gopalakrishnan <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> I tried sending a ByteMessage from a c# client to a java consumer(MDB
>>> which
>>> listens on the queue) and it works completely file . But when i send a
>>> TextMessage from the same c# producer to a java consumer i get the
>>> following
>>> exception
>>>
>>> 15:21:19,542 ERROR [ActiveMQSession] error dispatching message:
>>> javax.ejb.TransactionRolledbackLocalException: Unexpected Error
>>> java.lang.OutOfMemoryError: Java heap space
>>>
>>> at
>>> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:262)
>>> at
>>> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
>>> at
>>> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
>>> at
>>> org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
>>> at
>>> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
>>> at
>>> org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
>>> at
>>> org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
>>> at org.jboss.ejb.Container.invoke(Container.java:954)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:585)
>>> at
>>> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>>> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>>> at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
>>> at
>>> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>>> at
>>> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>>> at
>>> org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
>>> at
>>> org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
>>> at
>>> org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:206)
>>> at
>>> org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:192)
>>> at
>>> org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
>>> at
>>> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(MessageEndpointInterceptor.java:252)
>>> at
>>> org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor.java:132)
>>> at
>>> org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
>>> at
>>> org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
>>> at $Proxy56.onMessage(Unknown Source)
>>> at
>>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
>>> at
>>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
>>> at
>>> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
>>> at
>>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
>>> at
>>> org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
>>> at
>>> org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
>>> at
>>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
>>> at java.lang.Thread.run(Thread.java:595)
>>> Caused by: javax.ejb.EJBException: Unexpected Error
>>> java.lang.OutOfMemoryError: Java heap space
>>>
>>> I dont get any problem when i try to send a TextMessage from a java
>>> producer
>>> to the MDB. My guesses are that the OpenWire protocol

RE: spring and activemq

2007-04-03 Thread Garner, Shawn
No, 4.1 was the best available download when I downloaded it a few days
ago.
I wouldn't think there should be that much difference between a minor
minor version.

I got it working using regular spring bean file instead of the xbean as
the example was.

I don't really have time to redownload 4.1.1 and try it out.


Shawn

-Original Message-
From: James Strachan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 03, 2007 2:37 AM
To: users@activemq.apache.org
Subject: Re: spring and activemq

You tried 4.1.1?

On 4/2/07, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> ActiveMQ 4.1
>
> Shawn
>
> -Original Message-
> From: James Strachan [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 02, 2007 3:08 AM
> To: users@activemq.apache.org
> Subject: Re: spring and activemq
>
> Which version were  you using?
>
> On 3/29/07, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > I'm having problems getting the example spring file to load:
> >
> >
> >
> > http://activemq.apache.org/spring-support.html
> >
> >
> >
> > 007-03-29 15:19:23,662 [main] ERROR
> >
>
org.springframework.web.context.ContextLoader:initWebApplicationContext:
> > 205  - Context initialization failed
> >
> > org.springframework.beans.factory.BeanDefinitionStoreException: Line
> 11
> > in XML document from ServletContext resource
> > [/WEB-INF/config-spring/applicationContext-jms.xml] is invalid;
nested
> > exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.b:
> The
> > content of element 'amq:transportConnector' is not complete. One of
> > '{"http://activemq.org/config/1.0":broker,
> > "http://activemq.org/config/1.0":brokerInfo,
> > "http://activemq.org/config/1.0":discoveryAgent,
> > "http://activemq.org/config/1.0":messageAuthorizationPolicy,
> > "http://activemq.org/config/1.0":server,
> > "http://activemq.org/config/1.0":taskRunnerFactory,
> > WC[##other:"http://activemq.org/config/1.0"]}' is expected.
> >
> > Caused by:
> >
> > org.xml.sax.SAXParseException: cvc-complex-type.2.4.b: The content
of
> > element 'amq:transportConnector' is not complete. One of
> > '{"http://activemq.org/config/1.0":broker,
> > "http://activemq.org/config/1.0":brokerInfo,
> > "http://activemq.org/config/1.0":discoveryAgent,
> > "http://activemq.org/config/1.0":messageAuthorizationPolicy,
> > "http://activemq.org/config/1.0":server,
> > "http://activemq.org/config/1.0":taskRunnerFactory,
> > WC[##other:"http://activemq.org/config/1.0"]}' is expected.
> >
> >
> >
> >
> >
> >  >
> >   xmlns="http://www.springframework.org/schema/beans";
> >
> >   xmlns:amq="http://activemq.org/config/1.0";
> >
> >   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >
> >   xsi:schemaLocation="http://www.springframework.org/schema/beans
> > http://www.springframework.org/schema/beans/spring-beans.xsd
> >
> >   http://activemq.org/config/1.0
> >
>
http://people.apache.org/repository/org.apache.activemq/xsds/activemq-co
> > re-4.1-SNAPSHOT.xsd">
> >
> >
> >
> >   
> >
> >   
> >
> > 
> >
> >   
> >
> > 
> >
> >   
> >
> >
>
>
> --
>
> James
> ---
> http://radio.weblogs.com/0112098/
>


-- 

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


Re: Implementation / Evaluation Questions

2007-04-03 Thread James Strachan

On 4/3/07, sktyjd <[EMAIL PROTECTED]> wrote:


I came upon ActiveMQ in a post regarding JPMorgan's middleware specification
and decided I'd take a look.


Great



Sorry if this question has been answered before but I was wondering if
someone could shed some light on a few questions I have.

Currently, we have a trading system written in C# which relies heavily on MS
technologies. Remoting for Order's and PGM for Market Data. I would like to
at least have our message bus/communication protocol OS independent.


FWIW the NMS API can be used with several different providers (including MSMQ).
http://activemq.apache.org/nms/



So my questions are as follows:

1. Does ActiveMQ Support Reliable Multicast?


Currently, no. We've a basic implementation but the reliability layer
needs a bit of work.



   1.1 Does it support a sliding window - last ~1000 messages.
1.1.1 Is the sliding window configurable?

2. Can the daemon/service support two types of messaging and separate the
two?
   2.1 Publish/Subscribe scenario through reliable multicast -
multicast://239.7.8.9:4
   2.2 Request/Response scenario through tcp - tcp://172.28.1.10:41000


Sure. You can run as many brokers as you like on whatever
hosts/addresses and use them for whatever protocols/destinations you
wish



   2.3 Can certain types of messages be given higher priority in the queues?


We currently recommend the use of selectors for precise traffic
shaping when it comes to priorities (since usually priority queuing
only relates to reording of a transient buffer). e.g. having dedicated
thread pools for different priority levels, then catch-all pools for
the rest etc.


--

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


Implementation / Evaluation Questions

2007-04-03 Thread sktyjd

I came upon ActiveMQ in a post regarding JPMorgan's middleware specification
and decided I'd take a look.

Sorry if this question has been answered before but I was wondering if
someone could shed some light on a few questions I have.

Currently, we have a trading system written in C# which relies heavily on MS
technologies. Remoting for Order's and PGM for Market Data. I would like to
at least have our message bus/communication protocol OS independent.

So my questions are as follows:

1. Does ActiveMQ Support Reliable Multicast?
   1.1 Does it support a sliding window - last ~1000 messages.
1.1.1 Is the sliding window configurable?

2. Can the daemon/service support two types of messaging and separate the
two?
   2.1 Publish/Subscribe scenario through reliable multicast -
multicast://239.7.8.9:4
   2.2 Request/Response scenario through tcp - tcp://172.28.1.10:41000
   2.3 Can certain types of messages be given higher priority in the queues?

Cheers,

-jd-
-- 
View this message in context: 
http://www.nabble.com/Implementation---Evaluation-Questions-tf3513329s2354.html#a9811544
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Re: Best approach for HA message broker + grid

2007-04-03 Thread Manuel Teira

Thanks for your fast answer, James. Some doubts between the lines:


James Strachan escribió:

On 4/3/07, Manuel Teira <[EMAIL PROTECTED]> wrote:

Hello.

My aim is to have a set of brokers, running in different machines, to
consume messages coming from different clients, to be able to scale the
system for future needs. Furthermore, HA features are also required, to
protect the system on hardware malfunction.

Looking at the alternatives that ActiveMQ provides to achieve these
goals, it seems to me that I could get the grid behaviour using the
"Network of Brokers" feature, where all the brokers are "alive".


Not quite. HA is done my Master/Slave. The "Network of Brokers" is
purely for store and forward.
http://activemq.apache.org/masterslave.html

Multiple Master/Slave clusters would do the trick; you may want to
connect the broker clusters together in a store and forward network
but its not essential.

So, would I need four servers for the minimal topology? Two master/slave 
pairs? How would I get grid behaviour  in this environment? Using 
"Network of brokers" among the or using failover:// protocol in clients?





I understand that  when more than one broker have consumers for a given
queue, the messages are shared among them. But in my first tests, I've
found that most of times, all the messages get consumed by one of the
brokers. Could this be caused by a (default) high prefetch value?


When using store and forward, messages only move to another broker if
there are no local consumers.
http://activemq.apache.org/consumer-priority.html


So, what can I do to get the message load shared among consumers in 
different brokers? Shouldn't messages be forwarded when there's not an 
idle local consumer?









Talking about the HA needs, I've read that a master-slave aproximation
could be used, but here I won't have the grid behaviour benefits of the
"Network of brokers" approach (as only one of the brokers is actually
active). I would like to have a combined behaviour, where messages
persist a hardware failure (better if restarting the failing node was
not needed to restore them), and where messages were shared among
consumers from different brokers.

I was thinking about using a "Network of Brokers" with a low prefetch
value for the shared queues and disable journal files, to minimize the
amount of messages "owned" by a given broker. As the database is located
in a different machine, I could always restart  a new broker using the
schema of the failing one. Is this a right approach?


With Network Of Brokers, exactly one broker owns a message at any
point in time so you are exposed to hardware failure & there is no HA.
If a broker goes down, its messages remain lost until it is rebooted;
whereas with Master/Slave you get HA.

So, to summarize. The only way to get combined HA and Grid features is 
to have master/slave groups using 'network of brokers', or clients using 
failover:// to get messages shared through the consumers in the 
different active brokers.




Re: What is the best approach to connect ActiveMQ in Delphi?

2007-04-03 Thread James Strachan

On 4/3/07, Dingwen Yuan <[EMAIL PROTECTED]> wrote:

Hi all,

What is the best approach to connect ActiveMQ in Delphi? JNI, Stomp, or any 
other suggestions?


Writing a Stomp client would be the best really; you can create &
read/write to sockets from Delphi right? (I've never used Delphi
myself).  If Delphi can work with .Net objects/COM then there's the
chance of using NMS.


--

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


Re: Loading configuration from properties file

2007-04-03 Thread Javier Leyba

On 4/2/07, Javier Leyba <[EMAIL PROTECTED]> wrote:


Also, I need to change the JMX port, how could I do it ?





Hi

I've solved it with this:

--
service = new BrokerService();
service.setBrokerName(masterBrokerProps.getProperty("brokerName"));
service.setPersistent(true);
service.addConnector(masterBrokerProps
.getProperty("transportConnector"));

service.addNetworkConnector(new URI(
masterBrokerProps.getProperty("networkConnector")));

ManagementContext mc = new ManagementContext();
mc.setConnectorPort(Integer.parseInt(
masterBrokerProps.getProperty("connectorPort")));
mc.setJmxDomainName(masterBrokerProps.getProperty("jmxDomainName"));
service.setManagementContext(mc);
---


With propeties:

-
brokerName=MASTERUBUNTU
transportConnector=tcp://172.31.112.9:62002
networkConnector=static://(tcp://172.31.112.9:62003,tcp://172.31.27.1:62012,tcp://172.30.27.1:62014)?failover=true&dynamicOnly=true
connectorPort=2011
jmxDomainName=org.apache.activemq


I guess my config is ok but nevertheless I'm receiving the message:


---
10:39:25,122 WARN  [NetworkConnector] Could not start network bridge
between: vm://MASTERUBUNTU?network=true and: tcp://172.31.112.9:62003
due to: java.net.ConnectException: Connection refused
10:39:28,669 INFO  [NetworkConnector] Establishing network connection
between from vm://SLAVEUBUNTU?network=true to tcp://172.31.112.9:62005
10:39:28,670 WARN  [NetworkConnector] Could not start network bridge
between: vm://SLAVEUBUNTU?network=true and: tcp://172.31.112.9:62005
due to: java.net.ConnectException: Connection refused
10:39:30,125 INFO  [NetworkConnector] Establishing network connection
between from vm://MASTERUBUNTU?network=true to
tcp://172.31.112.9:62003


Is this ok or my config fails ?

Thanks in advance

J


Re: Best approach for HA message broker + grid

2007-04-03 Thread James Strachan

On 4/3/07, Manuel Teira <[EMAIL PROTECTED]> wrote:

Hello.

My aim is to have a set of brokers, running in different machines, to
consume messages coming from different clients, to be able to scale the
system for future needs. Furthermore, HA features are also required, to
protect the system on hardware malfunction.

Looking at the alternatives that ActiveMQ provides to achieve these
goals, it seems to me that I could get the grid behaviour using the
"Network of Brokers" feature, where all the brokers are "alive".


Not quite. HA is done my Master/Slave. The "Network of Brokers" is
purely for store and forward.
http://activemq.apache.org/masterslave.html

Multiple Master/Slave clusters would do the trick; you may want to
connect the broker clusters together in a store and forward network
but its not essential.



I understand that  when more than one broker have consumers for a given
queue, the messages are shared among them. But in my first tests, I've
found that most of times, all the messages get consumed by one of the
brokers. Could this be caused by a (default) high prefetch value?


When using store and forward, messages only move to another broker if
there are no local consumers.
http://activemq.apache.org/consumer-priority.html



Talking about the HA needs, I've read that a master-slave aproximation
could be used, but here I won't have the grid behaviour benefits of the
"Network of brokers" approach (as only one of the brokers is actually
active). I would like to have a combined behaviour, where messages
persist a hardware failure (better if restarting the failing node was
not needed to restore them), and where messages were shared among
consumers from different brokers.

I was thinking about using a "Network of Brokers" with a low prefetch
value for the shared queues and disable journal files, to minimize the
amount of messages "owned" by a given broker. As the database is located
in a different machine, I could always restart  a new broker using the
schema of the failing one. Is this a right approach?


With Network Of Brokers, exactly one broker owns a message at any
point in time so you are exposed to hardware failure & there is no HA.
If a broker goes down, its messages remain lost until it is rebooted;
whereas with Master/Slave you get HA.

--

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


Re: STOMP broker - order of ACKs?

2007-04-03 Thread James Strachan

BTW some bugs were fixed in 4.1.1 to do with out of order ACK support.

But if you really want to have child processes/threads perform
independent work which will lead to messages being processed out of
order from which they are received, I'd recommed using multiple
subscriptions; one per thread/process; then each consumer can ack its
own messages which will not affect the other subscribers.


On 4/2/07, jonm <[EMAIL PROTECTED]> wrote:


I am new to JMS and ActiveMQ -- I have been investigating using the STOMP
broker and things have worked well so far, but I have a question about ACKs
to messages received by a consumer:

It seems that the order of ACKs is not important (if they are done in a
'batch'), for example, I can receive, say 10 messages, process them and then
ACK all of them. I can even scramble the order of ACKs after the messages
have been processed and it's OK.

However, say I write a forked script that processes messages as needed (some
children take longer depending on the action required by the message) and
the children do their own ACKing... Seems like this is not allowed and that
this sequence of events cannot happen on the connection:

- Message 1 rcvd
- ACK msg 1
- Message 2 rcvd
- Message 3 rcvd
- ACK msg 3
- ACK msg 2

I seem to get the following error (a STOMP ERROR frame) in this scenario:

[message] => Unexpected ACK received for message-id
[ID:jstation-36270-1175286660410-3:148:-1:1:41]
[body]=>
org.apache.activemq.transport.stomp.ProtocolException: Unexpected ACK
received for message-id [ID:jstation-36270-1175286660410-3:148:-1:1:41]
at
org.apache.activemq.transport.stomp.ProtocolConverter.onStompAck(ProtocolConverter.java:242)
at
org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommad(ProtocolConverter.java:141)
at
org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:64)
at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:137)
at java.lang.Thread.run(Thread.java:534)

Although this error is thrown, the message is no longer in the queue
(jconsole indicates no messages are waiting to be picked up/sent to the
consumer).. so though the exception is thrown, everything seems OK
is this expected? can I ignore this exception and still rely on this
message/ack sequence?

I'm using activeMQ version 4.1.0

thanks,
jon
--
View this message in context: 
http://www.nabble.com/STOMP-broker---order-of-ACKs--tf3508100s2354.html#a9798481
Sent from the ActiveMQ - User mailing list archive at Nabble.com.





--

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


Re: Shared File System Master Slave with Windows

2007-04-03 Thread James Strachan

On 4/3/07, pdvyuan <[EMAIL PROTECTED]> wrote:

Hi all,

Can I use a shared windows file system to achieve "Shared File System Master 
Slave"? I have made some tests, but occasionally some error would occur. I made the 
test under 2 instances of activemq-4.2 runing on WinXP. The errors are as follows:

2007-03-30 17:04:33,640 [28.64.7.49:4858] DEBUG JournalMessageStore
- Journalled message add for: 
ID:xuj01-a7d120-3614-1174637145906-0:0:1:1:296058, at: 39:3829174
2007-03-30 17:04:33,687 [eckpoint Worker] DEBUG JournalPersistenceAdapter  
- Checkpoint started.
2007-03-30 17:04:33,703 [8.64.7.111:1333] DEBUG JournalMessageStore
- Journalled message remove for: 
ID:xuj01-a7d120-3615-1174637145921-1:0:1:1:109282, at: 39:3830090
2007-03-30 17:04:33,781 [eckpoint Worker] DEBUG JournalPersistenceAdapter  
- Marking journal at: 39:3829174
2007-03-30 17:04:33,781 [eckpoint Worker] ERROR JournalPersistenceAdapter  
- Failed to mark the Journal: 
org.apache.activeio.journal.InvalidRecordLocationException: The location is 
less than the last mark.
org.apache.activeio.journal.InvalidRecordLocationException: The location is 
less than the last mark.
 at org.apache.activeio.journal.active.JournalImpl.setMark(JournalImpl.java:340)
 at 
org.apache.activemq.store.journal.JournalPersistenceAdapter.doCheckpoint(JournalPersistenceAdapter.java:400)
 at 
org.apache.activemq.store.journal.JournalPersistenceAdapter$2.iterate(JournalPersistenceAdapter.java:128)
 at 
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:88)
 at 
org.apache.activemq.thread.DedicatedTaskRunner.access$000(DedicatedTaskRunner.java:25)
 at 
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:39)
2007-03-30 17:04:33,781 [eckpoint Worker] DEBUG JournalPersistenceAdapter  
- Checkpoint done.

Is this error due to the insufficient support of "exclusive file locks" by 
Windows.


The above looks like a bug. I'm guessing you've used a fairly old
snapshot of 4.2, I'd recommend using a recent one from the end of
March 2007 which no longer uses activeio AFAIK.

http://people.apache.org/repo/m2-snapshot-repository/org/apache/activemq/apache-activemq/4.2-SNAPSHOT/

--

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


Re: Suggested implmentation?

2007-04-03 Thread James Strachan

On 4/2/07, mnishizawa <[EMAIL PROTECTED]> wrote:


I am looking build an event based system where the event is logged in a
message queue and then listeners(subscribers/receivers) all perform their
specific tasks based on the event.  I've looked at the documentation and I
can't seem to find exactly what I want to do.

I would like to:
 - strictly order the subscribers


What does that mean?



 - ensure that all subscribers have acknowledged the message before
dequeuing


Huh?


 - message dropping is not allowed

So for instance, say I have general user registration for some application.
I would like to have 3 subscribers:
1. register the user,
2. check that the user's location exists,
3. registers the user for services in their location.

The ordering is important because 2 is dependent on 1 and 3 is dependent on
2, so we need to make sure 1 has executed before executing 2 and so on.


So send a message to queue 1, then that is completed, send it to queue
2 then 3 etc.



Why not do it in a service?  I'd rather not because if one part of the chain
fails, the registration fails.  I do not want to lose registrations because
the location lookup fails.



So uses pipelines..
http://www.enterpriseintegrationpatterns.com/PipesAndFilters.html

--

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


Re: spring and activemq

2007-04-03 Thread James Strachan

You tried 4.1.1?

On 4/2/07, Garner, Shawn <[EMAIL PROTECTED]> wrote:

ActiveMQ 4.1

Shawn

-Original Message-
From: James Strachan [mailto:[EMAIL PROTECTED]
Sent: Monday, April 02, 2007 3:08 AM
To: users@activemq.apache.org
Subject: Re: spring and activemq

Which version were  you using?

On 3/29/07, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> I'm having problems getting the example spring file to load:
>
>
>
> http://activemq.apache.org/spring-support.html
>
>
>
> 007-03-29 15:19:23,662 [main] ERROR
>
org.springframework.web.context.ContextLoader:initWebApplicationContext:
> 205  - Context initialization failed
>
> org.springframework.beans.factory.BeanDefinitionStoreException: Line
11
> in XML document from ServletContext resource
> [/WEB-INF/config-spring/applicationContext-jms.xml] is invalid; nested
> exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.b:
The
> content of element 'amq:transportConnector' is not complete. One of
> '{"http://activemq.org/config/1.0":broker,
> "http://activemq.org/config/1.0":brokerInfo,
> "http://activemq.org/config/1.0":discoveryAgent,
> "http://activemq.org/config/1.0":messageAuthorizationPolicy,
> "http://activemq.org/config/1.0":server,
> "http://activemq.org/config/1.0":taskRunnerFactory,
> WC[##other:"http://activemq.org/config/1.0"]}' is expected.
>
> Caused by:
>
> org.xml.sax.SAXParseException: cvc-complex-type.2.4.b: The content of
> element 'amq:transportConnector' is not complete. One of
> '{"http://activemq.org/config/1.0":broker,
> "http://activemq.org/config/1.0":brokerInfo,
> "http://activemq.org/config/1.0":discoveryAgent,
> "http://activemq.org/config/1.0":messageAuthorizationPolicy,
> "http://activemq.org/config/1.0":server,
> "http://activemq.org/config/1.0":taskRunnerFactory,
> WC[##other:"http://activemq.org/config/1.0"]}' is expected.
>
>
>
>
>
> 
>   xmlns="http://www.springframework.org/schema/beans";
>
>   xmlns:amq="http://activemq.org/config/1.0";
>
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>
>   xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
>
>   http://activemq.org/config/1.0
>
http://people.apache.org/repository/org.apache.activemq/xsds/activemq-co
> re-4.1-SNAPSHOT.xsd">
>
>
>
>   
>
>   
>
> 
>
>   
>
> 
>
>   
>
>


--

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




--

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


Best approach for HA message broker + grid

2007-04-03 Thread Manuel Teira

Hello.

My aim is to have a set of brokers, running in different machines, to 
consume messages coming from different clients, to be able to scale the 
system for future needs. Furthermore, HA features are also required, to 
protect the system on hardware malfunction.


Looking at the alternatives that ActiveMQ provides to achieve these 
goals, it seems to me that I could get the grid behaviour using the 
"Network of Brokers" feature, where all the brokers are "alive".


I understand that  when more than one broker have consumers for a given 
queue, the messages are shared among them. But in my first tests, I've 
found that most of times, all the messages get consumed by one of the 
brokers. Could this be caused by a (default) high prefetch value?


Talking about the HA needs, I've read that a master-slave aproximation 
could be used, but here I won't have the grid behaviour benefits of the 
"Network of brokers" approach (as only one of the brokers is actually 
active). I would like to have a combined behaviour, where messages 
persist a hardware failure (better if restarting the failing node was 
not needed to restore them), and where messages were shared among 
consumers from different brokers.


I was thinking about using a "Network of Brokers" with a low prefetch 
value for the shared queues and disable journal files, to minimize the 
amount of messages "owned" by a given broker. As the database is located 
in a different machine, I could always restart  a new broker using the 
schema of the failing one. Is this a right approach?


Any other idea to implement this scenario?

Best regards.





Re: How do I delete a queue or topic that I no longer need?

2007-04-03 Thread James Strachan

On 4/2/07, sparky2708 <[EMAIL PROTECTED]> wrote:


How do I delete a queue or topic that I no longer need? Can I do this through
JConsole? If not, how?


BTW the MBean interfaces are your friend...
http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/broker/jmx/package-summary.html

e g
http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/broker/jmx/BrokerViewMBean.html#removeQueue(java.lang.String)

--

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


Re: Register ActiveMQ destinations in JNDI

2007-04-03 Thread James Strachan

On 4/3/07, Rama Casturi <[EMAIL PROTECTED]> wrote:


I am new to using ActiveMQ. I am trying to integrate ActiveMQ in our Spring
application environment. I have been successful in running the broker
(defined in the activemq.xml file on the classpath) in the embedded form as
a spring bean in our application context. I am also able to create a
connection factory bean using ActiveMQConnectionFactory as well as
destination bean using the ActiveMQTopic classes as spring beans. I also am
able to produce JMS messages and publish to my topic and also consume those
messages (both producer and consumer are configured as spring beans using
Spring's JMS support classes).

Now I want to be able to configure the connection factory and my
destinations in such a way that  I donot have to use the ActiveMQ specific
classes in my spring bean definitions.


You mean you want to avoid ActiveMQ classes in your spring.xml? Why?
There's no ActiveMQ packages in your source code, surely thats enough?



I want to be able to JNDI to
configure these objects and then discover them in my spring application
using spring's JndiObjectFactoryBean.


I really don't see the point of adding another level of indirection; a
spring.xml is enough IMHO



I am trying to understand the use of the jndi.properties file, but cannot
see where it is used and who uses it to instantiate and bind those objects
in JNDI.

I would appreciate any help on this subject.


See the following for how to configure an ActiveMQ JNDI context
http://activemq.apache.org/jndi-support.html

--

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