Re: Defining a Queue to a Topic with ActiveMQ

2014-02-05 Thread James Strachan
A destination is either a queue or a topic. If you want to consume from a
queue/topic and send to a topic/queue the easiest thing is to create a
camel route to bridge them. (There's also virtual destinations in ActiveMQ
which do a similar thing)
http://activemq.apache.org/virtual-destinations.html


On 5 February 2014 18:39, barry.barn...@wellsfargo.com wrote:



 In Hawtio, when I define a topic, how do I define a destination queue to
 the topic?  Or is that in the hands of the publishing application?





-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: Defining a Queue to a Topic with ActiveMQ

2014-02-05 Thread James Strachan
Yeah; if producer and consumer both use the same kind of destination (both
queue or both topic) and they use the same name then there's no need for
camel / virtual destinations.

Note in activemq you usually don't need to define queue/topic objects;
creating a producer / consumer is enough

On Wednesday, February 5, 2014, barry.barn...@wellsfargo.com wrote:

 So basically you can have a producer put to a topic called Apples, and the
 subscriber subscribing to the topic object named Apples, without the need
 for the queue object.  If you want a topic destination created (queueA or
 queueB), you might consider using Camel routes?


 -Original Message-
 From: James Strachan [mailto:james.strac...@gmail.com javascript:;]
 Sent: Wednesday, February 05, 2014 2:15 PM
 To: users@activemq.apache.org javascript:;
 Subject: Re: Defining a Queue to a Topic with ActiveMQ

 A destination is either a queue or a topic. If you want to consume from a
 queue/topic and send to a topic/queue the easiest thing is to create a
 camel route to bridge them. (There's also virtual destinations in ActiveMQ
 which do a similar thing)
 http://activemq.apache.org/virtual-destinations.html


 On 5 February 2014 18:39, barry.barn...@wellsfargo.com javascript:;
 wrote:

 
 
  In Hawtio, when I define a topic, how do I define a destination queue to
  the topic?  Or is that in the hands of the publishing application?
 
 
 


 --
 James
 ---
 Red Hat

 Email: jstra...@redhat.com javascript:;
 Web: http://fusesource.com
 Twitter: jstrachan, fusenews
 Blog: http://macstrac.blogspot.com/

 Open Source Integration



-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: ActiveMQ Web Console clashes with existing broker

2014-01-20 Thread James Strachan
On 20 January 2014 10:42, Hilderich hilde.sch...@yahoo.de wrote:

 Hello Claus,

 Thank you a lot for answering.

 As far as I have evaluate hawt.io there is no feature like:

 List all messages in a concrete JMS Queue and provide
 the feature to delete one if necessary. ActiveMQ Web Console
 give you this chance.


hawtio lets you browse any queue in ActiveMQ; select messages then delete
them, move them or replay messages on a DLQ. Plus you can send messages
(together with use Camel to transform messages between queues).


hawt.io provides just the raw jmx mechanisms not properly
 pimped up for customers.



Did you try click the ActiveMQ tab and select a queue?

-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: ActiveMQ Web Console clashes with existing broker

2014-01-20 Thread James Strachan
e.g. here's viewing queue sizes
https://raw.github.com/hawtio/hawtio/master/website/src/images/screenshots/jmx.png

here's browsing the message details on a queue
https://raw.github.com/hawtio/hawtio/master/website/src/images/screenshots/activemqBrowse.png



On 20 January 2014 10:47, Claus Ibsen claus.ib...@gmail.com wrote:

 On Mon, Jan 20, 2014 at 11:42 AM, Hilderich hilde.sch...@yahoo.de wrote:
  Hello Claus,
 
  Thank you a lot for answering.
 
  As far as I have evaluate hawt.io there is no feature like:
 
  List all messages in a concrete JMS Queue and provide
  the feature to delete one if necessary. ActiveMQ Web Console
  give you this chance.
 
  hawt.io provides just the raw jmx mechanisms not properly
  pimped up for customers.
 

 You have maybe not looked to hard. There is an ActiveMQ plugin in
 hawtio that allows you to browse queues/topics. And delete/move
 messages, or retry messages that ended up in DLQ etc.
 As well send messages to queues/topics etc.

 See for example the screenshots on the front page at
 http://hawt.io/

 And use the arrows to flip between the screenshots. There is some
 about ActiveMQ.


  Kind regards
  Hilderich
 
 
 
  --
  View this message in context:
 http://activemq.2283324.n4.nabble.com/ActiveMQ-Web-Console-clashes-with-existing-broker-tp4676475p4676518.html
  Sent from the ActiveMQ - User mailing list archive at Nabble.com.



 --
 Claus Ibsen
 -
 Red Hat, Inc.
 Email: cib...@redhat.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen
 Make your Camel applications look hawt, try: http://hawt.io




-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: ActiveMQ Web Console clashes with existing broker

2014-01-20 Thread James Strachan
On 20 January 2014 11:10, Hilderich hilde.sch...@yahoo.de wrote:

 Hello All,

 Thank you for your efforts.

 Unfortunately after starting hawt.io there was no ActiveMQ menu entry
 available.


It sounds like you've never actually connected to the Apache ActiveMQ
broker process yet. FWIW 5.9.0 of ActiveMQ comes with hawtio inside. Once
started you should be able to just view:

  http://localhost:8161/hawtio

Though due to concerns over Apache branding its not possible to embed
hawtio inside ActiveMQ any more; so from 5.10 or later that won't be the
case.



 Furthermore port 8080 was in use by another process on
 my pc so I decided to use port 8011.

 java -jar hawtio-app-1.2.2.jar --port 8090

 I have read a running ActiveMQ Broker should be discovered automatically
 but hawt.io did not behave so.


Not quite; there's a Local tab in the Connect nav bar that can auto-detect
JVMs (rather like jconsole). Did you try that?

Or if you run hawtio stand alone you need to use the Connect tab to connect
to the ActiveMQ broker process.

for 5.9.0 these values should work:

  host: localhost

  port 8161

  path: hawtio/jolokia

  user: admin

  password: admin



 The best way would be to run it inside my karaf to reduce the number of
 other systems but I have worries about port clashing because in Karaf
 already runs paxWeb (feature war) and Apache CXF.


Yeah, if you're using karaf just install the hawtio feature:

   features:addurl mvn:io.hawt/hawtio-karaf/1.2.2/xml/features
   features:install hawtio

then you'll be able to reuse the karaf web port:
http://localhost:8181/hawtio/ and use the karaf security to login etc

-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: ActiveMQ 5.9.0 Hawtio Slow

2014-01-11 Thread James Strachan
Aha! Thanks for the heads up. Sounds like something odd with your network
configuration maybe? Is 127.0.0.1 slow too?

On Friday, January 10, 2014, kraythe . wrote:

 I figured this out. If I access it via localhost:8161 it is extremely slow
 but if I use my local IP then it is very fast. Bug time I think.

 *Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
 *Author of: Hardcore Java (2003) and Maintainable Java (2012)*
 *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
 http://www.linkedin.com/pub/robert-simmons/40/852/a39*


 On Fri, Jan 10, 2014 at 2:24 PM, kraythe . kray...@gmail.com wrote:

  Actually I have it set at the max of 30 seconds and it still runs
  agonizingly slow taking 30+ seconds to load a page.
 
  *Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
  *Author of: Hardcore Java (2003) and Maintainable Java (2012)*
  *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
  http://www.linkedin.com/pub/robert-simmons/40/852/a39*
 
 
  On Wed, Jan 8, 2014 at 11:40 AM, James Strachan-2 [via ActiveMQ] 
  ml-node+s2283324n4676121...@n4.nabble.com wrote:
 
  You might want to tone down the refresh rate on the Preferences page to
  see
  if that helps?
 
 
  On 8 January 2014 17:37, Christian Posta [hidden email]
 http://user/SendEmail.jtp?type=nodenode=4676121i=0
  wrote:
 
   i haven't noticed anything like this.
   what OS/browser are you using?
  
   On Sun, Jan 5, 2014 at 9:41 PM, kraythe [hidden email]
 http://user/SendEmail.jtp?type=nodenode=4676121i=1
  wrote:
I downloaded ActiveMQ 5.9.0 with Hawtio (in research to ugrade from
   5.8.0)
and I am experiencing such slowness in the console that it is
  unusable.
   Any
click takes up to a second for a reply. Any idea what I have
  configured
wrong? Or is it just not ready for prime time? Thanks in advance.
   
   
   
--
View this message in context:
  
 
 http://activemq.2283324.n4.nabble.com/ActiveMQ-5-9-0-Hawtio-Slow-tp4676028.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
  
  
  
   --
   Christian Posta
   http://www.christianposta.com/blog
   twitter: @christianposta
  
 
 
 
  --
  James
  ---
  Red Hat
 
  Email: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=4676121i=2
  Web: http://fusesource.com
  Twitter: jstrachan, fusenews
  Blog: http://macstrac.blogspot.com/
 
  Open Source Integration
 
 
  --
   If you reply to this email, your message will be added to the
  discussion below:
 
 
 http://activemq.2283324.n4.nabble.com/ActiveMQ-5-9-0-Hawtio-Slow-tp4676028p4676121.html
   To unsubscribe from ActiveMQ 5.9.0 Hawtio Slow, click here
 http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4676028code=a3JheXRoZUBnbWFpbC5jb218NDY3NjAyOHwzNzgyMDUzMDU=
 
  .
  NAMLhttp://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml



-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: ActiveMQ 5.9.0 Hawtio Slow

2014-01-08 Thread James Strachan
You might want to tone down the refresh rate on the Preferences page to see
if that helps?


On 8 January 2014 17:37, Christian Posta christian.po...@gmail.com wrote:

 i haven't noticed anything like this.
 what OS/browser are you using?

 On Sun, Jan 5, 2014 at 9:41 PM, kraythe kray...@gmail.com wrote:
  I downloaded ActiveMQ 5.9.0 with Hawtio (in research to ugrade from
 5.8.0)
  and I am experiencing such slowness in the console that it is unusable.
 Any
  click takes up to a second for a reply. Any idea what I have configured
  wrong? Or is it just not ready for prime time? Thanks in advance.
 
 
 
  --
  View this message in context:
 http://activemq.2283324.n4.nabble.com/ActiveMQ-5-9-0-Hawtio-Slow-tp4676028.html
  Sent from the ActiveMQ - User mailing list archive at Nabble.com.



 --
 Christian Posta
 http://www.christianposta.com/blog
 twitter: @christianposta




-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: hawtio console could not be opened

2013-11-13 Thread James Strachan
Which URL are you using - and do you see anything in your JavaScript
console for the browser - or the Network tab; is the HTML/CSS loaded OK? Is
the page completely blank? If so are you sure the URL is correct? Does
view-source on the page show any actual hawtio HTML?


On 13 November 2013 08:12, HellKnight hellkni...@foxmail.com wrote:

 I have two 5.9.0 brokers, one running under redhat 6.3 and one under
 windows
 xp sp3.
 I tried to access the new hawtio console, but the web browser only displays
 a blank page. I  tried chrome 3.0.197.11 and IE 6.0.2900.5512 and neither
 could work ,they both displays a blank page, and there is no error message.
 I searched through our forum  and google.com, it seems there is no similar
 case. Any ideas why this happens ? Thanks in advance



 --
 View this message in context:
 http://activemq.2283324.n4.nabble.com/hawtio-console-could-not-be-opened-tp4674301.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.




-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: hawtio console could not be opened

2013-11-13 Thread James Strachan
OK so its working fine in an up to date Chrome right? Thanks for letting us
know. We should probably recommend folks use Chrome or Safari on the
ActiveMQ website.

We've not done much testing of hawtio in IE8 (and were hoping noone would
even think of IE6 for a developer tool ;) but am sure there could be some
IE6/8 issues.


On 13 November 2013 15:03, HellKnight hellkni...@foxmail.com wrote:

 I just tried the newest version of chrome, and it works fine, so I am sure
 the url is correct. The version of my browser is the only thing that
 changes, so maybe this is the reason ? IE8 on the same computer didn't work
 ,though.  I upload a screenshot of IE8 , using url
 :http://localhost:8161/hawtio/

 http://activemq.2283324.n4.nabble.com/file/n4674333/IE.jpg  .



 --
 View this message in context:
 http://activemq.2283324.n4.nabble.com/hawtio-console-could-not-be-opened-tp4674301p4674333.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.




-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: Endless Failed to log in, Forbidden with hawt.io

2013-11-04 Thread James Strachan
Incidentally in later hawtio releases we tried to make the explicit
speciifying of rolePrincipleClasses optional which seems to make it easier
to authenticate on different containers (older karaf, tomcat etc) so maybe
upgrading to 1.2-M27 of hawtio might help?


On 4 November 2013 16:52, gmicky michal.gu...@gmail.com wrote:

 Hello Francesco,

 I was struggling with same issue and it was due to custom startup script
 for
 activemq which declared variable ACTIVEMQ_OPTS. If this variable is
 previously declared - options from /apache-activemq-5.9.0/bin/activemq
 script are not loaded and hawio authentication is not working.


 After you start activemq use ps and check that JVM is started with
 following
 options:
   -Djava.util.logging.config.file=logging.properties
 -Dhawtio.realm=activemq
 -Dhawtio.role=admins
 -Dhawtio.rolePrincipalClasses=org.apache.activemq.jaas.GroupPrincipal
 -Djava.security.auth.login.config=$ACTIVEMQ_CONF/login.config

 Without these you wont be able to authenticate into hawio

 Michal



 --
 View this message in context:
 http://activemq.2283324.n4.nabble.com/Endless-Failed-to-log-in-Forbidden-with-hawt-io-tp4673183p4673839.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.




-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: New Web Console...

2013-10-31 Thread James Strachan
Sirona is in the incubator and from a quick peek seems to be a library for
adding monitoring/counters/metrics and then storing them:
http://wiki.apache.org/incubator/SironaProposal

but its also got a web app too.

I'm sure we could add a plugin for Sirona to hawtio; I've raised an issue
to track it:
https://github.com/hawtio/hawtio/issues/701

As an aside, we've a plugin for querying ElasticSearch if the metrics are
stored there; and we've a plugin in Fuse for dumping metrics from MBeans
into ElasticSearch for historical charting and the like (in this module:
https://github.com/jboss-fuse/fuse/tree/master/insight/insight-metrics)

I guess using Sirona is another alternative to storing the metrics? It'd be
nice to have an ElasticSearch collector for Sirona, then the existing
ElasticSearch based plugin would just work ;)


From an ActiveMQ perspective; adopting Sirona would require changes to the
existing ActiveMQ MBeans right? Or can Sirona just act as a different
collector/persistence engine of metrics?


On 30 October 2013 14:53, Paul Gale paul.n.g...@gmail.com wrote:

 What on earth is sirona/hawtio

 On Tue, Oct 29, 2013 at 4:58 PM, Romain Manni-Bucau
 rmannibu...@gmail.com wrote:
  Hi guys, something to think about is sirona/hawtio I think. Any ideas?
  Goals are not exactly the same but there are some overlaps so I'd expect
  sirona amq, camel etc plugins.
  Le 29 oct. 2013 21:19, Hiram Chirino hi...@hiramchirino.com a écrit
 :
 
  You could also post process that hawtio bits.  It gets packaged in the
  assembly module.  Right now the
  assembly/src/main/descriptors/common-bin.xml file handles unpacking
  the hawtio bits into the activemq distro.  You could overwrite any
  bits that are needed there.
 
  On Fri, Oct 25, 2013 at 10:40 AM, James Carman
  ja...@carmanconsulting.com wrote:
   But, it's the ActiveMQ Web Console now, installed by default with the
   newest ActiveMQ.  Shouldn't the ActiveMQ PMC have some oversight into
   their web console?
  
   On Fri, Oct 25, 2013 at 10:36 AM, James Strachan
   james.strac...@gmail.com wrote:
   Its not an Apache project
  
  
   On 25 October 2013 15:35, James Carman ja...@carmanconsulting.com
  wrote:
  
   There is no PMC oversight to the changes?
  
   On Fri, Oct 25, 2013 at 10:33 AM, Claus Ibsen 
 claus.ib...@gmail.com
   wrote:
The github way of doing things
https://github.com/hawtio/hawtio
   
On Fri, Oct 25, 2013 at 3:56 PM, James Carman
ja...@carmanconsulting.com wrote:
If I want to submit a change to the new web console, how do I do
  that?
   
Thanks,
   
James
   
   
   
--
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
  
  
  
  
   --
   James
   ---
   Red Hat
  
   Email: jstra...@redhat.com
   Web: http://fusesource.com
   Twitter: jstrachan, fusenews
   Blog: http://macstrac.blogspot.com/
  
   Open Source Integration
 
 
 
  --
  Hiram Chirino
 
  Engineering | Red Hat, Inc.
 
  hchir...@redhat.com | fusesource.com | redhat.com
 
  skype: hiramchirino | twitter: @hiramchirino
 
  blog: Hiram Chirino's Bit Mojo
 




