Re: How to log all incoming msgs of Queue "hello" into a separate logfile?

2012-03-25 Thread BenXS
Ok, thank you. Just for clarification: The log4j.properties you mentioned are only active when I setup before the Logging Interceptor Plugin as described in http://activemq.apache.org/logging-interceptor.html If the user did NOT add an entry like: ... then no log4j logging takes place. Cor

How to use a message driven bean on AppServer like JBoss/Tomcat (and not Messagebroker)?

2010-10-14 Thread BenXS
Normally I can create a MessageDrivenBean *.jar and deploy it into the /lib sub-folder of ActiveMQ. It will be automatically managed when ActioveMQ starts and receives incoming message in its onMessage() method. Fine. But how can I use MessageDrivenBeans when I have/want to deploy them on a

Re: How does JMS correlation work in Java?

2010-10-13 Thread BenXS
Hmm, just to clarify: On the client side I have to write responseConsumer.setMessageListener(this); and txtMessage.setJMSCorrelationID(correlationId); that's all? The matching will automatically be done internally by the (anonymous) listener? Ben -- View this message in context: http://act

How does JMS correlation work in Java?

2010-10-09 Thread BenXS
When a MDB (message driven bean) instance number 6789 sends (asynchronously) a JMS Request to a message broker it expects later a JMS response. Assume now this JMS response is put into the queue by a server. How can I ensure that MDB instance 6789 gets the response which is intended for him an

Re: Can I replace MQSeries simply by ActiveMQ ?

2010-09-11 Thread BenXS
Hey Andrew, this sounds great. When will your C++ be ready? >From where can I download it and view the manual? Assume the current, old access is performed from a java application or other programming language to MQSeries. Do I need your C++ Wrapper as well? Thank you Ben -- View this message

Where is ProducerInfo+ConsumerInfo data structure for Advisory Msgs?

2010-08-20 Thread BenXS
On page http://activemq.apache.org/advisory-message.html data structures named ProducerInfo + ConsumerInfo are mentioned. Where do I find these data structures explained (resp. which fields they contain in detail) ? Furthermore I wonder how I can detect wether an incoming msg on an Advisorc top

Re: How to forward a full message received in Java by onMessage() into another queue?

2010-08-20 Thread BenXS
Hmm, this is interesting. If I set in a new JMS message the destination Queue to "aaa" with the method setJMSDestination() but sent the JMS Msg to another queue "bbb" then the JMS header field JMSdestination will will be brutally overwritten with "bbb". I can imagine that this happens with the

How to insert from Java a new JMSproperty in header? setStringProperty() does not work

2010-08-19 Thread BenXS
I am trying to set from a Java bean a new (additional) Property in header. Therefore I code (simplified) the following: public void pass(Message mess) { ... mess.setPropertiesModifiable(true); mess.setStringProperty("newprop", "value123"); ...} But it didn't work. Compiler compl

How to shutdown + restart ActiveMQ from cmdline (!)?

2010-08-19 Thread BenXS
Assume I have a running ActiveMQ Messagebroker (under WinXP). Currently I stop/shutdown the server by pressing Ctrl+C in the CommandPrompt Terminal window. Then ActiveMQ stops/shutdown. I am searching now for a way to stop/shutdown the server DIRECTLY from the command line e.g. from a batch scri

bean.jar in /lib folder without SpringXML config also called at startup?

2010-08-18 Thread BenXS
Assume I develop a Java Bean, compile it into a *.jar and copy it to the /lib folder of ActiveMQ. The configuration of this bean is NOT done by SpringXML but the Broker+Connection setup is done only inside the java code. So Spring in ActiveMQ does not know anything about the Bean. Does ActiveMQ

How to let ONE bean listen on MULTIPLE Topics? SpringXML config in activemq.xml

2010-08-17 Thread BenXS
I setup a Bean which currently listens successfully to exactly ONE Topic "montopic20". The SpringXML setup for this bean in activemq.xml is as shown below. How can I let the same Bean listen to multiple different topics in parallel? In other words: Which minimal changes do I have to apply to the

How to let ONE bean listen on MULTIPLE Topics? SpringXML config in activemq.xml

