In the case of a client using the core protocol the
ActiveMQSessionCreationException would be directly returned when they tried
to create a new session beyond the configured limit. The exception would
have a message like this:

  AMQ229110: Too many sessions for user 'myUser'. Sessions allowed: 1.

Hope that helps!


Justin

On Fri, Sep 30, 2022 at 1:38 PM Wael Al-Manasrah <
wael.al-manas...@uwaterloo.ca> wrote:

> Thanks Justin,
>
> I am not interested in a specific protocol; however, if you can tell me
> what happens for the Core protocol it would be great. I just want to know
> if the client would be notified with some error/exception about why the new
> connection was refused!
>
> Thanks again,
>
> Wael.
> ________________________________
> From: Justin Bertram <jbert...@apache.org>
> Sent: Friday, September 30, 2022 2:32 PM
> To: users@activemq.apache.org <users@activemq.apache.org>
> Subject: Re: ActiveMQ Artemis maximum connection limit
>
> > Does Artemis refuse new connections with an error/exception?
>
> It depends on what you mean. The broker will refuse to allow the new
> connection, and it will throw an
> org.apache.activemq.artemis.api.core.ActiveMQSessionCreationException
> internally. However, how exactly that error is translated to the client
> will depend on the protocol that client is using and also how the client
> implementation deals with what is returned. ActiveMQ Artemis supports
> OpenWire, core, AMQP, STOMP, & MQTT. Are you concerned with a particular
> protocol and client implementation?
>
>
> Justin
>
> On Fri, Sep 30, 2022 at 1:22 PM Wael Al-Manasrah <
> wael.al-manas...@uwaterloo.ca> wrote:
>
> > Hello,
> >
> > I am a graduate student @ University of Waterloo. I am conducting a
> > comprehensive survey of open-source messaging middleware, I am trying to
> > figure out what happens when a user max-connections resource limit is
> > reached. Does Artemis refuse new connections with an error/exception?
> This
> > link<
> >
> https://github.com/apache/activemq-artemis/blob/e364961c8f035613f3ce4e3bdb3430a17efb0ffd/docs/user-manual/en/resource-limits.md
> >
> > has all what I could find about resource limits in Artemis!
> >
> > Thanks in advance and sorry for an inconvenience,
> >
> > Wael.
> >
>

Reply via email to