-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: New Web Console...

2013-10-25 Thread James Strachan
Its not an Apache project


On 25 October 2013 15:35, James Carman ja...@carmanconsulting.com wrote:

 There is no PMC oversight to the changes?

 On Fri, Oct 25, 2013 at 10:33 AM, Claus Ibsen claus.ib...@gmail.com
 wrote:
  The github way of doing things
  https://github.com/hawtio/hawtio
 
  On Fri, Oct 25, 2013 at 3:56 PM, James Carman
  ja...@carmanconsulting.com wrote:
  If I want to submit a change to the new web console, how do I do that?
 
  Thanks,
 
  James
 
 
 
  --
  Claus Ibsen
  -
  Red Hat, Inc.
  Email: cib...@redhat.com
  Twitter: davsclaus
  Blog: http://davsclaus.com
  Author of Camel in Action: http://www.manning.com/ibsen




-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: suggestion/feature request: prompt before allowing a purge/delete from the UI

2013-09-29 Thread James Strachan
On 29 September 2013 17:36, javaG zenma...@gmail.com wrote:

 Does hawtio plugin for activemq work for activemq 5.8 ?


Yeah; hawtio works with most things ;)
http://hawt.io/plugins/index.html

its more a question of how much functionality is available with a given
version  library.

e.g. in 5.8 of ActiveMQ and earlier, there's no support for retrying DLQ
messages (since those APIs for detecting DLQs appeared in 5.9); though you
can do most other things in ActiveMQ (create queues/topics, browse queues,
move messages, send messages etc).

-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: Activemq webconsole for multiple brocker

2013-08-14 Thread James Strachan
Great blog post Christian, keep up the great work! Would be good to
show the new move/delete/replay-of-DLQ messages too thats available in
5.9.x :)

I've just cut 1.2-M5 of hawtio which fixes those issues (thanks for
figuring them out  - especially the commons-codec issue!).

I also fixed this one too:
https://github.com/hawtio/hawtio/issues/472
to report more gracefully if we try to connect to a remote JVM and
can't due to an issue such as a wrong path, host name or port etc.

Finally 1.2-M5 has a new executable jar; so its super easy to get
started running hawtio; no need to muck about with tomcat/jetty/wars,
you can just download the executable jar and you're on your way to
hawtness.
http://hawt.io/getstarted/index.html

So hopefully we should be close to getting rid of these
remote-connection gremlins now.

Thanks for all your help!

On 14 August 2013 00:32, Christian Posta christian.po...@gmail.com wrote:
 I've added a step-by-step instruction here:

 http://www.christianposta.com/blog/?p=315

 Note, there are a couple of bugs to take care of in HawtIO to get this
 polished:

 https://github.com/hawtio/hawtio/issues/470

 and

 https://github.com/hawtio/hawtio/issues/471


 On Tue, Aug 13, 2013 at 2:55 AM, James Strachan 
 james.strac...@gmail.comwrote:

 I added a FAQ entry to hawtio on this topic in case it helps:

 https://github.com/hawtio/hawtio/blob/master/FAQ.md#how-do-i-connect-to-my-remote-jvm

 On 13 August 2013 10:35, James Strachan james.strac...@gmail.com wrote:
  Sorry you're having trouble connecting hawtio to your broker JVMs!
 
  All thats required for hawtio to connect to any remove JVM is that a
  jolokia agent can be added to it. This can be done in various ways
  though.
 
  By default if a JVM (e.g. an ActiveMQ broker) has no jolokia or jetty
  at all, you can use the Local tab of the Connect plugin (in 1.2.x of
  hawtio-default.war). The Local tab lists all local Java processes on
  the same machine (like JConsole does). For JVMs not running a jolokia
  agent already, there's a start button (on the right) which will
  dynamically add the jolokia JVM agent into the JVM. You can then click
  on the Agent URL link to connect into it.
 
  I just tried this on a local ActiveMQ 5.8.0 distro with Jetty disabled
   it works a treat.
 
  Note that the Local plugin only works when the JVM running hawtio has
  the hawtio-local-jvm-mbean plugin installed (which depends on the JVM
  finding the com.sun.tools.attach.VirtualMachine API that jconsole uses
  and is included in the hawtio-default.war). This also only works when
  the process is on the same machine as the JVM running hawtio. So a
  safer option is just to make sure there's a jolokia agent running in
  each JVM you want to manage with hawtio.
 
  There are a few different agents you can use:
  http://jolokia.org/agent.html
 
  e.g. a WAR agent, an OSGi agent or a JVM agent.
 
  If there's jetty, then try the WAR agent; otherwise try the JVM agent:
  http://jolokia.org/agent/jvm.html
 
  All this isn't an issue of ActiveMQ 5.9.x or later; as jolokia and
  hawtio are installed by default; but hopefully if you can get jolokia
  working (e.g. test it by accessing http://host:port/jolokia to see if
  you can view the jolokia version info).
 
  If you can get jolokia working in your JVM; then the Remote tab on the
  Connect plugin in hawtio should be able to connect to your JVM,.
 
  Hope that helps; do let us know how you get on getting Jolokia running
  in your broker JVM.
 
  On 9 August 2013 22:51, Chirag Pujara chiragpuj...@gmail.com wrote:
  I think i figured out what was wrong with my inital setup. I had
 commented
  out import for jetty.xml in activemq xml bcs I didnt wanted to start
  webconsole. But I guess I have to keep it if I want jolokia feature.
 
  In hawtio I used following config in Connect tab:
 
  hostname: localhost
  port: 8161
  path: /api/jolokia
  username:admin
  password: admin
  use proxy: yes
 
  but when I say connect remote server I dont see any activemq stuff
 there.
 
  any suggestions?
 
  thanks,
  chirag
 
 
 
  On Fri, Aug 9, 2013 at 2:55 PM, Christian Posta
  christian.po...@gmail.comwrote:
 
  Jolokia is started by default.
 
  Check out last section on this wiki:
  http://activemq.apache.org/rest.html
 
  You should be able to hit the rest management api (through jolokia) at
  http://localhost:8161/api/jolokia
 
  As for connecting to hawtio, there is a Connect tab that you should
 be
  able to use to connect to a remove JVM. I've seen this working at one
  point, but I just gave it a shot and it seems to not resolve correctly.
 
  Might have to get James a beer or two and maybe he can point us in
 the
  right direction :)
 
 
 
  On Fri, Aug 9, 2013 at 9:34 AM, Chirag Pujara chiragpuj...@gmail.com
  wrote:
 
   thanks. I read your blog. But I am running hawtio on tomcat. I want
 to
   monitor remote instance of activemq using hawtio.
  
   So i though of stating jolokia with activemq

Re: Activemq webconsole for multiple brocker

2013-08-14 Thread James Strachan
On 14 August 2013 22:20, Chirag Pujara chiragpuj...@gmail.com wrote:
 I was able to get it working with 5.8. thanks for in detail blog.

 I have question about hawtio:

 1. Can I configure hawtio so when I open it, it is already connected to
 remote activemq. I dont have to connect all time in hawtio.

All the pages in hawtio are bookmarkable; so you could just bookmark
pages you like.

Or you could connect to, say, 2 different servers; copy  paste the
browser URL, then add them to a markdown page inside hawtio's git
based wiki? Then you've your own wiki page to quickly connect to all
the JVMs you wanna look in?


 2. I am doing master/slave kind of configuration. Can I do failover url
 kind of settings in this tool.

Unfortunately not; unless you put some kind of HTTP proxy in front of
your brokers. Though if you're using Fuse Fabric with hawtio:
http://fuse.fusesource.org/fabric/, there's a nice UI of all your
containers so you can easily navigate into any JVM you wish etc.

-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: Activemq webconsole for multiple brocker

2013-08-13 Thread James Strachan
I added a FAQ entry to hawtio on this topic in case it helps:
https://github.com/hawtio/hawtio/blob/master/FAQ.md#how-do-i-connect-to-my-remote-jvm

On 13 August 2013 10:35, James Strachan james.strac...@gmail.com wrote:
 Sorry you're having trouble connecting hawtio to your broker JVMs!

 All thats required for hawtio to connect to any remove JVM is that a
 jolokia agent can be added to it. This can be done in various ways
 though.

 By default if a JVM (e.g. an ActiveMQ broker) has no jolokia or jetty
 at all, you can use the Local tab of the Connect plugin (in 1.2.x of
 hawtio-default.war). The Local tab lists all local Java processes on
 the same machine (like JConsole does). For JVMs not running a jolokia
 agent already, there's a start button (on the right) which will
 dynamically add the jolokia JVM agent into the JVM. You can then click
 on the Agent URL link to connect into it.

 I just tried this on a local ActiveMQ 5.8.0 distro with Jetty disabled
  it works a treat.

 Note that the Local plugin only works when the JVM running hawtio has
 the hawtio-local-jvm-mbean plugin installed (which depends on the JVM
 finding the com.sun.tools.attach.VirtualMachine API that jconsole uses
 and is included in the hawtio-default.war). This also only works when
 the process is on the same machine as the JVM running hawtio. So a
 safer option is just to make sure there's a jolokia agent running in
 each JVM you want to manage with hawtio.

 There are a few different agents you can use:
 http://jolokia.org/agent.html

 e.g. a WAR agent, an OSGi agent or a JVM agent.

 If there's jetty, then try the WAR agent; otherwise try the JVM agent:
 http://jolokia.org/agent/jvm.html

 All this isn't an issue of ActiveMQ 5.9.x or later; as jolokia and
 hawtio are installed by default; but hopefully if you can get jolokia
 working (e.g. test it by accessing http://host:port/jolokia to see if
 you can view the jolokia version info).

 If you can get jolokia working in your JVM; then the Remote tab on the
 Connect plugin in hawtio should be able to connect to your JVM,.

 Hope that helps; do let us know how you get on getting Jolokia running
 in your broker JVM.

 On 9 August 2013 22:51, Chirag Pujara chiragpuj...@gmail.com wrote:
 I think i figured out what was wrong with my inital setup. I had commented
 out import for jetty.xml in activemq xml bcs I didnt wanted to start
 webconsole. But I guess I have to keep it if I want jolokia feature.

 In hawtio I used following config in Connect tab:

 hostname: localhost
 port: 8161
 path: /api/jolokia
 username:admin
 password: admin
 use proxy: yes

 but when I say connect remote server I dont see any activemq stuff there.

 any suggestions?

 thanks,
 chirag



 On Fri, Aug 9, 2013 at 2:55 PM, Christian Posta
 christian.po...@gmail.comwrote:

 Jolokia is started by default.

 Check out last section on this wiki:
 http://activemq.apache.org/rest.html

 You should be able to hit the rest management api (through jolokia) at
 http://localhost:8161/api/jolokia

 As for connecting to hawtio, there is a Connect tab that you should be
 able to use to connect to a remove JVM. I've seen this working at one
 point, but I just gave it a shot and it seems to not resolve correctly.

 Might have to get James a beer or two and maybe he can point us in the
 right direction :)



 On Fri, Aug 9, 2013 at 9:34 AM, Chirag Pujara chiragpuj...@gmail.com
 wrote:

  thanks. I read your blog. But I am running hawtio on tomcat. I want to
  monitor remote instance of activemq using hawtio.
 
  So i though of stating jolokia with activemq assuming its not running.
 But
  i think java doesnt support that or I dont know whats going on.
 
  here is what I was doing:
 
  /opt/gwx/apache-activemq-5.8.0/jdk1.7.0_25/bin/java
  -javaagent:jolokia-jvm-1.1.3-agent.jar=port=7779,host=localhost -Xms1G
  -Xmx1G -Djava.util.logging.config.file=logging.properties
  -Dcom.sun.management.jmxremote.port=8100
 
 
 -Dcom.sun.management.jmxremote.password.file=/opt/gwx/apache-activemq-5.8.0/activemq_8100/conf/jmx.password
 
 
 -Dcom.sun.management.jmxremote.access.file=/opt/gwx/apache-activemq-5.8.0/activemq_8100/conf/jmx.access
  -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote
  -Dcom.sun.management.jmxremote
  -Djava.io.tmpdir=/opt/gwx/apache-activemq-5.8.0/activemq_8100/tmp
  -Dactivemq.classpath=/opt/gwx/apache-activemq-5.8.0/activemq_8100/conf;
  -Dactivemq.home=/opt/gwx/apache-activemq-5.8.0
  -Dactivemq.base=/opt/gwx/apache-activemq-5.8.0/activemq_8100
  -Dactivemq.conf=/opt/gwx/apache-activemq-5.8.0/activemq_8100/conf
  -Dactivemq.data=/opt/gwx/apache-activemq-5.8.0/activemq_8100/data  -jar
  /opt/gwx/apache-activemq-5.8.0/bin/activemq.jar start
  -Dactivemq.data=/opt/gwx/activemqdata -DopenwirePort=61616
 -DamqpPort=5600
  -DrmiPort=8100
 
  it starts jolokia but then doesnt recognize rest of the command. and
 print
  java help options
 
  output:
 
  INFO: No access restrictor found

Re: AMQP Bridge

2013-08-12 Thread James Strachan
That issue is about the AMQP camel component; the activemq camel
component can connect to ActiveMQ through any ActiveMQ client
supporting URL

On 12 August 2013 16:26, RJPercival rob.perciva...@gmail.com wrote:
 Unfortunately, a quick search reveals that Camel does not yet support AMQP
 1.0 (https://issues.apache.org/jira/browse/CAMEL-5891). Presumably this
 makes establishing a bridge over AMQP 1.0 extremely difficult?



 --
 View this message in context: 
 http://activemq.2283324.n4.nabble.com/AMQP-Bridge-tp4670281p4670288.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: A Hawt.IO mailing list?

2013-07-18 Thread James Strachan
Sorry for the delay getting back to you; been on vacation  travelling
quite a bit and got behind on email

Your issue sounds like the perfect use of github issues; report
something's not working  then we can all help trying to figure out
how to fix it. (Its then easy to link the issue with the
commit/version automatically etc).

As it happens someone reported this recently and its been fixed in
snapshot; we should have a distro soon you can try:
https://github.com/hawtio/hawtio/issues/385

for now, try using 1.2-SNAPSHOT and this should hopefully be less noisy.


On 2 July 2013 15:07, Paul Gale paul.n.g...@gmail.com wrote:
though raising a github issue is the quickest way to communicate with folks 
on hawtio
 Sure. I completely agree that using the Github issue list is the right
 place for raising an actual issue but seems somewhat awkward for
 asking questions.

 So, even though I'm using the offline version of 1.2-M1 it keeps
 whining as shown below.

 jvm 1| ERROR | Failed to pull from the remote git repo with
 credentials null. Reason:
 org.eclipse.jgit.api.errors.InvalidConfigurationException: No value
 for key remote.origin.url found in configuration
 jvm 1| org.eclipse.jgit.api.errors.InvalidConfigurationException:
 No value for key remote.origin.url found in configuration
 jvm 1| at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:231)

 It also displays a warning on startup caused by some lower exception.
 Why is this?

 jvm 1|  INFO | Initialised an empty git configuration repo at
 /tmp/hawtio-6647093161915035773/config
 jvm 1|  WARN | Failed to startup blueprint container.
 org.osgi.service.blueprint.container.ComponentDefinitionException:
 Unable to intialize bean jvmList
 jvm 1| org.osgi.service.blueprint.container.ComponentDefinitionException:
 Unable to intialize bean jvmList
 jvm 1| at
 org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:708)
 jvm 1| at
 org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:825)
 jvm 1| at
 org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:786)
 jvm 1| at
 org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)
 jvm 1| at
 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
 jvm 1| at java.util.concurrent.FutureTask.run(FutureTask.java:166)
 jvm 1| at
 org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)
 jvm 1| at
 org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)
 jvm 1| at
 org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)
 jvm 1| at
 org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:341)


 Thoughts on how to stop this?

 Thanks,
 Paul

 On Tue, Jul 2, 2013 at 5:14 AM, James Strachan james.strac...@gmail.com 
 wrote:
 Sorry you're having issues; though raising a github issue is the
 quickest way to communicate with folks on hawtio (or bring it up here
 too). Here's the current community links
 http://hawt.io/community/index.html

 though we've not yet setup at google group - as so far github issues
 have worked really well (much easier to keep track of and work with
 than google groups so far); but if folks really really want a google
 group we can spin one up; but so far we've found github issues tend to
 be easier for folks to create, edit, open/close/comment on etc

 On 1 July 2013 23:18, Paul Gale paul.n.g...@gmail.com wrote:
 Does anyone know of if there's a dedicated mailing list for communicating
 with the committers of Hawt.IO?

 The only means of communication I can see are the issue list on the Github
 page and some IRC channel, neither of which are particularly useful.

 It seems a lot has changed with the latest download to the extent that it
 has issues working with ActiveMQ 5.8.0 without Karaf. 'Blueprint'
 exceptions all over the place.



 --
 James
 ---
 Red Hat

 Email: jstra...@redhat.com
 Web: http://fusesource.com
 Twitter: jstrachan, fusenews
 Blog: http://macstrac.blogspot.com/

 Open Source Integration