2010-08-17 Thread BenXS
I setup a Bean which currently listens successfully to exactly ONE Topic "montopic20". The SpringXML setup for this bean in activemq.xml is as shown below. How can I let the same Bean listen to multiple different topics in parallel? In other words: Which minimal changes do I have to apply to the

prefetch size=0 and =1 bugs are fixed?

2010-08-17 Thread BenXS
As far as I read there were some problems in the past with setting a prefetch size of 0 resp. 1. As a result none or all msgs are sent in such a case. Is this bug fixed meanwhile? Ben -- View this message in context: http://old.nabble.com/prefetch-size%3D0-and-%3D1-bugs-are-fixed--tp29449259p2

Is always 1 new JMS msg = 1 new (Message driven) Bean instance?

2010-08-16 Thread BenXS
Whenever a new JMS msg is arriving in a queue/topic where a MDbean is listening (through "onMessage()"). Is there always a new Bean instance created and used for handling this JMS msgs? Or can it be that an already existing Bean instance is used for handling the next JMS msg as well? Ben -- Vie

Why are "ActiveMQ.Advisory.Consumer....." topics automatically created?

2010-08-13 Thread BenXS
When I start ActiveMQ and do some simple things like peeking into a certain jms msg in a queue (through Browser Console) then always automatically ActiveMQ.Advisory.Consumer.. topics are created. Why? How can I (permanently) disable the creation of such topics? The only thing I added to

Can the same Java Bean consume from Queues or Topics? Only activemq.xml config change?

2010-08-13 Thread BenXS
Assume I created successfully a Java Bean which consumes JMS msgs through an onMessage() method from a queue. Broker URL and queue name is defined in (Spring) XML in activemq.xml Can I use the same (unchanged) java bean to consume jms msgs from a(nother) topic instead from the previous queue? A

How to forward a full message received in Java by onMessage() into another queue?

2010-08-13 Thread BenXS
Assume I wrote a Java bean (configured by Spring) which receives successfully incoming messages on a certain queue. So the "onMessage()" method looks similar like: public void onMessage(Message message) { ... } Now I want to forward/sent the just received message into another queue "bbb

Re: How to write a java topic/queue consumer (MDB?) and deploy it INSIDE ActiveMQ?

2010-08-04 Thread BenXS
Dejan Bosanac wrote: > > One way to do it is to put your jar in the lib/ folder and use > ActiveMQ Spring configuration to boot it. > So ok, let's take the source from this webpage: http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html I compiled successfully the S

How to write a java topic/queue consumer (MDB?) and deploy it INSIDE ActiveMQ?

2010-08-03 Thread BenXS
I would like to write a small java program (something like a Bean/MessageDrivenBean) and deploy it INSIDE the ActiveMQ MessageBroker. This (MD)Bean should NOT - use an embedded ActiveMQ Broker and NOT - run outside ActiveMQ (e.g. on a separate application server). Instead the java prgm should be

Possible to define in java product independent BrokerURL/CoonectionFactory?

2010-07-30 Thread BenXS
As far as I can see the suggested way to connect to a running ActiveMQ MessageBroker in java POJO is something like: import org.apache.activemq.ActiveMQConnectionFactory; ... ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:51616"); However this definitio

What happens with Topic msgs if there is no subscriber? Postpone deletion?

2010-07-21 Thread BenXS
Assume I have a Topic with currently no subscriber. What happens with incoming msgs? Are they immediately destroyed? Can I somehow postpone the deletion until lets say the end of day? So if I start the Topic at 10:00 and a subscriber connects to this Topic at 11:00 then he should receive all prev

Forcing ActiveMQ console in browser to update? Increasing update priority

2010-07-21 Thread BenXS
It seems to me that the ActiveMQ console in browser window is not frequently updated. It appears often that there is a time lag between the real situation and what is displayed. When a new msg arrives in a queue then it happens in the past that it takes up to 10 minutes until the jms msg is count

Avoiding confirmation when shutdown ActiveMQ ?

2010-07-20 Thread BenXS
When I shutdown ActiveMQ under Windows by hitting ctrl-C in the CommandPrompt-Terminal-Window then ActiveMQ prompts me always: Terminate Batch Job (Y/N)? I always have to enter "Y" and hit RETURN. Can I avoid this prompt somehow and shutdown immediately? Ben -- View this message in context:

Restricting mirroring of queues to one particular of all available queues?

2010-07-20 Thread BenXS
When I read on page http://activemq.apache.org/mirrored-queues.html I got the impression that the mirroring feature can be turned on only for ALL queues or NONE. Is this true? I would appreciate to have this feature restricted to ONE particular queue. Maybe there is a workaround/trick to achi

Re: How to enable file based persistence ?

2010-07-16 Thread BenXS
or connections at: tcp://abpc11513:61616 > INFO | Connector openwire Started > INFO | ActiveMQ JMS Message Broker (localhost, > ID:abpc11513-1432-1279268856274-0:0) started > > > > > Could you please check your release and let me know which one you have ? > Thanks,

Re: How to enable file based persistence ?

2010-07-16 Thread BenXS
Gary Tully wrote: > > you need to add the attribute: persistenceFlag="true" > Hmm, I don't understand. Currently I put into activemq.xml: http://www.springframework.org/schema/beans"; id="forcePersistencyModeBroker" class="org.apache.activemq.plugin.ForcePersistencyModeBrokerPlugin"> .

Why do MirroredQueues not work with virtualDestinations?

2010-07-15 Thread BenXS
I wrote the following directions into activemq.xml When I omit the inner then the incming msgs are mirrored successfully as intended to the Topic myqueue22.qmirror But when I want to forward them from this Topic into a second queue myqueue22_log everything fails. Even worse the incoming mirrors

How to view Topic msgs content in ActiveMQ browser view?

2010-07-14 Thread BenXS
When I open a browser and connect to a running ActiveMQ message broker e.g http://127.0.0.1/admin/queues.jsp then I can see all currently queues. When I click on one of them I can see the currently received/enqueued but not forwarded/retrieved jms msgs. Fine so far. When I go now to the counte

How to forward each msg arriving in Topic "aaa" into Queue "bbb"?

2010-07-14 Thread BenXS
I would like to forward each msg which arrives in Topic "aaa" to a Queue "bbb". How can I specify this in activemq.xml? Does this (your) solution also work when the Topic is a VirtualTopic from a mirrored Queue? Ben -- View this message in context: http://old.nabble.com/How-to-forward-each-ms

Re: Is there a way to duplicate incoming JMS msgs into second queue?

2010-07-07 Thread BenXS
Ok, but this would require changes at the producer side. I need a solution where the source code on the producer side will be untouched. If a JMS mesgs arrives in ActiveMQ it should be duplicated INSIDE ActiveMQ Is this possible? Dejan Bosanac wrote: > > you can always use composite destinat

Is there a way to duplicate incoming JMS msgs into second queue?

