RE: session sharing question

2022-12-21 Thread John Lilley
Thanks! This is related to another question I’ve had, which is, if the broker restarts without an HA failover, or the client is unable to communicate with the broker for some time, do JMS objects become invalid and need to be recreated? If so, might it be easier to use pooling of connections/s

Re: session sharing question

2022-12-21 Thread Justin Bertram
Generally speaking I would recommend delegating everything you can to a connection pool (e.g. this [1]) and spend your developer productivity elsewhere. Justin [1] https://github.com/messaginghub/pooled-jms On Wed, Dec 21, 2022 at 1:02 PM John Lilley wrote: > Greetings! > > > > I have noticed

Re: session sharing question

2022-12-21 Thread Justin Bertram
JMS Session objects have never been thread safe. You can use them however you want as long as you guarantee thread safety. That said, thread safety is notoriously difficult to implement & debug and Sessions are considered "lightweight" objects so there's not much cost to creating a Session for ever

Re: session sharing question

2022-12-21 Thread Jan Šmucr
My producers used to leak sessions and I could get easily as far as about 16k sessions per producer without much effect on the broker. What I do now is that I have a pool of worker threads, and each of the threads has its own session opened. Whenever there's a need, I ask the pool to do a Calla

session sharing question

2022-12-21 Thread John Lilley
Greetings! I have noticed that I cannot share a session between threads, at least not when using the JMS API. Because of that, we are creating a new session for every producer. But is that necessary? Can I share that session between all of my producers so long as there is no simultaneous use?

Re: Getting client-side error "Failed to create session"

2022-12-21 Thread Justin Bertram
The root caused-by is a java.lang.InterruptedException. It looks like something invoked interrupt() [1] on the Thread calling javax.jms.Connection#createSession. I wouldn't expect this to be coming from the ActiveMQ Artemis core JMS client. Justin [1] https://docs.oracle.com/en/java/javase/11/do

Getting client-side error "Failed to create session"

2022-12-21 Thread John Lilley
Greetings! Under circumstances which we have yet to fully qualify, we are getting the stack trace below. Can anyone shed light? Right now I’m just trying to understand if this is something we are doing, or something that the AMQ driver does under certain circumstances. Especially mysterious

RE: Message Selectors vs multiple queues

2022-12-21 Thread John Lilley
Thanks! [rg] John Lilley Data Management Chief Architect, Redpoint Global Inc. 888 Worcester Street, Suite 200 Wellesley, MA 02482 M: +1 7209385761 | john.lil...@redpointglobal.com From: Justin Bertram Sent: Wednesda

Re: activemq purge command effects and usage?

2022-12-21 Thread wendellhatcher1074
Thank you.  😊 Sent via the Samsung Galaxy Note20 Ultra 5G, an AT&T 5G smartphone Original message From: Jean-Baptiste Onofré Date: 12/21/22 12:32 AM (GMT-05:00) To: users@activemq.apache.org Subject: Re: activemq purge command effects and usage? If you purge the destination (

Re: Message Selectors vs multiple queues

2022-12-21 Thread Justin Bertram
Generally speaking I would avoid use-cases involving a JMS queue + selectors when possible for the following reasons: - The queue has to be scanned over and over for messages which match the selectors. The deeper the queue gets the more scanning is required. This adds up over time. - A single qu

RE: Message Selectors vs multiple queues

2022-12-21 Thread John Lilley
Thanks! [rg] John Lilley Data Management Chief Architect, Redpoint Global Inc. 888 Worcester Street, Suite 200 Wellesley, MA 02482 M: +1 7209385761 | john.lil...@redpointglobal.com From: Jan Šmucr Sent: Tuesday, Dece

RE: Recovery from broker OOM

2022-12-21 Thread John Lilley
Hi Justin! Thanks for the reply. Let me try to round up all of the settings and symptoms a little more carefully. john [rg] John Lilley Data Management Chief Architect, Redpoint Global Inc. 888 Worcester Street, Suite 200 Wellesley, MA 02482 M: +1 720938