-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: A Hawt.IO mailing list?

2013-07-02 Thread James Strachan
Sorry you're having issues; though raising a github issue is the
quickest way to communicate with folks on hawtio (or bring it up here
too). Here's the current community links
http://hawt.io/community/index.html

though we've not yet setup at google group - as so far github issues
have worked really well (much easier to keep track of and work with
than google groups so far); but if folks really really want a google
group we can spin one up; but so far we've found github issues tend to
be easier for folks to create, edit, open/close/comment on etc

On 1 July 2013 23:18, Paul Gale paul.n.g...@gmail.com wrote:
 Does anyone know of if there's a dedicated mailing list for communicating
 with the committers of Hawt.IO?

 The only means of communication I can see are the issue list on the Github
 page and some IRC channel, neither of which are particularly useful.

 It seems a lot has changed with the latest download to the extent that it
 has issues working with ActiveMQ 5.8.0 without Karaf. 'Blueprint'
 exceptions all over the place.



-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: ActiveMq Admin console

2013-05-24 Thread James Strachan
The ActiveMQ tab (in 1.2) - I think it was called Messaging in older
hawtio releases - should appear if there are the org.apache.activemq
mbeans in JMX. (Make sure you enable JMX in your ActiveMQ
configuration)

On 24 May 2013 10:49, James Strachan james.strac...@gmail.com wrote:
 Do you see the ActiveMQ tab in the UI?

 On 24 May 2013 10:38, pp123 prashantp...@gmail.com wrote:
 That was browser problem. It worked in Opera.
 But this shows JMX view (Jconsole) . I need view similar to :
 http://localhost:8161/admin.




 --
 View this message in context: 
 http://activemq.2283324.n4.nabble.com/ActiveMq-Admin-console-tp4667435p4667446.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.



 --
 James
 ---
 Red Hat

 Email: jstra...@redhat.com
 Web: http://fusesource.com
 Twitter: jstrachan, fusenews
 Blog: http://macstrac.blogspot.com/

 Open Source Integration



-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: Alternative ActiveMQ and Camel status web site

2013-04-24 Thread James Strachan
On 22 April 2013 21:55, danny-andersen danny_ander...@yahoo.com wrote:
 hawt.io is pretty awesome.

Thanks!

 I was learning jquery and knocked this up as a
 training exercise and thought I would share it.

Great stuff.

Incidentally now you've got your head around jquery, I highly
recommend you try learn angularjs - its heaps of fun - and way more
productive once you get the knack of it:
http://angularjs.org/

even just grokking the examples on the home page takes you lots of the
way there. I've written UI stuff in most UI/web frameworks 
technologies out there and I can safely say that angularjs is 10X more
productive than most other things around; its truly amazing.

We've been maintaining a list of handy links to angularjs
resources/articles/blogs/videos here:
http://hawt.io/developers/index.html

in particular these, short videos are awesome!
http://www.egghead.io/

once you get the hang of it, to help have a bit of fun, learn more
angularjs and help improve ActiveMQ web tooling, you could have a play
at contributing to hawtio too :). We love contributions!
http://hawt.io/contributing/index.html

we keep a list of apprentice tasks to help folks get started with easier stuff:
https://github.com/hawtio/hawtio/issues?labels=apprentice+taskspage=1sort=updatedstate=open

or there's all the activemq stuff pending here:
https://github.com/hawtio/hawtio/issues?labels=activemqpage=1sort=updatedstate=open

Enjoy! :)

--
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: STOMP client

2012-12-13 Thread James Strachan
there's a bunch of clients here...
http://stomp.github.com/implementations.html

you could just telnet in to ActiveMQ and use that as a STOMP client?
http://fusesource.com/docs/broker/5.4/connectivity_guide/BHIJBDJH.html

On 13 December 2012 12:10, Ilya Zvyagin master...@gmail.com wrote:
 Does AMQ as a project provide a STOMP-based client for a message broker (AMQ
 in particular),
 or I should use some 3d party STOMP connector for Java for this?

 I do have STOMP listener turned on on the AMQ broker server side.
 I need a small client to be able only to produce messages for the broker in
 my client application.
 I have to use a limited JRE (1.5) for this and I don't want to use JMS
 therefore.

 Thanks.



 --
 View this message in context: 
 http://activemq.2283324.n4.nabble.com/STOMP-client-tp4660600.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: Reorder of messages

2012-10-30 Thread James Strachan
On 30 October 2012 14:32, Gary Tully gary.tu...@gmail.com wrote:
 using priority support should do it, but there is no api that allows
 you to change the order of a pending message on a queue. You would
 have to consume and re send.

 Using the jms api, find the message using a browse, consumer with
 selector matching the message id and issue a new message send.

 You could maybe build that logic with camel and have it kicked off
 with a specific event on an update queue.

Here's the documentation on the Resequencer which can consume from a
queue, reorder the messages and send to another queue
http://camel.apache.org/resequencer.html



-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: Does the jms vs amqp comparison article have any feedback from activemq?

2012-10-25 Thread James Strachan
On 24 October 2012 23:37, Sean K sk92...@gmail.com wrote:
 Has anyone responded to this article written by Mark Richards about
 AMQP and JMS (includes ActiveMQ)?

 Specifically:


 This means that message clients using AMQP are completely agnostic as
 to which AMQP clients API or
 AMQP message broker you are using.   -- I remember hearing something
 like that about Java -- Write once, run everywhere -- which was a lie.

 Or, While it is true vendors such as SonicMQ, ActiveMQ, and HornetQ
 provide some level of cross platform interoperability, they do so
 through proprietary protocols, APIs, and client libraries.   ...   My
 thought is -- is this really true?

You can already use STOMP - an open cross platform interoperable wire
protocol (that has much wider adoption among clients and brokers) with
Sonic, ActiveMQ and HornetQ today (the latter 2 having native STOMP
support built in). So the article is sounding a bit bogus already :)
http://stomp.github.com/


 I thought all of ActiveMQ is open
 source via Apache, thus it should be another standard that should be a
 louder standard than AMQP.

 Last, how different is openwire protocol from the AMQP protocol?

OpenWire was created years before AMQP became public, though is only
used by ActiveMQ AFAIK. Other than that they are both binary wire
protocols for messaging (openwire supporting natively all the things
ActiveMQ users need to do).

-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: Fwd: Message groups enhancement feature request

2011-07-01 Thread James Strachan
So it sounds like the current Message Groups behaviour is fine; its
just you want to ensure fair load balancing of the message groups
across consumers right? So if lots of other clients are restarted; the
long running clients could end up claiming too many of the message
groups?

I wonder if just recycling consumers every now and again would do the
trick? i.e. a pure client side thing to terminate a consumer every now
and again to force rebalancing of message groups?

(Getting the broker to automatically recycle consumers would be ideal;
but then it'd have to know that a consumer has no pending acks in a
particular message group to avoid the issue of parallel consumption in
a single message group).


On 1 July 2011 08:57, Martin C. mart...@gmx.at wrote:
 Hi,

 My issue is that in a dynamically load-balancing scenario with scaling
 the number of consumers up/down, long-living consumers will tend to
 gather all available message groups and newly created won't have
 anything available. Even if a newly created consumer gets a new
 message group, it will only receive this new message group and in case
 messages within a group are rare, it is likely to be removed by
 downscaling after some idle time, as all other messages went to the
 older consumer, releasing the message group and making it more likely
 that the long-living consumer will also get one of those messages and
 gets this group assigned additionally to all the ones it already has.

 I was thinking about using JMSXGroupSeq as well, but as far as I
 understand it (and the linked article), it wouldn't help me to reach
 my goal: I want to consume messages within a group one at a time,
 where I don't care which consumer consumes it, though. I want to
 ensure the following:

 Producer produces Msg1, Msg2, Msg3 within Group1.
 Consumer1: handles Msg1
 Consumer1: handles Msg2
 Consumer2: handles Msg3

 All I care about is, that Msg1 and Msg2 and Msg3 are not consumed in
 parallel. As far as I understood, setting JMSXGroupSeq to -1 on the
 three messages wouldn't give me this guarantee, would it? It would
 rather result in Msg1 being consumed by Consumer1 and Msg2 being
 consumed by Consumer 2 in parallel, wouldn't it?

 Thanks for your input!

 Best regards,
 Martin

 On Fri, Jul 1, 2011 at 6:21 AM, boday ben.o...@initekconsulting.com wrote:
 Is your issue that certain consumers become too slow?  If so, you can always
 set the JMSXGroupSeq header to -1 to force a new consumer (maybe set this
 periodically or after a certain number of messages)...

 here is a good article that discusses this a bit...

 http://scottcranton.blogspot.com/2010/09/activemq-message-groups.html

 Either way, I'd think this could be a feature of the message groups.
 Basically let you specify a frequency (either elapsed time or message count)
 to force a new consumer for a group.  Would serve to better randomize the
 load across consumers to protect against slow consumers, etc...


 Martin C. wrote:

 Hi,

 we currently use message groups to ensure ordered delivery of messages
 within a given group. As noted on the documentation for message
 groups, this often does not scale very well with variable consumer
 counts, as in this case the oldest consumers will hog all message
 groups.

 In our use-case, and I suppose this might apply to others as well, we
 simply don't care which consumer consumes which message, but only,
 that the next message from the same message group is not consumed
 before the first has been processed. So my idea would be to add a
 configuration option, that a consumer will release the message group
 directly after consuming its current message, releasing the message
 group for re-distribution to other brokers.

 Would something like this be possible / do I overlook some downside of
 this approach?

 Best regards,
 Martin



 --
 View this message in context: 
 http://activemq.2283324.n4.nabble.com/Fwd-Message-groups-enhancement-feature-request-tp3635293p3637432.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





-- 
James
---
FuseSource
Email: ja...@fusesource.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration and Messaging


Re: ActiveMQ 5.4.1 slower than ActiveMQ 5.2???

2010-11-18 Thread James Strachan
On 18 November 2010 15:06, magellings mark.gelli...@qg.com wrote:
 Hi.

 We're testing out ActiveMQ 5.4.1 and it is much slower than ActiveMQ 5.2.
 In our test case, with v5.2 we were able to process about 520,000 messages
 in about 9 hrs but with ActiveMQ 5.4.1 it takes 18hrs to process 21,000
 messages.

Thats very slow. Thats barely 1000 messages an hour; ActiveMQ
typically can typically do a 1000 or so a *second* when running on a
reasonably new laptop, so its about 3000X too slow :)

Could you give us any idea what your test case is doing?
-- 
James
---
FuseSource
Email: ja...@fusesource.com
Web: http://fusesource.com
Twitter: jstrachan
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: ActiveMQ vs. Camel vs. Qpid

2010-08-26 Thread James Strachan
On 26 August 2010 11:53, heapifyman heapify...@gmail.com wrote:
 Hello,

 I am quite new to the whole messaging thing and I am a bit confused about
 the differences between ActiveMQ, Camel and Qpid. Especially, which tool
 would be suited best for which scenarios?

So ActiveMQ and Qpid are both message brokers. ActiveMQ is very
popular (when nabble used to show an activity ranking, ActiveMQ was
usually in the top 5 Apache projects); its probably the most popular
open source message broker and has been around along time, used in a
large number of production settings for years  has loads of advanced
features and can support a massive range of different requirements,
protocols, network topologies  quality of service in messaging. Qpid
is a relative newcomer that is trying to implement the AMQP
specification which should hit 1.0 any time now AFAIK.

e.g. compare the traffic on the user lists to get an idea of their
relative usage...
http://activemq.markmail.org/search/?q=activemq#query:activemq%20list%3Aorg.apache.activemq.users+page:1+state:facets
http://apache.markmail.org/search/?q=qpid#query:qpid%20list%3Aorg.apache.incubator.qpid-users+page:1+state:facets

Or google trends
http://www.google.com/trends?q=qpid%2C+activemq


Camel on the other hand is an integration framework for implementing
the Enterprise Integration Patterns. So its a framework for routing,
mediating  transforming messages. Camel is middleware agnostic - it
can work with all of these technologies...
http://camel.apache.org/components.html

Camel can implement these Enterprise Integration Patterns...
http://camel.apache.org/enterprise-integration-patterns.html

Camel is also integrated into ActiveMQ out of the box so its easy to
route messages to  from ActiveMQ with any of the other technologies
and protocols supported by Camel
http://activemq.apache.org/enterprise-integration-patterns.html


BTW there's a couple of great books coming out on ActiveMQ and Camel
if you want to learn more
http://fusesource.com/fuse/apache-books/

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: ActiveMQ vs. Camel vs. Qpid

2010-08-26 Thread James Strachan
On 26 August 2010 11:53, heapifyman heapify...@gmail.com wrote:
 Hello,

 I am quite new to the whole messaging thing and I am a bit confused about
 the differences between ActiveMQ, Camel and Qpid. Especially, which tool
 would be suited best for which scenarios?

To specifically answer this part of your question; if you want to
integrate stuff together - whether the stuff comes from files,
databases, message brokers, web services or whatever, I'd recommend
Camel. Its what its great for.

If you want

* to connect your systems together using a high performance reliable
message broker
* a reliable  high performance load balancing (with optional
persistence  transactions) of requests across your services
* to disseminate business events across your systems using a variety
of protocols like OpenWire / Stomp / REST / WebSockets

then I'd recommend ActiveMQ.

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: ActiveMQ to Websphere MQ

2010-08-14 Thread James Strachan
If you want to concurrently consume from ActiveMQ (or any JMS) with
Camel, just set the concurrentConsumers property on the URI (or
configure the component/endpoint).

See
http://camel.apache.org/jms.html

Note that concurrent consumers break order of messages on a queue. To
fix this using ActiveMQ you can use Message Groups
http://activemq.apache.org/message-groups.html