2010-07-07 Thread BenXS
Is there a way to duplicate incoming JMS msgs into second queue? BUT: The incoming msgs should NOT be consumed from the original queue but left in place. So a tool like Camel is not suitable because Camel always consumes JMS msgs. When Camel would consume such a msg and restore it later (after du

Re-Start required when changing activemq.xml or camel.xml ? Auto-restart possible?

2010-06-23 Thread BenXS
Assume I have started ActiveMQ successfully. Now I change either activemq.xml or camel.xml Is it required to restart ActiveMQ in order let the changes become effective? Or does ActiveMQ detect automatically changes in its config files and load them automatically during run? If manually restart i

How to automatically COPY incoming JMS msgs into second queue? Camel "Wiretap" does not work?

2010-06-23 Thread BenXS
I defined the following for camel in an ActiveMQ installation: Every incoming JMS msg should simply be duplicated. The dupe should be put in another queue called "dupequeue". The original jms msg should remain in the input queue for later retrieval (by other java progra

Re: Can I allow storing of JMS msg in Queue but deny fetching them?

2010-03-23 Thread BenXS
er that overrides > BrokerFilter.addConsumer(), and implement that so that it rejects > consumers on your specific destination. > > Mats > > > > On 19 March 2010 05:31, BenXS wrote: >> >> For a certain Queue (e.g. myqueue123) I would like to allow producers to >> store

Can I allow storing of JMS msg in Queue but deny fetching them?

2010-03-18 Thread BenXS
For a certain Queue (e.g. myqueue123) I would like to allow producers to store new JMS messages but not for Consumers to retrieve them. How can I achieve this? In other words: Which parameter do I have to set in which confg file? Ben -- View this message in context: http://old.nabble.com/Can-

Re: Is it possible to log all inbound and outbound JMS msg (WITHOUT Camel) ?

2010-03-03 Thread BenXS
s easy to extend to get it to do what you > want. > > have a look at the send method of > http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java?view=markupto > see what it does. > > On 3 March 2010 09:5

Re: How to enable file based persistence ?

2010-03-03 Thread BenXS
nt in the plugins list and uses xbean so you can use > > > > > see: http://activemq.apache.org/developing-plugins.html > > On 3 March 2010 10:04, BenXS wrote: > >> >> Ok, thank you. But one more question: >> >> On the bottom of the webpage yo

Re: How to enable file based persistence ?

2010-03-03 Thread BenXS
Ok, thank you. But one more question: On the bottom of the webpage you mentioned it is written: "Patch applied in revision 800274" What does that mean? A patch is a fix for a bug. But the missing "force persistency" is not a bug but a new feature. Furthermore a revision is listed: Is this revi

Is it possible to log all inbound and outbound JMS msg (WITHOUT Camel) ?

2010-03-03 Thread BenXS
I would like to log the full XML JMS Header and the full XML payload for all incoming and for all outgoing JMS Msgs. The resp. XML content should be written to a logfile. How can I achieve this? I read several times the web page http://activemq.apache.org/logging-interceptor.html and played

Re: How to enable file based persistence ?

2010-03-03 Thread BenXS
>> >> ant producer -Ddurable=true >> >> Cheers >> -- >> Dejan Bosanac - http://twitter.com/dejanb >> >> Open Source Integration - http://fusesource.com/ >> ActiveMQ in Action - http://www.manning.com/snyder/ >> Blog - http://www.nighttale

Is log4j out-of-the-box enabled? Logging Interceptor output?

2010-02-18 Thread BenXS
As on the webpage http://cwiki.apache.org/confluence/display/ACTIVEMQ/Logging+Interceptor described all output from the Logging Interceptor is written to the Loggers of Log4j. Is Log4j automatically enabled after installation of ActiveMQ or do I have it to do explicitely (how ?). In other word

Does change of activemq.xml require restart?

2010-02-18 Thread BenXS
If I change the activemq.xml is then a restart required or does Active recognize automatically config changes and read it on-the-fly? Ben -- View this message in context: http://old.nabble.com/Does-change-of-activemq.xml-require-restart--tp27637813p27637813.html Sent from the ActiveMQ - User ma

How to enable file based persistence ?

2010-02-18 Thread BenXS
I installed and started successfully Apache ActiveMQ v5.3.0. How do I enable now file based persistence? If I send a JMS message to the broker it appears in Console. But after shutdown and restart (of ActiveMQ) this JMS message is not longer available. Which parameter do I have to set to store

How to log all incoming and outgoing JMS msgs?

2010-01-25 Thread BenXS
How can I log all incoming and outgoing JMS msgs into a separate log file? Even better if every JMS msg could be stored into its own *.xml file. How can I achieve this? How can I achieve this for only certain queues (=queues which match e.g. the pattern *test_*20 Ben -- View this message in

How to beautify ActiveMQ display in JMX Console->MBean ?

2010-01-18 Thread BenXS
Due to firewall restrictions I am forced to access a remote ActiveMQ MessageBroker not through a tool like HermesJMS but through a SSH tunnel and JMX JConsole and inside the ActiveMQ MBean. The output is not as user friendly as possible. It is e.g. hard to view the payload XML and all the additio

How to avoid "Slow KahaDB access: cleanup took 545" error msg?

2010-01-14 Thread BenXS
When running the current ActiveMQ MessageBroker (under WinXP) the console shows dozends of notifications like "Slow KahaDB access: cleanup took 545" Whats wrong? How can I avoind these msgs? Ben -- View this message in context: http://old.nabble.com/How-to-avoid-%22Slow-KahaDB-access%3A-clea