Practical ActiveMQ threading restrictions.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Practical ActiveMQ threading restrictions.

Kevin Burton
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>
Reply | Threaded
Open this post in threaded view
|

Re: Practical ActiveMQ threading restrictions.

John D. Ament-2
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 <[hidden email]> 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>
>
Reply | Threaded
Open this post in threaded view
|

Re: Practical ActiveMQ threading restrictions.

Kevin Burton
>
>
> 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>