On 31 March 2010 16:03, sweenma mark.swee...@verizonwireless.com wrote:

 Hi,
 I am new to ActiveMQ and Q'ing in general, so I will do my best to explain
 the issue and ask for your patience. I followed the suggestions of many
 postings on how to get ActiveMQ to forward msg's to Websphere MQ using
 camel. I got it to work, however the amount of time it takes to forward the
 msg from ActiveMQ to Websphere MQ is very high, around 2 secs. I enabled the
 logging and I noticed that it appears that the communication between
 ActiveMQ and WebSphere MQ runs 1 thread at a time. For example, I have a
 simple multithreaded producer that puts msg's in to the ActiveMQ. ActiveMQ
 is configured to forward the msg's to WebSphere MQ and then I have a simple
 MDB listener to read the msg's from the WebSphere MQ. With logging enabled I
 can see a msg being processed by a thread and then another msg being
 processed by another thread after the first thread completes. Here is a
 samle of the log:

 2010-03-31 08:32:44,743 [DefaultMessageListenerContainer-29]
 org.apache.activemq.ActiveMQMessageConsumer - ID:WNJ10002LDVSBAG
 -1559-1270038729745-2:0:1:1 received message: MessageDispatch {commandId =
 0, responseRequired = false, consumerId =
 ID:WNJ10002LDVSBAG-1559-1270038729745-2:0:1:1,

 lots of other log entries with the same thread id
 DefaultMessageListenerContainer-29 followed by the next msg log entry:
 2010-03-31 08:32:46,539 [DefaultMessageListenerContainer-30]
 org.apache.activemq.ActiveMQMessageConsumer - ID:WNJ10002LDVSBAG
 -1559-1270038729745-2:0:1:1 received message: MessageDispatch {commandId =
 0, responseRequired = false, consumerId =
 ID:WNJ10002LDVSBAG-1559-1270038729745-2:0:1:1

 and so on for each msg that was put into the ActiveMQ queue. I noticed that
 the ID for each ActiveMQMessageConsumer is the same, however I am not sure
 if this is relavant or not.
 I am using activemq V5.2.0I with Java V1.5. I pasted a copy of the
 activemq.xml file below. I am really stuck here and would appreciate any
 help. TIA.

 beans
  xmlns=http://www.springframework.org/schema/beans;
  xmlns:amq=http://activemq.apache.org/schema/core;
  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-2.0.xsd
  http://activemq.apache.org/schema/core
 http://activemq.apache.org/schema/core/activemq-core.xsd
  http://activemq.apache.org/camel/schema/spring
 http://activemq.apache.org/camel/schema/spring/camel-spring.xsd;

    !-- Allows us to use system properties as variables in this
 configuration file --
    bean
 class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
         property name=locations

 valuefile:///${activemq.base}/conf/credentials.properties/value
         /property
    /bean

    broker xmlns=http://activemq.apache.org/schema/core;
 brokerName=mylaptop persistent=false
 dataDirectory=${activemq.base}/data useJmx=false

        !-- Destination specific policies using destination names or
 wildcards --
        destinationPolicy
            policyMap
                policyEntries
                    policyEntry queue= memoryLimit=5mb/
                    policyEntry topic= memoryLimit=5mb
                      !-- you can add other policies too such as these
                        dispatchPolicy
                            strictOrderDispatchPolicy/
                        /dispatchPolicy
                        subscriptionRecoveryPolicy
                            lastImageSubscriptionRecoveryPolicy/
                        /subscriptionRecoveryPolicy
                      --
                    /policyEntry
                /policyEntries
            /policyMap
        /destinationPolicy

        destinations
            queue name=testRIMQ physicalName=RIMQ /
        /destinations

        !-- Use the following to configure how ActiveMQ is exposed in JMX
 --
        managementContext
            managementContext createConnector=false/
        /managementContext

        !-- The store and forward broker networks ActiveMQ will listen to
 --
        networkConnectors
        /networkConnectors

        persistenceAdapter
            amqPersistenceAdapter syncOnWrite=false
 directory=${activemq.base}/data indexPageSize=16kb
 maxFileLength=32mb/
        /persistenceAdapter


        sslContext
            sslContext keyStore=file:${activemq.base}/conf/broker.ks
 keyStorePassword=password
 trustStore=file:${activemq.base}/conf/broker.ts
 trustStorePassword=password/
        /sslContext

        !--  The 

Re: How do I determine what a consumer is being removed.

2010-08-14 Thread James Strachan
Are you sure you are setting your caching levels correctly so JMS
connections, sessions, producers  consumers are being reused? Eg if
you are using camel, use the activemq component - not the jms one -
then caching is set up correctly for you by default.

http://activemq.apache.org/jmstemplate-gotchas.html

On Friday, August 13, 2010, Robillard, Greg L greg.l.robill...@lmco.com wrote:
 I am running a stability test on activemq and periodically, my consumers are 
 being removed and they shouldn't be.  How can I determine the cause of the 
 disconnect.  Is it client, network, activemq, etc.

 2010-08-13 16:18:49,456 | DEBUG | fltwinds2 removing consumer: 
 ID:EAGD9722385-1439-1281714133716-0:1:1:1 for destination: 
 temp-queue://ID:EAGD9722385-1439-1281714133716-0:1:1 | 
 org.apache.activemq.broker.region.AbstractRegion | ActiveMQ Transport: 
 tcp:///129.218.85.48:1448


 apache-activemq-5.3.2

 using non-persistent queues

 using openwire jms connections

 Running 30 concurrent connections with anywhere from 300 - 500 messages per 
 minute.

 policyEntry queue= producerFlowControl=false memoryLimit=5mb
                   pendingMessageLimitStrategy
                     prefetchRatePendingMessageLimitStrategy 
 multiplier=1.5/
                   /pendingMessageLimitStrategy
                   pendingQueuePolicy
                     fileQueueCursor/
                   /pendingQueuePolicy
                 /policyEntry


 !-- System Useage --
         systemUsage
             systemUsage
                 memoryUsage
                     memoryUsage limit=128 mb/
                 /memoryUsage
                 storeUsage
                     storeUsage limit=1 gb/
                 /storeUsage
                 tempUsage
                     tempUsage limit=100 mb/
                 /tempUsage
             /systemUsage
         /systemUsage


-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: AMQ to Websphere MQ performance

2010-08-14 Thread James Strachan
Sounds like you need to configure the JMS caching levels  wrap your
ConnectionFactory in a CachingConnectionFactory

http://activemq.apache.org/jmstemplate-gotchas.html

On Friday, August 13, 2010, Craig Brumfield
craig.brumfi...@apihotels.com wrote:

 I configured a connection from my AMQ to Webspere MQ and can send messages,
 but they are sent very slowly.  It seems like each new message is a new
 connection to MQ.  If you browser consumers on my outgoing queue, it always
 shows 1, but if you click to view this consumer, it says it is invalid.

 As a point of reference, there were 1000 messages about 6k in size dropped
 on the MQ and I received these at the rate of 3-5 per second, across a VPN
 between Germany and western US.  But sending messages 20% of this size are
 sent to MQ at only 1 per second or less.

 How can I trace more detail about what is happening with this connection?

 Thanks,
 Craig
 --
 View this message in context: 
 http://old.nabble.com/AMQ-to-Websphere-MQ-performance-tp29433490p29433490.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Help on Message Group

2010-08-02 Thread James Strachan
On 2 August 2010 18:49, Don Santillan donzym...@gmail.com wrote:
 Hello,

 I am trying to create an application that would use a message queue that is
 consumed by multiple consumers running concurrently but would still maintain
 the order of message processing by a certain ID.

 For example, I have a set of messages added to a queue:
 ID1-M1
 ID1-M2
 ID2-M1
 ID3-M1
 ID2-M2
 ID3-M2

 I need the Messages coming from ID1 get consumed by Consumer1, ID2 to
 Consumer2, and ID3 to Consumer3, that maintains order such as Consumer1 will
 process ID1-M1 and then ID1-M2, Consumer 2 process ID2-M1 and then ID2-M2,
 and Consumer3 process ID3-M1 and then ID3-M2.

 I also like to have the Consumers come from a ConsumerPool so that if a
 consumer is done processing with the messages, it will go back to the pool
 and become available for other Messages owned by another ID. I also like to
 have the pool a behavior that would create a new consumer in the pool if a
 consumer dies so that a fix number of consumer is available from the pool.

 I saw in the documentation that the Message Group, I think, fits into the
 requirement perfectly. Process messages asynchronous, maintain message
 order, and failover feature.

 Unfortunately, I was not able to understand completely how to do it. I
 understand that the producer needs to set a property JMSXGroupID to
 identify which group the message will get associated and consumed by a
 single consumer. What I don't understand is how the broker will select which
 consumer to pass the message to? Even more, where will the consumers come
 from? Do I need to create, for example, 20 consumers and subscribe them all
 to the broker? What if the consumer one by one dies, can the broker
 automatically recreate all 20 consumers?

 It would be greatly appreciated if anybody can write a simple code that
 would show how consumers get subscribed to the broker and have an
 explanation that my requirement would really fit into Message Group. If this
 is not possible through Message Group, any suggestions on how to implement
 this?

The broker chooses a consumer on demand to fill a hash bucket. As
consumers die new consumers get chosen. So all you need to do is add
message group IDs to your message (as specific as possible to use the
biggest possible number of hash buckets) and create a number of
consumers. There's no need to manually assign consumers to individual
message group IDs or anything like that.

Sometimes prefetch can be set high which can reduce the amount of
concurrent consumers used; if you are only sending a small number of
messages you might find that only a small number of consumers are
actually used.
http://activemq.apache.org/i-do-not-receive-messages-in-my-second-consumer.html
http://activemq.apache.org/what-is-the-prefetch-limit-for.html

so you might want to set the prefetch to say 1 if you've only a
relatively small number of messages to ensure a good spread across
your consumers.

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: JMSPriority and activeMQ

2010-07-27 Thread James Strachan
On 27 July 2010 07:01,  andrew.mar...@uk.bnpparibas.com wrote:
 Yes, I reckon they should be int. Maybe setPriority should throw an
 exception if the input priority is out of range.

I'd have thought we'd have to add this to the JMS TCK as its a change
in behaviour. Maybe for now just log a warning? That won't have any
TCK issues

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Priority message

2010-06-15 Thread James Strachan
On 15 June 2010 07:54, astlm monica.astudi...@tic.alten.es wrote:

 I'm sorry but I did not understand how Resequencer work on, I have read in
 more detail how it works, and although not ideal, because only order a
 number of messages or messages received over a period time, It can be a
 solution.

Thats how priority queues work too. How else can you know how long or
how many messages to reorder?


 I think I have to define two queues, one for input and another oner for
 output.

Correct. It also lets you sort on much more fine grained things -
including expressions which extract values from your message payload
too if JMSPriority is not enough.


 Is only necesary to define on broker.xml the Resequencer?

 camelContext id=camel xmlns=http://camel.apache.org/schema/spring;
  route
    from uri=input /
    resequence
      simplebody/simple
      to uri=output /
      batch-config batchSize=300 batchTimeout=4000
 allowDuplicates=true reverse=true /
    /resequence
  /route
 /camelContext

 With these configuration, The producer connect with input queue and the
 consumer with output queue.

You can put the above XML into any spring XML in any JVM really;
though feel free to use it in the broker's XML file.

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Priority message

2010-06-15 Thread James Strachan
On 15 June 2010 13:03, astlm monica.astudi...@tic.alten.es wrote:

 The first, thank you for the answer.


 James.Strachan wrote:

 On 15 June 2010 07:54, astlm monica.astudi...@tic.alten.es wrote:

 I'm sorry but I did not understand how Resequencer work on, I have read
 in
 more detail how it works, and although not ideal, because only order a
 number of messages or messages received over a period time, It can be a
 solution.

 Thats how priority queues work too. How else can you know how long or
 how many messages to reorder?

 You are right.
 I was thought that every message recived to be placed in the correct
 position according to their priority, instead of waiting for a number of
 messages or to place, but I guess is that this is very hard and slow.

 I think I have to define two queues, one for input and another oner for
 output.

 Correct. It also lets you sort on much more fine grained things -
 including expressions which extract values from your message payload
 too if JMSPriority is not enough.


 Is only necesary to define on broker.xml the Resequencer?

 camelContext id=camel xmlns=http://camel.apache.org/schema/spring;
  route
    from uri=input /
    resequence
      simplebody/simple
      to uri=output /
      batch-config batchSize=300 batchTimeout=4000
 allowDuplicates=true reverse=true /
    /resequence
  /route
 /camelContext

 With these configuration, The producer connect with input queue and the
 consumer with output queue.

 You can put the above XML into any spring XML in any JVM really;
 though feel free to use it in the broker's XML file.

 I use activemq 5.3.2 with camel 2.2.0, according to specification,
 allowDuplicates and reverse are available from the camel 2.4.
 http://camel.apache.org/resequencer.html
 Any activemq version have camel 2.4?

Yes - you can use newer Camel releases with older ActiveMQ releases typically.

 I tried download camel 2.4, but It´s not avalilable.
 http://camel.apache.org/download.html

2.4 isn't released yet I'm afraid - 2.3 is the most recent release.
You can use 2.4-SNAPSHOT for now if you like.


 I have a resequencer by JMSPriority, but It doesn`t get reverse orden and
 It doesn´t allow duplicates.

To reverse order you could use an expression like 100 -
headers.JMSPriority (it depends on which expression language you use
with Camel - that would certainly work using bean expressions,
javascript, XPath / XQuery, EL etc). Not 100% sure if simple language
supports subtraction though.

To remove duplicates you could use idempotent consumer before the
resequencer to filter out duplicates...
http://camel.apache.org/idempotent-consumer.html

Though waiting for 2.4 might be easiest for you?

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Priority message

2010-06-14 Thread James Strachan
On 14 June 2010 12:52, astlm monica.astudi...@tic.alten.es wrote:

 Hello,
 I'm starting to use ActiveMQ v5.3.2 and I need to prioritize messages sent
 whith several priorities.
 I modify configuration´s brokers like this
    broker useJmx=true useShutdownHook=false supportJMSPriority=true
 And I  establish message and sender priority
     message.setJMSPriority(priority)
     sender.setPriority(priority)
 But activemq delivers message without priority.
 I see https://issues.apache.org/activemq/browse/AMQ-122 and I would like
 knowing if the error is solved.

 How can I use priority with activemq?

There's an FAQ entry that describes the various options...
http://activemq.apache.org/how-can-i-support-priority-queues.html

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Priority message

2010-06-14 Thread James Strachan
On 14 June 2010 14:10, astlm monica.astudi...@tic.alten.es wrote:

 Thank you very much for your reply.

 But these optios are not valid for my system.

Why?


 I need order message by priority on real time and I have only one consumer
 because the consumer send message another sistem wich it´s very slow.

Why doesn't the Resequencer work for you then - using it before you
send to another system?


 When does active-mq  implement the management of priorities from queue?

 This are ok on next versions?

ActiveMQ 6.x might implement JMS Priorities

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Scalability with ActimeMQ consumers

2010-03-11 Thread James Strachan
2010/3/11 Márcio Geovani Jasinski marci...@gmail.com:
 Hi,

 I have an application running with one producer and many consumers.
 In a stress situation I know that we need between 10 and 15 consumers but
 normally this number is not needed.

 What´s the best solution for scalability using ActiveMQ?
 1. Create maximum consumers (15) and leave them awaiting for the stress
 time?

Yes

You might also want to read about prefetch limits; if you've a fairly
small number of messages in peak times you might want to configure
them smaller to ensure a more even spread
http://activemq.apache.org/what-is-the-prefetch-limit-for.html


-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: consumer cant receive messages

2010-02-24 Thread James Strachan
On 24 February 2010 09:06, harrygoo guh...@gmail.com wrote:

 hi, I am using activemq-4.0, sometimes my consumer cant receive any message
 from ActiveMQ. In the JConsole, I can see the connection is connected, the
 QueueSize is bigger than 0, and DequeueCount is bigger than EnqueueCount
 (this make me feel confused) . Then I close the connection of the consumer
 and restart a new one, the consumer can receive the previous message
 sucessfully. But after a period of time, the consumer cant receive the
 message again.

 Thanks for any ideas on what my problem is.

ActiveMQ 4.0 was released 4 years ago; since then ActiveMQ has been
used very heavily in many production settings and many bug fixes have
been performed. Its maybe time to upgrade?

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Resequencing with Camel

2010-02-24 Thread James Strachan
Also - the trick with camel is when things are not doing as you want,
turn on tracer...

http://camel.apache.org/tracer.html

On 24 February 2010 10:38, Gary Tully gary.tu...@gmail.com wrote:
 you may have more luck with a useful reply on the camel users forum.
 One thought, are you sure the header property is present?. Could it be
 in.header.JMSPriority (with a capital 'P')? Possibly try using a property
 that you explicitly set on the original message, just the be sure the naming
 and referencing is correct?

 On 24 February 2010 02:01, Andrew Harvey harv...@lexer.com.au wrote:

 Hi there,

 I'm having some trouble resequencing some queues with camel, but it's not
 working and I'm stumped as to why. Camel will happily route messages between
 queues, but the resequencer just doesn't seem to want to go.

 Here is the configuration I have for camel:

      camelContext id=camel xmlns=http://camel.apache.org/schema/spring
 
            route autoStartup=true
              from uri=activemq:queue:AnalysisIn /
              resequencer
                simplein.header.JMSpriority/simple
                to uri=activemq:queue:AnalysisOut /
                batch-config batchSize=20 batchTimeout=4000 /
              /resequencer
            /route
        /camelContext

 Can anyone shed any light on why this might not be working? I'm at a bit of
 a loss. I'm sure its something simple, but I just can't see it.

 Thanks,
 Andrew
 Andrew Harvey / Developer
 lexer
 m/
 t/ +61 2 9019 6379
 w/  http://lexer.com.au


 Please consider the environment before printing this email
 This email transmission is confidential and intended solely for the person
 or organisation to whom it is addressed. If you are not the intended
 recipient, you must not copy, distribute or disseminate the information, or
 take any action in relation to it and please delete this e-mail. Any views
 expressed in this message are those of the individual sender, except where
 the send specifically states them to be the views of any organisation or
 employer. If you have received this message in error, do not open any
 attachment but please notify the sender (above). This message has been
 checked for all known viruses powered by McAfee.

 For further information visit
 http://www.mcafee.com/us/threat_center/default.asp
 Please rely on your own virus check as no responsibility is taken by the
 sender for any damage rising out of any virus infection this communication
 may contain.


 This message has been scanned for malware by Websense. www.websense.com




 --
 http://blog.garytully.com

 Open Source Integration
 http://fusesource.com




-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Consumer and Failover

2010-02-16 Thread James Strachan
Which version are you using BTW?

On 16 February 2010 16:17, Jean-Yves LEBLEU jleb...@gmail.com wrote:
 On Tue, Feb 16, 2010 at 4:54 PM, James Strachan
 james.strac...@gmail.com wrote:
 On 16 February 2010 15:38, Jean-Yves LEBLEU jleb...@gmail.com wrote:
 Hi all,

 I am trying to use the failover transport
 (failover:(tcp://localhost:61618)), and I have some questions :

 I did a test with a simple consumer in scala (see the code and log at
 the end of the mail).

 Scenario :
 Broker is stopped.
 We start the consumer, it waits
 Start the broker
 Consumer connects and consume messages
 Stop the broker and start the broker again
 Consumer tries 6 times to reconnect and stop working.

 I wonder if you have not restarted the broker in time for the client
 to reconnect? How long does the client take to reconnect and how long
 is the broker down for?

 Maybe you could try increasing the amount of time the failover
 transport waits before failing to connect...

 http://activemq.apache.org/failover-transport-reference.html

 e.g. try this URL

 failover:(tcp://localhost:61618)?maxReconnectAttempts=1000


 BTW slightly more idiomatic Scala code for onMessage would be...

 def onMessage(message: Message): Unit = message match {
  case textMessage: TextMessage =  println(Message recieved:  +
 textMessage.getText())
  case _ = println(Oops, not a text message)
 }
 --
 James
 ---
 http://macstrac.blogspot.com/

 Open Source Integration
 http://fusesource.com/


 James,

 Thanks for the more idiomatic Scala code, we are starting to use scala
 instead of java and have not explored all the scala subtelties :).

 I tried with maxReconnectAttempts=1000, the consumer stops after 7
 attempts to reconnect to the broker.

 Regards.
 Jean-Yves




-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Connecting to Tibco RV from ActiveMQ

2009-10-29 Thread James Strachan
2009/10/29 AL_DK and...@lildballe.com:

 Hi,

 I would like to know if the ActiveMq supports connection to Tibco RV?

 If not, any suggestions for how this could be made?

It would be pretty easy to create an RV component for Camel
http://camel.apache.org/components.html

then you could easily bridge from RV to ActiveMQ and vice versa, with
content based routing, transformations etc.
http://camel.apache.org/enterprise-integration-patterns.html

more details on using Camel enterprise integration patterns inside
ActiveMQ here...
http://activemq.apache.org/enterprise-integration-patterns.html

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Maintaining Message Uniqueness in a Queue

2009-09-29 Thread James Strachan
2009/9/29 itamara avni.ita...@gmail.com:

 hi AMQ users

 What is the best way to ensure Message Uniqueness in a Queue?

 I'm having the following architecture:

 A single Scheduler (a quartz scheduled job) is periodically checking a DB
 for entities to update, for each entity-to-update it uses a single Sender to
 send an Update Message with a property holding the entity ID.

 The Sender references an ActiveMQQueue destination and a Spring's
 JmsTemplate over a PooledConnectionFactory.

 The Consumers - MessageListeners in a Spring's
 DefaultMessageListenerContainer container - receive a message and do their
 onMessage, which may involves updating the DB.


 I wish to avoid more then one Consumer updating the same entity
 simultaneously, as it will result in DB errors.

Using Message Groups to ensure only one consumer thread processes a
certain entity at once sounds like a simple solution...
http://activemq.apache.org/message-groups.html

 I thought the Scheduler should account for this synchronization, so upon
 resolution of the entities to update, it tags them in order to know not to
 update them again - a tag that is removed when update is finished. But as
 errors may occur, this tag is taken in account only for a certain period of
 time. This makes the situation, in which the queue contains two messages
 with the same entity ID, possible.

 Which may cause exactly what I'm trying to avoid.

 How do I pull it off?

 I thought knowing which messages are currently in the queue could help the
 Scheduler decide.

 What about the message ID? Can it help here?

Message IDs are unique and set after you send them

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: logging of messages in ActiveMQ

2009-09-10 Thread James Strachan
does uncommenting this line help?

log4j.rootLogger=DEBUG, out, stdout


i.e. to log to both the file and standard out?

2009/9/10 Jim_1 jim.howl...@bluecrestcapital.com:

 Could anyone help me with how to fully log the messages including
 consumer/producer

 Here is my log4j.properties file - but I am not getting detailed message
 information :-

 ##
 ---
 ## Licensed to the Apache Software Foundation (ASF) under one or more
 ## contributor license agreements.  See the NOTICE file distributed with
 ## this work for additional information regarding copyright ownership.
 ## The ASF licenses this file to You under the Apache License, Version 2.0
 ## (the License); you may not use this file except in compliance with
 ## the License.  You may obtain a copy of the License at
 ##
 ## http://www.apache.org/licenses/LICENSE-2.0
 ##
 ## Unless required by applicable law or agreed to in writing, software
 ## distributed under the License is distributed on an AS IS BASIS,
 ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ##
 ---

 #
 #
 #
 # log4j.rootLogger=INFO, stdout, out
 # log4j.logger.org.apache.activemq.spring=WARN
 # log4j.logger.org.springframework=WARN
 # log4j.logger.org.apache.xbean.spring=WARN

 # When debugging or reporting problems to the ActiveMQ team,
 # comment out the above lines and uncomment the next.

 # log4j.rootLogger=DEBUG, out, stdout
 log4j.rootLogger=DEBUG, out

 # Or for more fine grained debug logging uncomment one of these
 log4j.logger.org.apache.activemq=DEBUG
 log4j.logger.org.apache.activemq.transport.InactivityMonitor=DEBUG
 log4j.logger.org.apache.activemq.spring=DEBUG
 log4j.logger.org.springframework=DEBUG
 log4j.logger.org.apache.xbean.spring=DEBUG
 log4j.logger.org.apache.camel=DEBUG



 # The logging properties used during tests..
 # CONSOLE appender not used by default
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%-5p %-30.30c{1} - %m%n
 log4j.appender.stdout.threshold=INFO

 # File appender
 log4j.appender.out=org.apache.log4j.RollingFileAppender
 log4j.appender.out.file=${activemq.base}/log/smlog
 log4j.appender.out.maxFileSize=1024KB
 log4j.appender.out.maxBackupIndex=5
 log4j.appender.out.append=true
 log4j.appender.out.layout=org.apache.log4j.PatternLayout
 log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} -
 %m%n

 --
 View this message in context: 
 http://www.nabble.com/logging-of-messages-in-ActiveMQ-tp25383603p25383603.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Message Integrity

2009-09-09 Thread James Strachan
2009/9/9 pa7751 pa7...@gmail.com:

 Hi

 I have a queue in ActiveMQ messagings server. There are two listeners(on
 different machines), that are listening to the same queue. This is done for
 faster processing of the messages in the queue. Will ActiveMQ ensure that
 the same message is not received by both?

Yes, ActiveMQ's queues act as a load balancer of messages across consumers.


 Also will it ensure that both
 listeners do not seek the same message from the queue?

Yes

See
http://activemq.apache.org/how-does-a-queue-compare-to-a-topic.html

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: JBoss and ActiveMQ with remote JNDI

2009-08-07 Thread James Strachan
2009/8/7 An An anjusm...@gmail.com:

 Hi James,
 Thanks for the reply.
 I have set the JBoss jndi properties already.
 So I do this in the code :-
 
 Properties props = new Properties();

 props.setProperty(Context.INITIAL_CONTEXT_FACTORY,org.apache.activemq.jndi.ActiveMQInitialContextFactory);
                
 props.setProperty(Context.PROVIDER_URL,tcp://localhost:61616);
                javax.naming.Context ctx = new InitialContext(props);
                Queue queue = (Queue) ctx.lookup(activemq/queue/outbound);


If you are going to create your own JNDI properties, this page
describes how to configure resources inside JNDI
http://activemq.apache.org/jndi-support.html

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: JBoss and ActiveMQ with remote JNDI

2009-08-05 Thread James Strachan
2008/4/29 Alex Soto lexs...@gmail.com:
 James Strachan wrote:

 2008/4/29 Alex Soto lexs...@gmail.com:


 I also have the same problem.
  The suggestions I've seen is to instantiate ActiveMQConnectionFactory
 instead of getting it from JNDI.  As a workaround it is satisfactory but
 this solution does not go very far. Certainly it does not help if the
 client
 code is not available for modification.

  Does anybody knows if there is a plan to solve this issue?


 Just use the ActiveMQ JNDI provider then?
 http://activemq.apache.org/jndi-support.html


 Is that possible when ActiveMQ runs embedded within JBoss? How?

The ActiveMQ JNDI provider is purely local to the JMS client - it
doesn't matter where the broker is.

For more background see this FAQ entry:
http://activemq.apache.org/how-do-i-create-new-destinations.html


-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: AMQ + Programmatic Creation of Destinations + Registration in JNDI

2009-08-04 Thread James Strachan
2009/8/4 jworkman jwork...@oidev.com:

 I really need help, I am struggling to create queues and topics in ActiveMQ
 and have them accessible from JNDI lookups. I need this
 creation/registration to be done without bringing the server down, and done
 without manual configuration.

 Something like:

 //create the jndi context
 InitialContext jndiContext = new InitialContext(loadConnectionProps());

 // Create a ConnectionFactory
 ConnectionFactory connectionFactory = (ConnectionFactory)
 jndiContext.lookup(loadConnectionProps().getProperty(Context.OBJECT_FACTORIES));

 // Create a Connection
 Connection connection = connectionFactory.createConnection();

 // Create a Session
 Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

 // Create the destination (Topic or Queue)
 session.createQueue(qname);

 this below doesn't work***

 //get the topic from jndi
 topic = (Topic) ctx.lookup(name);

What names are you looking up?

Did you read the section on Dynamically creating destinations here?
http://activemq.apache.org/jndi-support.html


-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: AMQ + Programmatic Creation of Destinations + Registration in JNDI

2009-08-04 Thread James Strachan
2009/8/4 jworkman jwork...@oidev.com:

 Yes I read the secion, but it explains about adding it to the jndi.properties
 file, which I can do for predefined ones but not ones created in memory.

 dynamicQueues/ don't seem to work when I try to connect from an external
 client.

The JNDI provider is local to the client - its not a JNDI server; it
creates destinations in memory of the JMS client process.

What happens when you try use the following properties file in your client?

 java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
 java.naming.provider.url=tcp://xx:61616
 java.naming.referral=throw
 java.naming.factory.object=ConnectionFactory

 Queue name I am trying to create:

 domainname/queuename


 Thanks for your assistance...

 Jason


 James.Strachan wrote:

 2009/8/4 jworkman jwork...@oidev.com:

 I really need help, I am struggling to create queues and topics in
 ActiveMQ
 and have them accessible from JNDI lookups. I need this
 creation/registration to be done without bringing the server down, and
 done
 without manual configuration.

 Something like:

 //create the jndi context
 InitialContext jndiContext = new InitialContext(loadConnectionProps());

 // Create a ConnectionFactory
 ConnectionFactory connectionFactory = (ConnectionFactory)
 jndiContext.lookup(loadConnectionProps().getProperty(Context.OBJECT_FACTORIES));

 // Create a Connection
 Connection connection = connectionFactory.createConnection();

 // Create a Session
 Session session = connection.createSession(false,
 Session.AUTO_ACKNOWLEDGE);

 // Create the destination (Topic or Queue)
 session.createQueue(qname);

 this below doesn't work***

 //get the topic from jndi
 topic = (Topic) ctx.lookup(name);

 What names are you looking up?

 Did you read the section on Dynamically creating destinations here?
 http://activemq.apache.org/jndi-support.html


 --
 James
 ---
 http://macstrac.blogspot.com/

 Open Source Integration
 http://fusesource.com/



 --
 View this message in context: 
 http://www.nabble.com/AMQ-%2B-Programmatic-Creation-of-Destinations-%2B-Registration-in-JNDI-tp24809685p24809919.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: AMQ + Programmatic Creation of Destinations + Registration in JNDI

2009-08-04 Thread James Strachan
2009/8/4 jworkman jwork...@oidev.com:

 I am not sure I follow... When I do ctx.lookup(dyanmicQueues/whatever) what
 will this do? Create a queue if one does not exist in the destination amq
 server?

Yes, see this FAQ entry...
http://activemq.apache.org/how-do-i-create-new-destinations.html


 What is happening currently on the remote (calling) client: I can access the
 factory and create the connection with a session okay, but when I try to do
 a lookup for the domain/queue (which I explicitly created by calling
 createQueue(domain/queue) on destination amq server) I get queue not
 found.

 Is prepending dynamicQueues/ the only way around?

use the dynamicQueues/whatever to look up the Queue object in JNDI
(which will map to the whatever queue in ActiveMQ.

If you don't want to use JNDI to lookup destinations, just call
createQueue(String) - then there is no need to register anything in
JNDI for queue/topics,  other than your ConnectionFactory - of which
you'll probably only need a single one.

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: AMQ + Programmatic Creation of Destinations + Registration in JNDI

2009-08-04 Thread James Strachan
2009/8/4 jworkman jwork...@oidev.com:

 In the latter would the jms client call createQueue would that be up to the
 server?
 If up to the server, then how would the calling client access that queue?

Please read the FAQ I pointed you at.
http://activemq.apache.org/how-do-i-create-new-destinations.html

The short answer is - it just works.

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: How to restrict MQ shall have only one consumer

2009-07-21 Thread James Strachan
2009/7/21 Raju Narayan gnara...@unidesk.com:

 Hello,

 In my modules interaction scinario we defined only one consumer will exist
 per MQ, So How to prevent/query that consumer already exists for given MQ.
 So That I can prevent Creating consumers for MQ using NMS(C# .net client).

Using Exclusive Consumers ensures that only one consumer is active on
any queue at any point in time.
http://activemq.apache.org/exclusive-consumer.html


-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Camel with intergated ActiveMQ Web Console and JBoss

2009-07-10 Thread James Strachan
2009/7/10 chu_man_fu c...@bytron.com:

 I have Camel working great in ActiveMQ intergated into JBoss but only by
 modifying my activemq.xml file:

   camelContext id=camel
 xmlns=http://activemq.apache.org/camel/schema/spring;
        packagemy.package.name/package
        route
                from uri=activemq:Q1/
             from uri=activemq:Q2/
        /route
    /camelContext
    bean id=activemq
 class=org.apache.activemq.camel.component.ActiveMQComponent 
        property name=connectionFactory
          bean class=org.apache.activemq.ActiveMQConnectionFactory
            property name=brokerURL
 value=vm://localhost?create=falseamp;waitForStart=1 /
            property name=userName value=${activemq.username}/
            property name=password value=${activemq.password}/
          /bean
        /property
    /bean

 How do I get camel to use package: packagemy.package.name/package?
 I have created a package which that name but I don't know where to put it or
 how I tell camel to look at it. I am not sure where the camel context is
 started, I am guess via the ActiveMQComponent bean

This is more a question for the camel mailing lists...
http://camel.apache.org/discussion-forums.html

but you basically add package within camelContext

 I understand this is more of a Camel question but the only reason I don't
 know how to do this is because I am using Camel in an embedded broker.

everything within the camelContext element is exactly the same as
using Camel with Spring (i.e. outside of the broker).

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Activate Some Services

2009-07-08 Thread James Strachan
2009/7/8 Gabriel1982 benbouzid_ano...@yahoo.fr:

 Hello ,


 i want to know if it's possible to activate just one service for the
 activemq.

 for example just activate the TransportServer service.

To do what BTW?

The TransportServer is designed to work with a Broker; so you need the
BrokerService.

You can choose what other services you need (e.g. the persistence adapter etc).

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Activate Some Services

2009-07-08 Thread James Strachan
2009/7/8 Gabriel1982 benbouzid_ano...@yahoo.fr:

 Thanks a lot Mr James

 but i don't need the broker service .

 i would like to use the stomp interface listener to intercept messages and
 than persist them in a database without using cache memory . in other words
 i want to use just the server of socket of activemq through to it's stomp
 interface . it's possible ?

If you want a Stomp server which persists messages to a database, then
it sounds like you need the BrokerService too.

BTW the TransportService is currently dependent on the Broker; its not
of that much use stand alone.
-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Activate Some Services

2009-07-08 Thread James Strachan
2009/7/8 Gabriel1982 benbouzid_ano...@yahoo.fr:

 yes but the brokerService is essentially used to manage messages in the
 Queues or Topics

 but for me i don't need even to create any Queues or Topics in the memory .

 i just want to persist them in the disk and then get them from the disk .

 you think it's possible ?

 Tanks a lot Mr James for you help .

Stomp talks to queues or topics. The only way to do what you ask today
is to reuse the broker. Creating some Queue or Topic objects in memory
is no big deal; they are small lightweight objects.

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Activate Some Services

2009-07-08 Thread James Strachan
2009/7/8 Gabriel1982 benbouzid_ano...@yahoo.fr:

 using only one queue can block consumers

In what way?

 besides i think that a queue can't
 support 30 million of
 messages

It should be able to.

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Camel routing poor performance vs VirtualDestinations and Topics

2009-03-31 Thread James Strachan
Which version of ActiveMQ/Camel/Spring are you using? Is the camel
code inside the broker? Do you have any specific spring configuration
for the ActiveMQ component?

BTW the out of the box won't be using transactions, so you'll be doing
a request/reply with the broker (I presume using TCP unless you've
some custom config) waiting for the send to hit disk for each
destination before committing the consume. So using a JMS transaction
should speed that up hugely.

However fast we get the camel code; topics and virtual queues are
always gonna be faster; since on the broker side its just moving an in
memory message to multiple destinations in a single thread without the
overhead of going through the JMS client API.

Having said that - if you are testing like for like (e.g. using VM
transport, using transactions  using async sends) it should get
close.


2009/3/31 DanielR romero...@gmail.com:

 Hi.


 Im getting very slow performance using camel based routing.

 I have 1 producer sending messages to QUEUE.COLOR and then ActiveMQ
 duplicate the messages to QUEUE.BLUE and QUEUE.RED (except for topics...).


 Is this normal?


 My tests:

 1. Camel Route defined in XML
 2. Camel Route defined in RouteBuilder Plugin
 3. VirtualDestination Routing
 4. Topics

                 Test N°      1        2          3           4
 Body Size
 128B                         703     763     6377     10590
 512B                         670     692     5872     8143
 1KB                          628     635     5037     4749
 2KB                          566     557     2376     2641

 *messages/second


 Camel Route defined in XML Code

        camelContext id=camel
 xmlns=http://activemq.apache.org/camel/schema/spring;
                route
                        from uri=activemq:QUEUE.COLOR /
                        to uri=activemq:QUEUE.RED /
                        to uri=activemq:QUEUE.BLUE /
                /route
        /camelContext


 Camel Route defined in RouteBuilder Plugin Code

 class MyRouteBuilder extends RouteBuilder {

   �...@override
    public void configure() throws Exception {


 from(activemq:queue:QUEUE.COLOR).to(activemq:queue:QUEUE.RED).to(activemq:queue:QUEUE.BLUE);
    }

 }

 VirtualDestination Code

                destinationInterceptors
                        virtualDestinationInterceptor
                                virtualDestinations
                                        compositeQueue name=QUEUE.COLOR
                                                forwardTo
                                                        queue
 physicalName=QUEUE.RED /
                                                        queue
 physicalName=QUEUE.BLUE /
                                                /forwardTo
                                        /compositeQueue
                                /virtualDestinations
                        /virtualDestinationInterceptor
                /destinationInterceptors




 Graphic with results attached.


 --
 Regards,
 Daniel Romero P.

 http://www.nabble.com/file/p22812467/activemq-routing.jpg
 activemq-routing.jpg
 --
 View this message in context: 
 http://www.nabble.com/Camel-routing-poor-performance-vs-VirtualDestinations-and-Topics-tp22812467p22812467.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Camel routing poor performance vs VirtualDestinations and Topics

2009-03-31 Thread James Strachan
Also configuring the activemq component to use vm transport (as it
defaults to tcp://locahost:61616) would probably help too

2009/3/31 DanielR romero...@gmail.com:

 Hi.

 I'm using AMQ 5.2 (apache-activemq-5.2.0-bin.tar).
 The camel code is in a java class of my own package
 (cl.niclabs.activemq.camel), loaded at the startup in the AMQ's xml config
 with this code:

 camelContext id=camel
 xmlns=http://activemq.apache.org/camel/schema/spring;
                packagecl.niclabs.activemq.camel/package
 /camelContext

 You can download my configs here:
 http://www.nabble.com/file/p22815567/activemq-tests.tar.gz
 activemq-tests.tar.gz


 So, you say that using JMS transactions should rise the camel routing
 performance near the VirtualDestination one, that's all?

 Thanks for your time.




 James.Strachan wrote:

 Which version of ActiveMQ/Camel/Spring are you using? Is the camel
 code inside the broker? Do you have any specific spring configuration
 for the ActiveMQ component?

 BTW the out of the box won't be using transactions, so you'll be doing
 a request/reply with the broker (I presume using TCP unless you've
 some custom config) waiting for the send to hit disk for each
 destination before committing the consume. So using a JMS transaction
 should speed that up hugely.

 However fast we get the camel code; topics and virtual queues are
 always gonna be faster; since on the broker side its just moving an in
 memory message to multiple destinations in a single thread without the
 overhead of going through the JMS client API.

 Having said that - if you are testing like for like (e.g. using VM
 transport, using transactions  using async sends) it should get
 close.


 2009/3/31 DanielR romero...@gmail.com:

 Hi.


 Im getting very slow performance using camel based routing.

 I have 1 producer sending messages to QUEUE.COLOR and then ActiveMQ
 duplicate the messages to QUEUE.BLUE and QUEUE.RED (except for
 topics...).


 Is this normal?


 My tests:

 1. Camel Route defined in XML
 2. Camel Route defined in RouteBuilder Plugin
 3. VirtualDestination Routing
 4. Topics

                 Test N°      1        2          3           4
 Body Size
 128B                         703     763     6377     10590
 512B                         670     692     5872     8143
 1KB                          628     635     5037     4749
 2KB                          566     557     2376     2641

 *messages/second


 Camel Route defined in XML Code

        camelContext id=camel
 xmlns=http://activemq.apache.org/camel/schema/spring;
                route
                        from uri=activemq:QUEUE.COLOR /
                        to uri=activemq:QUEUE.RED /
                        to uri=activemq:QUEUE.BLUE /
                /route
        /camelContext


 Camel Route defined in RouteBuilder Plugin Code

 class MyRouteBuilder extends RouteBuilder {

   �...@override
    public void configure() throws Exception {


 from(activemq:queue:QUEUE.COLOR).to(activemq:queue:QUEUE.RED).to(activemq:queue:QUEUE.BLUE);
    }

 }

 VirtualDestination Code

                destinationInterceptors
                        virtualDestinationInterceptor
                                virtualDestinations
                                        compositeQueue
 name=QUEUE.COLOR
                                                forwardTo
                                                        queue
 physicalName=QUEUE.RED /
                                                        queue
 physicalName=QUEUE.BLUE /
                                                /forwardTo
                                        /compositeQueue
                                /virtualDestinations
                        /virtualDestinationInterceptor
                /destinationInterceptors




 Graphic with results attached.


 --
 Regards,
 Daniel Romero P.

 http://www.nabble.com/file/p22812467/activemq-routing.jpg
 activemq-routing.jpg
 --
 View this message in context:
 http://www.nabble.com/Camel-routing-poor-performance-vs-VirtualDestinations-and-Topics-tp22812467p22812467.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





 --
 James
 ---
 http://macstrac.blogspot.com/

 Open Source Integration
 http://fusesource.com/



 --
 View this message in context: 
 http://www.nabble.com/Camel-routing-poor-performance-vs-VirtualDestinations-and-Topics-tp22812467p22815567.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Camel routing poor performance vs VirtualDestinations and Topics

2009-03-31 Thread James Strachan
Oh and async sending...

2009/3/31 James Strachan james.strac...@gmail.com:
 Also configuring the activemq component to use vm transport (as it
 defaults to tcp://locahost:61616) would probably help too

 2009/3/31 DanielR romero...@gmail.com:

 Hi.

 I'm using AMQ 5.2 (apache-activemq-5.2.0-bin.tar).
 The camel code is in a java class of my own package
 (cl.niclabs.activemq.camel), loaded at the startup in the AMQ's xml config
 with this code:

 camelContext id=camel
 xmlns=http://activemq.apache.org/camel/schema/spring;
                packagecl.niclabs.activemq.camel/package
 /camelContext

 You can download my configs here:
 http://www.nabble.com/file/p22815567/activemq-tests.tar.gz
 activemq-tests.tar.gz


 So, you say that using JMS transactions should rise the camel routing
 performance near the VirtualDestination one, that's all?

 Thanks for your time.




 James.Strachan wrote:

 Which version of ActiveMQ/Camel/Spring are you using? Is the camel
 code inside the broker? Do you have any specific spring configuration
 for the ActiveMQ component?

 BTW the out of the box won't be using transactions, so you'll be doing
 a request/reply with the broker (I presume using TCP unless you've
 some custom config) waiting for the send to hit disk for each
 destination before committing the consume. So using a JMS transaction
 should speed that up hugely.

 However fast we get the camel code; topics and virtual queues are
 always gonna be faster; since on the broker side its just moving an in
 memory message to multiple destinations in a single thread without the
 overhead of going through the JMS client API.

 Having said that - if you are testing like for like (e.g. using VM
 transport, using transactions  using async sends) it should get
 close.


 2009/3/31 DanielR romero...@gmail.com:

 Hi.


 Im getting very slow performance using camel based routing.

 I have 1 producer sending messages to QUEUE.COLOR and then ActiveMQ
 duplicate the messages to QUEUE.BLUE and QUEUE.RED (except for
 topics...).


 Is this normal?


 My tests:

 1. Camel Route defined in XML
 2. Camel Route defined in RouteBuilder Plugin
 3. VirtualDestination Routing
 4. Topics

                 Test N°      1        2          3           4
 Body Size
 128B                         703     763     6377     10590
 512B                         670     692     5872     8143
 1KB                          628     635     5037     4749
 2KB                          566     557     2376     2641

 *messages/second


 Camel Route defined in XML Code

        camelContext id=camel
 xmlns=http://activemq.apache.org/camel/schema/spring;
                route
                        from uri=activemq:QUEUE.COLOR /
                        to uri=activemq:QUEUE.RED /
                        to uri=activemq:QUEUE.BLUE /
                /route
        /camelContext


 Camel Route defined in RouteBuilder Plugin Code

 class MyRouteBuilder extends RouteBuilder {

   �...@override
    public void configure() throws Exception {


 from(activemq:queue:QUEUE.COLOR).to(activemq:queue:QUEUE.RED).to(activemq:queue:QUEUE.BLUE);
    }

 }

 VirtualDestination Code

                destinationInterceptors
                        virtualDestinationInterceptor
                                virtualDestinations
                                        compositeQueue
 name=QUEUE.COLOR
                                                forwardTo
                                                        queue
 physicalName=QUEUE.RED /
                                                        queue
 physicalName=QUEUE.BLUE /
                                                /forwardTo
                                        /compositeQueue
                                /virtualDestinations
                        /virtualDestinationInterceptor
                /destinationInterceptors




 Graphic with results attached.


 --
 Regards,
 Daniel Romero P.

 http://www.nabble.com/file/p22812467/activemq-routing.jpg
 activemq-routing.jpg
 --
 View this message in context:
 http://www.nabble.com/Camel-routing-poor-performance-vs-VirtualDestinations-and-Topics-tp22812467p22812467.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





 --
 James
 ---
 http://macstrac.blogspot.com/

 Open Source Integration
 http://fusesource.com/



 --
 View this message in context: 
 http://www.nabble.com/Camel-routing-poor-performance-vs-VirtualDestinations-and-Topics-tp22812467p22815567.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





 --
 James
 ---
 http://macstrac.blogspot.com/

 Open Source Integration
 http://fusesource.com/




-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: ActiveMQ JNDI support only for testing?

2009-03-18 Thread James Strachan
2009/3/18 Antsa a...@teamware.com:


 huntc wrote:

 I'm curious as to what is trying to be achieved here. Could you please
 explain why it is useful to perform a naming/directory lookup for a queue
 or topic name?

 My use case is probably due to my newbie status with JMS.
 Session.createTopic javadocs imply that normal JMS usage would rarely
 require this and I felt it implied that it was not really the way to do
 things.  I was therefore looking at generic ways to create Destination
 objects in the client side.

 My solution for the moment is to use Spring's JmsTemplate class which takes
 String destinationName and then uses the configured destinationResolver to
 get the object.

Than sounds fine to me.

I think some of the motivation since J2EE came along of putting all
your resources (connections, destinations etc) into JNDI was so that a
single deployment unit can be used in dev, testing, production without
being changed - yet you'll be using different database/broker servers
in each environment. Folks could, if they want, use different
topic/queue names in dev to production.

Though given how easy it is to create topics/queues with ActiveMQ I'd
recommend just using the correct names of queue/topic you want to use
in production everywhere - then just having one or more brokers for
each environment. i.e. the only real thing that changes between
dev/test/production for ActiveMQ is the broker connection URL. This
then avoids having loads of double indirections and things that could
go wrong (e.g. remote JNDI servers - then configuring on both the
client and on the JNDI server the mapping between JNDI names to
topic/queue names - which are super easy to get wrong causing loads of
wasted time head scratching).

In practice I've found putting JMS destinations into a remote JNDI
server to be nothing but loads of hard work for no actual gain.

Using spring's property resolving mechanism seems a reasonable
solution so that this URL (and the database connection URL you'll
probably be using too) can be changed in testing  production.

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Change Message Destination using Interceptors

2009-03-18 Thread James Strachan
2009/3/17 DanielR romero...@gmail.com:

 I can't get it working... any examples would be nice please

Here's a bunch of examples...

http://camel.apache.org/examples.html

The spring XQuery example might be a good start...
http://camel.apache.org/spring-xquery-example.html

you might find its easier to write your predicate using Java
http://camel.apache.org/bean-language.html

rather than one of the available expression languages...
http://camel.apache.org/languages.html

See the example route on the bean language page
http://camel.apache.org/bean-language.html


-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Change Message Destination using Interceptors

2009-03-17 Thread James Strachan
2009/3/17 DanielR romero...@gmail.com:

 How can I change the destination queue of a message using Interceptors?

Whats your use case BTW?

The easiest thing might be to use a CamelDestination which can then
use a route client side to perform content based routing etc.

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: ActiveMQ JNDI support only for testing?

2009-03-17 Thread James Strachan
2009/2/10 janylj jan...@gmail.com:

 Hello,

 I tried ActiveMQ JNDI support. It seems to me only for testing, because the
 administrative objects are specified in the jndi.properties of client
 machine. There is no centralized place to manage the ConnectionFactory or
 Destination. And we could not control who could access them.

 Is my understanding correct or I miss something? Thank you very much.

You can use any JNDI provider you want. If you really want to store
the topic and queue objects in some remote JNDI server go right ahead,
noone is stopping you.

However the ActiveMQ JNDI provider is intended to avoid dependency on
some remote JNDI server and so by *design* it uses a local client side
configuration. This is perfectly fine for production use too :)

Another approach is using Spring to avoid depending on a remote,
distributed JNDI provider. But if you really wanna use a distributed
JNDI provider just pick one you want and put the ActiveMQ administered
objects (queues, topics and connection factories) in there. Pretty
much all J2EE containers come with some remote JNDI server
implementation.

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Change Message Destination using Interceptors

2009-03-17 Thread James Strachan
2009/3/17 DanielR romero...@gmail.com:


 I need to forward the messsage to the proper queue depending on the first 10
 characters of the body of the message.

Sounds like a content based router...
http://camel.apache.org/content-based-router.html

its probably better to do that using Camel rather than as an
interceptor on the broker

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Change Message Destination using Interceptors

2009-03-17 Thread James Strachan
2009/3/17 DanielR romero...@gmail.com:

 I have 2 restrictions:

 1. The routing must be done server side
 2. The routing depends on the body, not on the header or some property

Both of those are fine - just include the content based router inside
the broker process. ActiveMQ can easily host Camel routes by just
including the route definition in the activemq.xml.

Have a look at the camelContext in the activemq.xml in the binary
distro of ActiveMQ to see an example route.


-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: ActiveMQ JNDI support only for testing?

2009-03-17 Thread James Strachan
2009/3/17 janylj jan...@gmail.com:

 I was trying to have a centralized repository of destinations and
 ConnectionFactory. I could use a uniform namespace for destination to avoid
 conflicting. However, I don't want to allow users creating destination or
 ConnectionFactory on the fly. I would like them accessing the broker only
 through administrative objects.

 Because my clients are not running inside J2EE container, I am using LDAP
 for JNDI. I wish ActiveMQ has a built JNDI server in the broker side.
 Therefore, I don't have to deploy another LDAP server and worry about its HA
 solution and other topics that we have already invested in the broker side.

A message broker is kinda different from a HA LDAP server - however
you can just deploy Apache Directory Server in the same JVM as the
broker if you like...

http://directory.apache.org/

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: ActiveMQ JNDI support only for testing?

2009-03-17 Thread James Strachan
Thats a question for the Apache Directory user lists I'm afraid

2009/3/17 janylj jan...@gmail.com:

 Thanks James for a great suggestion of Apache Directory Server. I didn't know
 that Apache Directory Server could be deployed in the same JVM as ActiveMQ
 broker.

 Do you happen to know whether Apache Directory Server have similar failover
 url as ActiveMQ? For example, we have a pair of HA broker (A and AFailover).
 If A goes down, the JMS client would automatically re-connect to AFailover
 through failover url. Because Apache Directory Server is deployed in the
 same JVM of A, A goes down, the JNDI of A also goes down. Can JNDI be
 automatically failed over to AFailover?

 Thanks again.


 James.Strachan wrote:

 2009/3/17 janylj jan...@gmail.com:

 I was trying to have a centralized repository of destinations and
 ConnectionFactory. I could use a uniform namespace for destination to
 avoid
 conflicting. However, I don't want to allow users creating destination or
 ConnectionFactory on the fly. I would like them accessing the broker only
 through administrative objects.

 Because my clients are not running inside J2EE container, I am using LDAP
 for JNDI. I wish ActiveMQ has a built JNDI server in the broker side.
 Therefore, I don't have to deploy another LDAP server and worry about its
 HA
 solution and other topics that we have already invested in the broker
 side.

 A message broker is kinda different from a HA LDAP server - however
 you can just deploy Apache Directory Server in the same JVM as the
 broker if you like...

 http://directory.apache.org/

 --
 James
 ---
 http://macstrac.blogspot.com/

 Open Source Integration
 http://fusesource.com/



 --
 View this message in context: 
 http://www.nabble.com/ActiveMQ-JNDI-support-only-for-testing--tp21925743p22564448.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: ActiveMQ and Applets

2009-03-12 Thread James Strachan
ActiveMQ just uses commons-logging by default so if you don't want to
use log4j jsut don't include it in your classpath.

More details here...
http://activemq.apache.org/how-do-i-change-the-logging.html
http://commons.apache.org/logging/guide.html

2009/3/12 Kyle Watson k...@corewafer.com:
 Hi,
 I'm getting a exception when creating a connection factory in my applet.

 Exception in thread thread applet-com.corewafer.taos.ui.applets.Console-1
 java.lang.ExceptionInInitializerError
        at
 org.apache.activemq.ActiveMQPrefetchPolicy.clinit(ActiveMQPrefetchPolicy.java:30)
        at
 org.apache.activemq.ActiveMQConnectionFactory.init(ActiveMQConnectionFactory.java:90)
        at
 com.corewafer.taos.ui.applets.Console.setupMessageServer(Console.java:87)
        at com.corewafer.taos.ui.applets.Console.init(Console.java:161)
        at
 sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown
 Source)
        at java.lang.Thread.run(Unknown Source)
 Caused by: java.security.AccessControlException: access denied
 (java.util.PropertyPermission
 org.apache.commons.logging.LogFactory.HashtableImpl read)
        at java.security.AccessControlContext.checkPermission(Unknown Source)
        at java.security.AccessController.checkPermission(Unknown Source)
        at java.lang.SecurityManager.checkPermission(Unknown Source)
        at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
        at java.lang.System.getProperty(Unknown Source)
        at
 org.apache.commons.logging.LogFactory.createFactoryStore(LogFactory.java:320)
        at
 org.apache.commons.logging.LogFactory.clinit(LogFactory.java:1725)

 I've read that turning off logging using log4j.properties might help but i'm
 unable to get activemq in my applet to load a log4j.properties file. Is it
 possible for me to turn off logging at runtime?

 Best Regards,
 Kyle Watson
 
 Kyle Watson
 Member of the Technical Staff
 Core Wafer Systems
 +1 (505) 349-0639 ext 114 (voice, direct to office)
 k...@corewafer.com





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: dead letter queue

2009-03-11 Thread James Strachan
2009/3/11 mffrench mffre...@axway.com:

 Hello,

 I would like to know if when I send a message on queue which does not exist
 in my ActiveMQ broker where are stored this messages ? Is there any dead
 letter queue in ActiveMQ ? How do I configure it ?

ActiveMQ creates destinations on the fly by default...
http://activemq.apache.org/how-do-i-create-new-destinations.html

DLQs are only used when consumers fail to process messages a given
number of times
http://activemq.apache.org/redelivery-policy.html

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Failover configuration for JMS clients using JNDI

2009-03-04 Thread James Strachan
2009/3/4 A. Gregory Rabil greg.ra...@ins.com:

 Hello,
 I'm using ActiveMQ 5.2.0, and I'm trying to configure a simple test of the
 failover transport.  I have two brokers A and B, and a JMS client on a
 remote machine.  I want the client to connect to Broker A, unless it is
 unavailable, in which case it should connect to Broker B.  Likewise, if the
 client is connected to Broker A, and Broker A crashes, or the client
 otherwise loses connection to Broker A, I want it to failover to Broker B.
 Here is my jndi.properties file for the JMS client:

 java.naming.factory.initial =
 org.apache.activemq.jndi.ActiveMQInitialContextFactory

 # use the following property to configure the default connector
 java.naming.provider.url = tcp://localhost:61616

Did you try changing this property to use failover?
java.naming.provider.url =
failover:(ssl://broker-a:61617,ssl://broker-b:61617)?randomize=false

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Message PRIORITY

2009-02-16 Thread James Strachan
2009/2/16 Luana87 l.fiorit...@live.it:

 Hello,
 I'm starting to use ActiveMQ v5.2.0 and I need to prioritize messages sent
 from only one producer.
 I am wondering which the correct way is.
 In particular I would like to understand which the difference is between
 message.setJMSPriority(priority) and sender.setPriority(priority) where
 message is a ActiveMQTextMessage and sender is a QueueSender.

See this FAQ entry...
http://activemq.apache.org/how-can-i-support-priority-queues.html


-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Message PRIORITY

2009-02-16 Thread James Strachan
2009/2/16 Luana87 l.fiorit...@live.it:



 James.Strachan wrote:

 2009/2/16 Luana87 l.fiorit...@live.it:

 Hello,
 I'm starting to use ActiveMQ v5.2.0 and I need to prioritize messages
 sent
 from only one producer.
 I am wondering which the correct way is.
 In particular I would like to understand which the difference is between
 message.setJMSPriority(priority) and sender.setPriority(priority) where
 message is a ActiveMQTextMessage and sender is a QueueSender.

 See this FAQ entry...
 http://activemq.apache.org/how-can-i-support-priority-queues.html


 --
 James
 ---
 http://macstrac.blogspot.com/

 Open Source Integration
 http://fusesource.com/




 Thank you for your response.
 Actually I'm able to order message by priority before to put keep they in my
 queue.

Note that ActiveMQ does not order the queue based on the JMS priority header

 I only ask about difference between message.setJMSPriority(priority)  and
 sender.setPriority(priority)  methods and their use with ActiveMQ.

You should use the sender.setPriority. See the javadoc of the
message.setJMSPriority method - it is only intended to be called by
the JMS provider
-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Webconsole and Tomcat

2009-01-30 Thread James Strachan
The first error in the log looks descriptive...

2009-01-30 14:09:58,278 [main   ] ERROR BrokerService
- Failed to start ActiveMQ JMS Message Broker. Reason:
java.lang.RuntimeException: java.io.IOException: Failed to create
directory 'activemq-data/localhost/tmp_storage'
java.lang.RuntimeException: java.io.IOException: Failed to create
directory 'activemq-data/localhost/tmp_storage'

looks like its not got permission to create the ActiveMQ data directory.


2009/1/30 Richie84 richiejame...@aim.com:

 Hi Degan

 There was a reference to jetty in the WEB-INF/activemq.xml file, however i
 have now done a fresh deployment of the web console, as I had previously
 made amendments to some of the config files to try and get it to work so i
 might have adding something that wasn't required. So now all the files are
 original from the deployment.

 When I start it up now, I do appear to be getting different errors, I have
 uploaded the errors which i think have the most relevance.

 http://www.nabble.com/file/p21748402/Errors.txt Errors.txt

 I don't know if there is configuration in any of the xml files that i need
 to do to get it to connect to my brokers that are running through activemq.
 Apologies if this is basic stuff.

 Regards

 Richard



 Dejan Bosanac wrote:

 Do you have jetty tag left in your WEB-INF/activemq.xml file?

 Cheers
 --
 Dejan Bosanac

 Open Source Integration - http://fusesource.com/
 ActiveMQ in Action - http://www.manning.com/snyder/
 Blog - http://www.nighttale.net


 On Thu, Jan 29, 2009 at 3:25 PM, Richie84 richiejame...@aim.com wrote:


 Hi

 Thanks for that, I have had a look at the documentation and attempted to
 deploy the web console within tomcat. This seems to all go well, with the
 console appearing to deploy succesfull within the webapps folder, I have
 placed activemq-all.jar within the common/lib folder, and added amended
 the
 configuration as stated. However when i browse to the URL it shows the
 following HTTP info page.

 HTTP Status 404 - /activemq-web-console-5.2.0/

 type Status report

 message /activemq-web-console-5.2.0/

 description The requested resource (/activemq-web-console-5.2.0/) is not
 available.

 When browsing the Tomcat logs the following entries are being made,

 http://www.nabble.com/file/p21727814/Errors.txt Errors.txt

 After deploying the web console, do you need to configure any of the xml
 files in order to link to an instance of a broker that is running?

 Any pointers would be great,

 Thanks

 Richard

 --
 View this message in context:
 http://www.nabble.com/Webconsole-and-Tomcat-tp21706211p21727814.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.




 -
 Dejan Bosanac

 Open Source Integration - http://fusesource.com/
 ActiveMQ in Action - http://www.manning.com/snyder/
 Blog - http://www.nighttale.net


 --
 View this message in context: 
 http://www.nabble.com/Webconsole-and-Tomcat-tp21706211p21748402.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: NamingContext error in 5.2.0

2009-01-30 Thread James Strachan
Looks like a concurrency bug we should work around. In the mean time -
how about adding a synchronized block around looking up a queue in
JNDI? You should only need to look it up once on start up and not need
to look it up in each thread many times concurrently?

2009/1/30 Eric-AWL eric.vinc...@atosorigin.com:

 Hi

 On 5.2.0 release.

 I create 10 threads, each using the same dynamicQueues/CATE-CHARGE-charge
 queue

 I fail with

 javax.naming.NamingException: Something already bound at CATE-CHARGE-Charge
at
 org.apache.activemq.jndi.ReadOnlyContext.internalBind(ReadOnlyContext.java:150)
at
 org.apache.activemq.jndi.LazyCreateContext.lookup(LazyCreateContext.java:36)
at
 org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:258)
at
 org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:228)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at
 atosbus.transport.jms.CJMSSenderChannel.init(CJMSSenderChannel.java:97)
at
 atosbus.transport.jms.CJMSTransport.createSenderChannel(CJMSTransport.java:216)
at
 atosbus.core.service.CSynchronousContext.sendRequestCMessage(CSynchronousContext.java:559)
at
 atosbus.mep.CMepUnsafeInOnly.cltSendCommand(CMepUnsafeInOnly.java:191)
at
 atosbus.core.service.CSynchronousContext.sendCommand(CSynchronousContext.java:806)
at
 atosbus.core.service.CSynchronousContext.sendCommand(CSynchronousContext.java:731)
at chargebus.client.ClientThread.run(ClientThread.java:32)
at java.lang.Thread.run(Thread.java:595)

 I think I am in the case where  (in LazyCreateContext.lookup)
 super.lookup(name) sent the NameNotFoundException, but, when internalBind
 was called, the queue was just binded by an other thread.


 --
 View this message in context: 
 http://www.nabble.com/NamingContext-error-in-5.2.0-tp21749936p21749936.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: camel-mina, missing NUL line delimiter?

2009-01-29 Thread James Strachan
Could you use the Camel user forum please?
http://camel.apache.org/discussion-forums.html

2009/1/29 ejot mag...@derelik.net:

 From the docs the line delimiters AUTO, MAC, WINDOWS and UNIX are
 supported... but mina has another one, NUL (necessary when using for example
 Flash). Is there some other way to configure the delimiter when creating the
 route?
 --
 View this message in context: 
 http://www.nabble.com/camel-mina%2C-missing-NUL-line-delimiter--tp21726615p21726615.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Single consumer for multiple brokers?

2009-01-29 Thread James Strachan
The fanout transport kinda has most of the implementation code to do
this; it just needs to be hacked a little so that consume start/stop
commands are sent to multiple brokers and transactions/acks are
correctly sent to the broker that sent the original message. There
might be some fun and games with transactions in there mind; but for
simple-ish use cases it shouldn't be too hard to hack the
FanoutTransport if anyone fancies having a go


2009/1/29 Jim Lloyd jll...@silvertailsystems.com:
 I'm interested in a variation of this for load balancing. Assume the volume
 of data coming from publishers is very large, and you need N brokers (think
 N is 10 or more). Furthermore, you want N+1 or N+2 redundancy so that if any
 1 or 2 brokers die, there is sufficient capacity to continue handling all of
 the traffic (after affected publishers reconnect). The brokers might all be
 behind a hardware load balancer (e.g. F5 or NetScaler) so that all
 publishers connect via a virtual IP.

 Now, from the consumer side, we also have many consumers. Each consumer only
 subscribes to a subset of the available topics, and we arrange via design of
 our topics such that one consumer can always keep up with the volume of data
 published on one topic. But the consumer must connect to every broker.

 So, we need a fan-in variation of a failover transport that connects to
 every broker and actively consumes data from all brokers. If any broker
 disconnects, the consumer would use the exponential backoff reconnect logic
 to reconnect when the broker becomes available.

 So, the backup=true option isn't helpful. Instead, we want something like
 fan_in=true.

 It's not hard to build this kind of fan in logic on top of the failover
 transport, but it would be cool if the failover transport was capable of
 doing fan in directly.

 On Thu, Jan 29, 2009 at 8:13 AM, Gary Tully gary.tu...@gmail.com wrote:

 have you looked at the failover transport? see:
 http://activemq.apache.org/failover-transport-reference.html
 with the backup=true option, a connection to all listed brokers will
 be created so that they are in hot standby in
 the event that the first connection is dropped. In this way, failover
 can be very fast.

 2009/1/29 kaykay kaykay.uni...@gmail.com:
 
  This thread is old but just curious if there has been a recent update of
 this
  w.r.t ActiveMQ 5.2 . The problem that I am trying to solve is similar
 where
  a consumer listens to multiple brokers (as a failover redundancy issue
  instead of listening to a single broker).
 
 
  Stepan Koltsov wrote:
 
  I'm playing with 5.0.
 
  How do you think, is it hard to write new Transport that consumes from
  multiple brokers?
 
  S.
 
 
  ttmdev wrote:
 
  Yes, I got similar results in my consumer testing. What version of AMQ
  are you using?
 
  Your only recourse may be to multi thread your consumer and have it
  create a connection to each of the brokers.
 
 
 
 
  --
  View this message in context:
 http://www.nabble.com/Single-consumer-for-multiple-brokers--tp15768836p21729358.html
  Sent from the ActiveMQ - User mailing list archive at Nabble.com.
 
 



 --
 http://blog.garytully.com

 Open Source SOA
 http://FUSESource.com





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: log4j - Jndi context addToEnvironment has no effect

2009-01-29 Thread James Strachan
Have you tried just configuring whatever properties you need as a
Hashtable and passing them into the InitialContext() constructor?

2009/1/29 selezovikj semir.elezo...@gmail.com:

 I have a JmsQueueAppender that logs messages to an ActiveMQ broker on a given
 queue.
 I also have a jndi.properties file in which I do NOT specify the
 provider.url value, because that value can vary depending on a flag.

 In my JmsQueueAppender, the jndi context is initialized using the default
 no-argument constructor.


 jndi = new InitialContext();
 System.out.println(jndi.getEnvironment().toString());

 Printing the environment values which are gotten using the default
 constructor results with the following values which I have specified in my
 jndi.properties file:
 {java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory,
 queue.LoggingQueue=LoggingQueue}

 Later I add to the environment the provider.url value.

 jndi.addToEnvironment(Context.PROVIDER_URL,
 failover:(tcp://localhost:61617));
 System.out.println(jndi.getEnvironment().toString());

 results with:
 {java.naming.provider.url=failover:(tcp://localhost:61617),
 java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory,
 queue.LoggingQueue=LoggingQueue}

 Even though, the provider.url is added to the environment, when logging
 log4j does not take into account the provider url I just specified. It
 simply does not log to 61617.

 Any help with this ? ? ?
 --
 View this message in context: 
 http://www.nabble.com/log4j---Jndi-context-addToEnvironment-has-no-effect-tp21731483p21731483.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: getting started with stomp

2009-01-29 Thread James Strachan
Which port are you connecting to?

2009/1/29 lazyeye t.mcgee.lazy...@gmail.com:

 I'm trying to get started with stomp but I can't even get a telnet connecting
 working.
 I'm using activeMQ 5.2.0, java 1.6.0_10, windows xp professional v 2002
 service pack 2 and Microsoft telnet client.
 It looks like activeMQ stats up fine. The log file saids the stomp port is
 listening.
 The telnet open just waits with a Connecting To localhost... message.
 I most be missing somthing.

 --
 View this message in context: 
 http://www.nabble.com/getting-started-with-stomp-tp21735659p21735659.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Restricting queues

2009-01-28 Thread James Strachan
2009/1/28 dwout greenpor...@gmail.com:

 Hi,

 Is it possible to keep producers from sending messages to a queue that
 hasn't been defined in the activemq.xml config?

Yes, just use security to restrict admin access (to be able to create
new queues or topics)
http://activemq.apache.org/security.html

I was surprised to not find this in the FAQ so have added a new entry
http://cwiki.apache.org/ACTIVEMQ/how-do-i-restrict-connections-from-creating-new-queues-or-topics.html

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Update Broker Bridging while running?

2009-01-28 Thread James Strachan
2009/1/28 project2501 dar...@ontrenet.com:

 Hi,
  Is there a way to inform ActiveMQ to bridge to a new static tcp: broker
 address after it is running?
 I need to dynamically update the snf bridges, but won't have multicast
 ability.

 Can I do this without modifying the config and restarting it? Maybe via API
 or REST interface?

You can add and remove new Camel routes bridging from one broker to
another; hosting them in any JVM anywhere - or as an OSGi bundle
within an OSGi container you host the ActiveMQ broker (such as
ServiceMix Kernel)

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Receiving messages from a Topic

2009-01-26 Thread James Strachan
Are you using a fixed clientID and subscriberName?

2009/1/26 zunrise de...@artkontrast.de:

 First thx for quick reply. I'm already using durableconsumers. My
 subscribition Client is written in .net and I'm using NMS. Can anyone send
 me a sample code how to let it work. The problem is that the message isn't
 send to durable consumer, if the consumer subscribes first time after a
 message is send.



 Timothy Bish wrote:

 Sending to a topic that has no subscribers won't by default hold the
 message until someone subscribes.  You could use retroactive consumers,
 or durable consumers to solve this, or switch to using a queue if that
 would meet your needs.

 You may want to read the JMS tutorial to get a feel for when to use each
 solution.
 http://java.sun.com/products/jms/tutorial/1_3_1-fcs/doc/copyright.html

 regards
 Tim.

 On Mon, 2009-01-26 at 05:39 -0800, zunrise wrote:
 Hi,
 currentlly I have the following problem. If I first create a Publisher
 and
 send a message to a topic and after that I create a subscriber, the
 subscriber wont receive the send message. How can I solve this problem.
 Need
 help asap.

 Thx Denis
 --
 Tim Bish
 http://fusesource.com
 http://timbish.blogspot.com/






 --
 View this message in context: 
 http://www.nabble.com/Receiving-messages-from-a-Topic-tp21665556p2196.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Message Monitor for ActiveMQ

2009-01-22 Thread james . strachan
That sounds interesting! Would you consider donating it to the
ActiveMQ project so we could integrate it with the existing console?


On 22/01/2009, citron viklund_and...@hotmail.com wrote:

 Hi,

 I am just checking the general interest in a message monitor tool that I
 have developed for ActiveMQ.

 It's basically a web application based on Groovy/Grails, jSecurity, DWR and
 jQuery.

 I have attached a screen shot to give an idea what it looks like.

 For anyone interested, I can post the web application with some instructions
 on how to use it.



 http://www.nabble.com/file/p21609591/AndersTool_ActiveMQ.jpg
 --
 View this message in context:
 http://www.nabble.com/Message-Monitor-for-ActiveMQ-tp21609591p21609591.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.




-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Mirrored Queues

2009-01-19 Thread James Strachan
2009/1/19 benshort b...@benshort.co.uk:

 Is it possible to setup activemq to only mirror one queue?

The camel example I just gave does exactly that.

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Licence question, bundle ActiveMQ jar files

2009-01-19 Thread James Strachan
2009/1/19 citron viklund_and...@hotmail.com:

 Hi,

 I am about to release a freeware for monitoring topics and queues(virual
 topics) in ActiveMQ.

 I would like to know if it is ok to bundle needed ActiveMQ client jars with
 the application?

Sure - ActiveMQ is licensed under the Apache License v2...
http://activemq.apache.org/what-is-the-license.html

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: how to send xml message from ActiveMQ JMS to JAVA program

2009-01-15 Thread James Strachan
2009/1/15 manish_goyal manishkumar_go...@infosys.com:

 Hi,

 Can any one tell me how to send a XML message from ActiveMQ queue to JAVA
 program. Or in another way how to consume message from ActiveMQ using JAVA
 program.

The JMS tutorial might be a good place to start - to understand the JMS API etc
http://activemq.apache.org/how-do-i-get-started-with-jms.html

alternatively you could try using Apache Camel which hides all the
details of the JMS API and lets you produce and consume messages on
ActiveMQ very easily by using some annotations on your beans.

http://activemq.apache.org/camel/pojo-consuming.html
http://activemq.apache.org/camel/pojo-producing.html

We could use a better example in Camel of doing messaging with
ActiveMQ just using annotations; I've raised a JIRA to track this
https://issues.apache.org/activemq/browse/CAMEL-1259

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Persistant and Non-Persistant queues

2009-01-14 Thread James Strachan
2009/1/14 David Newcomb david.newc...@bigsoft.co.uk:

 Firstly, I am using Spring to help manage my Topics / Queues.

 To start with I'll give a brief explanation of my scenario.

 1. Work requests come into my system and are added to a non-persistant
 queue.
 2. Another thread takes entries out of the (non-persistent) queue, does some
 stuff and adds the request to a persisted topic.
 3. One or more remote hosts pick up requests from the topic and place them
 in
 their local queue.
 4. The remote host services the queue and messages are discarded.

 Each step transition is part of a transaction. However, there is no need for
 a transaction to join them all together i.e. as long as each transition was
 successful we can restart from where we left of.

 My question is a basic misunderstanding of ConnectionFactories and Brokers.
 On steps 1 and 2, I have a persistent and non-persistent queue in an
 embedded broker. How do I do this?

Persistence is a feature of the message, not the queue. This FAQ entry
should help...
http://activemq.apache.org/how-do-i-create-new-destinations.html


 From the http://activemq.apache.org/spring-support.html page it looks like
 you can only have one or the other. So do I need 2 brokers or do I do
 something with delivery options, or is it defined as a property of the
 queue/topic? The connection factory lets you specify the broker as vm://
 so how does it know which one you are talking to?

You only need a single broker

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Q Consumers stop receiving messages

2009-01-13 Thread James Strachan
Which version?

2009/1/13 IBeaumont ibeaum...@categoric.com:

 I've got a fairly complex app, that takes msgs, processing them and sticks
 them on the same or different queues.

 The queues are pre-loaded with persistent messages before the application
 starts (5).  Once it starts processing things work fine for a while and
 then the consumers stop receiving any messages.  I have a 4 consumers for
 each queue, and there are 3 different queues.

 Looking at jconsole all consumes are waiting here:

 State: WAITING on java.lang.obj...@1801d4a
 Total blocked: 20  Total waited: 158

 Stack trace:
 java.lang.Object.wait(Native Method)
 java.lang.Object.wait(Object.java:485)
 org.apache.activemq.MessageDispatchChannel.dequeue(MessageDispatchChannel.java:75)
 org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:412)
 org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:560)
 com.xalert.server.queuing.SessionManager.getAlert(SessionManager.java:236)


 If I look at the broker (and I'm not really sure what to look at here), the
 thread for my queue that should be dispatching messages looks like this
 Name: QueueThread:queue://csPIQ
 State: WAITING on
 java.util.concurrent.locks.abstractqueuedsynchronizer$conditionobj...@b0a518
 Total blocked: 2,365  Total waited: 6,717

 Stack trace:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.park(Unknown Source)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown
 Source)
 java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
 java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 java.lang.Thread.run(Unknown Source)

 The broker is configured with producerFlowControl=false, using TCP, a
 pre-fetch size of 0 and I've also set sendFailIfNoSpace=true.

 Any ideas on what my problem is or how/where I look in ActiveMQ to find the
 cause, or if the problem is with the consumer.

 TIA
 Ian

 --
 View this message in context: 
 http://www.nabble.com/Q-Consumers-stop-receiving-messages-tp21438163p21438163.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Newbie Question

2009-01-09 Thread James Strachan
2009/1/9 Glenn Macgregor gmacgre...@pocketkings.ie:
 Hi All,

 I am looking  into user ActiveMQ for our main message bus. I currently have a 
 few Java applications which we manage using JConsole (jmx) and monitor.

 This may seem like a strange question due to my lack of knowledge about 
 this...but is there a way to hook up my jmx enabled apps into ActiveMQ with 
 rewriting them?

You mean you wanna manage applications using ActiveMQ using JMX? If so sure...
http://activemq.apache.org/jmx.html

or do you mean you wanna send a message to all of your applications
which then invoke methods on mbeans? Kinda JMS - JMX - your app?
There are some JMX-over-JMS implementations around

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Nightly builds?

2009-01-08 Thread James Strachan
2009/1/7 James Strachan james.strac...@gmail.com:
 2009/1/7 James Strachan james.strac...@gmail.com:
 2009/1/7 mkeenan kee...@p2sol.com:

 I have a few questions about the current ActiveMQ release:

 1) I see a few links on this forum and on the ActiveMQ website that refer to
 the 5.3.0 Snapshot, but none of them pointed to any downloadable files. Is
 there any packaged version of 5.3.0 or is the only way to get it to pull
 from the source repository and run the build script?

 The download page has links to snapshots...
 http://activemq.apache.org/download.html

 but it looks like the nightly build hasn't been creating the assembly
 (as nightly builds get cleaned up if they are too old)

 It seems the jars are being created though...
 http://people.apache.org/repo/m2-snapshot-repository/org/apache/activemq/activemq-core/5.3-SNAPSHOT/

 Looks like the assembly fails
 http://projects.fusesource.com/builds/status

 am tinkering, we'll see if the next build works...

After a bit of googling and head scratching, the builds are working again now...
http://people.apache.org/repo/m2-snapshot-repository/org/apache/activemq/apache-activemq/5.3-SNAPSHOT/

root cause turned out to be too many hung builds using up the swap
space on the machine :)

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Deployment best practices

2009-01-07 Thread James Strachan
2009/1/7 nitingupta183 nitingupta...@gmail.com:

 Hi all,

 I am new to JMS and Messaging middle ware technologies. I need help in
 following areas to be able to design  a system in which I need to use a
 messaging middle ware:

 1) What are the best practices of deploying a JMS broker like ActiveMQ. Can
 it be deployed on the same physical machine as the main application itself?
 2) Is a JMS broker heavy weight? If I install a JMS broker on the same
 machine as my main application then are there any possibilities that my apps
 performance may go down.
 3) If I were to enable two way asynchronous communication with another
 application/component so should I setup broker at both the applications? The
 applications can be running on different physical machines and may be in
 different countries as well.
 4) If I setup the broker with anyone application and make use of different
 queues for incoming and outgoing message to achive two way communication
 with some other application, will it have any impacts on the network or
 performance.

BTW this thread is related to this other thread...
http://www.nabble.com/JMS-Design-related-question-td21325598s22882.html


-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: ActiveMQ - can it do tasks

2009-01-07 Thread James Strachan
2009/1/7 agatone zoran.z...@gmail.com:

 Hello,

 As I'm from non-Java world trying to get into this Java stuff it's quite
 hard to understand all JAVA stuff concepts. B/c of that I have problems
 understanding ActiveMQ manual (mostly i don't know how to define search
 terms that would get me something useful) so I decided to ask here.

 Basically I'd like to know only if these things are possible and what term
 to search for in manual (or google) so I can read about it.

 Can ActiveMQ invoke code (written: C#, JAVA, PHP etc) when certain message
 is received or in any other way do something when a message is received?

 I don't want to hang consumer on the activemq so it waits for the msg
 itself.

So you'd write programs in some language (C#, Java, PHP) which consume
messages from a queue - and your program would invoke whatever code
you like.

Typically ActiveMQ itself doesn't invoke things - your consumer
program consumes messages then invokes code.

You might have 1000 programs running on hundreds of servers - with a
single ActiveMQ broker dispatching messages to them for example.
-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: ActiveMQ - can it do tasks

2009-01-07 Thread James Strachan
2009/1/7 agatone zoran.z...@gmail.com:

 Ok, so I'll have to code durable consumers for every language i'll use and
 foreach topic , and it will be invkoing things.

Its normally just a couple of lines of code to write a consumer


 That kinda sounds lots of code with those 1000  :|

If you are averse to writing code; write a single program using a
single consumer which takes the String of the queue to use and the
name of the program to run; then you can fire off any executable you
wish when a message comes in.

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Nightly builds?

2009-01-07 Thread James Strachan
2009/1/7 mkeenan kee...@p2sol.com:

 I have a few questions about the current ActiveMQ release:

 1) I see a few links on this forum and on the ActiveMQ website that refer to
 the 5.3.0 Snapshot, but none of them pointed to any downloadable files. Is
 there any packaged version of 5.3.0 or is the only way to get it to pull
 from the source repository and run the build script?

The download page has links to snapshots...
http://activemq.apache.org/download.html

but it looks like the nightly build hasn't been creating the assembly
(as nightly builds get cleaned up if they are too old)

It seems the jars are being created though...
http://people.apache.org/repo/m2-snapshot-repository/org/apache/activemq/activemq-core/5.3-SNAPSHOT/

 2) Will there be a 5.2.x maintenance release, or will the current trunk
 eventually get rolled out as 5.3.0 ?

Probably the latter but its not set in stone yet
-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Nightly builds?

2009-01-07 Thread James Strachan
2009/1/7 James Strachan james.strac...@gmail.com:
 2009/1/7 mkeenan kee...@p2sol.com:

 I have a few questions about the current ActiveMQ release:

 1) I see a few links on this forum and on the ActiveMQ website that refer to
 the 5.3.0 Snapshot, but none of them pointed to any downloadable files. Is
 there any packaged version of 5.3.0 or is the only way to get it to pull
 from the source repository and run the build script?

 The download page has links to snapshots...
 http://activemq.apache.org/download.html

 but it looks like the nightly build hasn't been creating the assembly
 (as nightly builds get cleaned up if they are too old)

 It seems the jars are being created though...
 http://people.apache.org/repo/m2-snapshot-repository/org/apache/activemq/activemq-core/5.3-SNAPSHOT/

Looks like the assembly fails
http://projects.fusesource.com/builds/status

am tinkering, we'll see if the next build works...

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Objectmessage max size, how can i change it?

2008-12-23 Thread James Strachan
That looks like you're out of heap space - try increasing the JVM's heap

2008/12/23 silver1 martin.ku...@robotron.de:

 Hi,

 what is the maximum size of a objectmessage for sending over a
 ssl-protocoll? Is it 20 MB?
 Can I modify the size?

 I have tested (ApacheMQ Version 5.2) with a File (~ 25 MB) and get the
 following Error:

 Exception in thread main java.lang.OutOfMemoryError: Java heap space
 at
 org.apache.activemq.util.ByteArrayOutputStream.checkCapacity(ByteArrayOutputStream.java:59)
 at
 org.apache.activemq.util.ByteArrayOutputStream.write(ByteArrayOutputStream.java:48)
 at java.io.DataOutputStream.write(DataOutputStream.java:90)
 at
 java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838)
 at
 java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747)
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1161)
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
 at
 org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
 at
 org.apache.activemq.command.ActiveMQObjectMessage.copy(ActiveMQObjectMessage.java:80)
 at
 org.apache.activemq.command.ActiveMQObjectMessage.copy(ActiveMQObjectMessage.java:75)
 at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1634)
 at
 org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:227)

 I have increase the MemryUsage of the SystemUsage:
 memoryUsage limit=70 mb/
 but it has no positive effect.

 Must I use a BlobMessage instead?

 --
 View this message in context: 
 http://www.nabble.com/Objectmessage-max-size%2C-how-can-i-change-it--tp21142143p21142143.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.





-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Objectmessage max size, how can i change it?

2008-12-23 Thread James Strachan
2008/12/23 silver1 martin.ku...@robotron.de:

 Ah,

 thank you :)

 The maximum size of a Objectmessage is the maximum available memory space?

Its a bit more complex than that; the broker has a cache it tries to
maintain before enabling producer flow control.
http://activemq.apache.org/producer-flow-control.html

So I'd not suggest using massive messages unless you use the blob support.

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: actual status of activeMQ and AMQP

2008-12-19 Thread James Strachan
2008/12/19 loctorp boris.kartasch...@logica.com:

 Hi everyone,
 I was wondering about the current status of AMQP implementation into
 acticeMQ. On the project page it states, that there is a sandbox version and
 that developement has been paused.

 As we are interested in using activeMQ together with AMQP we were wondering
 if this status has changed and/or are interested in the up-to-date outlook.

The status hasn't changed since that wiki page was written. Welcome -
you're the first person ever to express any interest in AMQP with
ActiveMQ :)

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Rollback and acknowledge

2008-12-11 Thread James Strachan
2008/12/11 James Strachan [EMAIL PROTECTED]:
 2008/12/11 mmocnik [EMAIL PROTECTED]:



 James.Strachan wrote:

[...]
 Normally redelivery of the last message occurs - to avoid breaking
 order. Is that what you need?

 If you are not seeing this - are you closing  recreating the
 MessageConsumer on rollback?


 Oh, okay, that is what I am seeing.
 But its not what I want to happen.
 Can I somehow tell ActiveMQ to ignore the order of messages and just handle
 the messages as they come in?

 So messages being redelivered, you want then to go to the back of the
 queue? If thats what you want, don't rollback, just resend the message
 back onto the queue (so it'll go to the back of the list).

Closing and recreating the consumer often forces the rolled back
message to go back a bit (due to prefetch buffers and so forth)
http://activemq.apache.org/what-is-the-prefetch-limit-for.html

though I think putting redelivered messages at the tail of the queue
(so its dispatched last) is what you want - so resending the message
rather than rolling back  closing is probably more suitable

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Re: Rollback and acknowledge

2008-12-11 Thread James Strachan
2008/12/11 mmocnik [EMAIL PROTECTED]:


 James.Strachan wrote:

 [...]
 though I think putting redelivered messages at the tail of the queue
 (so its dispatched last) is what you want - so resending the message
 rather than rolling back  closing is probably more suitable

 Yes, that is what I want to achieve, but if I do it that way I'm loosing the
 benefits of redelivery by ActiveMQ:
 - RedeliveryDelay (with exponentialBackoff)
 - RedeliveryLimit

But those don't matter if the next message you are processing is a
totally different message?

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


  1   2   3   4   5   6   7   8   9   10   >