You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Kevin Burton <bu...@spinn3r.com> on 2015/10/31 20:05:41 UTC

Practical ActiveMQ threading restrictions.

The JMS threading restrictions are here:

https://docs.oracle.com/cd/E19340-01/820-6767/aeqdb/index.html

which basically say if you're using a MessageListener you have to work with
that message/session within the given onMessage function.

However, I don't think that's true WRT ActiveMQ is it?

I accidentally had some threads using commit/rollback/ and
consumers/producers outside of the original thread and everything worked
fine.

Additionally it would be nice to (maybe officially) relax this requirement.

I'd love to receive messages in one MessageListener event listener and then
send them between threads.

Kevin

-- 

We’re hiring if you know of any awesome Java Devops or Linux Operations
Engineers!

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>

Re: Practical ActiveMQ threading restrictions.

Posted by Kevin Burton <bu...@spinn3r.com>.
>
>
> You have to remember that the specs are generally written from the
> application developer's standpoint.  As a result, application developers
> must assume that for a portable application to work, the below is true.
> NOte that it doesn't say that the client must throw an exception, etc.
> This is to allow flexibility in the vendors to build more creative
> solutions.
>
> Probably a good caveat to think about now is that if you don't follow these
> rules, non-portable behavior may occur.
>

I agree. however, for me to make my code more portable I'd first have to
jump in and figure out a way to to resolve this.

There are PLENTY of JMS extensions in ActiveMQ.  this one in particular
just seems to be a bit difficult to work around.

KEvin

-- 

We’re hiring if you know of any awesome Java Devops or Linux Operations
Engineers!

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>

Re: Practical ActiveMQ threading restrictions.

Posted by "John D. Ament" <jo...@apache.org>.
Kevin,

You have to remember that the specs are generally written from the
application developer's standpoint.  As a result, application developers
must assume that for a portable application to work, the below is true.
NOte that it doesn't say that the client must throw an exception, etc.
This is to allow flexibility in the vendors to build more creative
solutions.

Probably a good caveat to think about now is that if you don't follow these
rules, non-portable behavior may occur.

John

On Sat, Oct 31, 2015 at 3:06 PM Kevin Burton <bu...@spinn3r.com> wrote:

> The JMS threading restrictions are here:
>
> https://docs.oracle.com/cd/E19340-01/820-6767/aeqdb/index.html
>
> which basically say if you're using a MessageListener you have to work with
> that message/session within the given onMessage function.
>
> However, I don't think that's true WRT ActiveMQ is it?
>
> I accidentally had some threads using commit/rollback/ and
> consumers/producers outside of the original thread and everything worked
> fine.
>
> Additionally it would be nice to (maybe officially) relax this requirement.
>
> I'd love to receive messages in one MessageListener event listener and then
> send them between threads.
>
> Kevin
>
> --
>
> We’re hiring if you know of any awesome Java Devops or Linux Operations
> Engineers!
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
>