Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Monitor/read the number of active JMS/EJB sessions

44 views
Skip to first unread message

Christoffer A. Nilsen

unread,
Jan 9, 2025, 11:11:10 AMJan 9
to WildFly
I already asked about this previously, earlier in 2024, but will attempt again before I start coding my own workaround solution.

Is there a way to monitor/read the number of active JMS/EJB sessions?

My task/goal is to be able to create speedometers displaying the number of active sessions for each of my MessageListener(s).

Details
Remote Artemis ActiveMQ 2.30.0
Wildfly 31


MessageListener Example
...
@ResourceAdapter("remote-artemis")
@MessageDriven(name = "MyMDB", activationConfig = {
   ...
   @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "75")
})
@Pool(value = "my-pool")
public class MyMDB implements MessageListener {
   @Override
   public void onMessage(final Message message) {...}
}

Display Example


The only workaround I have thought about so far (using wildfly-stats) is monitoring invocations (Number of invocations processed) fairly often and subtracting the previously read value with the latest one.

Emmanuel Hugonnet

unread,
Jan 9, 2025, 11:38:40 AMJan 9
to wil...@googlegroups.com
Hello,
I'm adding a feature to get the number of active session on the embedded broker. Not sure that would provide you with the info you want
since in your case you are using a remote broker.
Emmanuel



Le 09/01/2025 à 17:11, 'Christoffer A. Nilsen' via WildFly a écrit :
> I already asked about this previously, earlier in 2024, but will attempt again before I start coding my own workaround solution.
>
> *Is there a way to monitor/read the number of active JMS/EJB sessions?*
> *
> *
> My task/goal is to be able to create speedometers displaying the number of active sessions for each of my MessageListener(s).
>
> *Details*
> Remote Artemis ActiveMQ 2.30.0
> Wildfly 31
> *
> *
>
> *MessageListener* *Example*
> ...
> @ResourceAdapter("remote-artemis")
> @MessageDriven(name = "MyMDB", activationConfig = {
>    ...
>  @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "75")
> })
> @Pool(value = "my-pool")
> public class MyMDB implements MessageListener {
>    @Override
>    public void onMessage(final Message message) {...}
> }
>
> *Display Example*
>
>
> The only workaround I have thought about so far (using wildfly-stats) is monitoring invocations
> <https://docs.wildfly.org/31/wildscribe/deployment/subdeployment/subsystem/ejb3/message-driven-bean/index.html#attr-invocations> (Number
> of invocations processed) fairly often and subtracting the previously read value with the latest one. --
> You received this message because you are subscribed to the Google Groups "WildFly" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/wildfly/b2312136-3230-4a45-9215-32522180523en%40googlegroups.com
> <https://groups.google.com/d/msgid/wildfly/b2312136-3230-4a45-9215-32522180523en%40googlegroups.com?utm_medium=email&utm_source=footer>.

Christoffer A. Nilsen

unread,
Jan 10, 2025, 3:53:19 AMJan 10
to WildFly
Thank you for your reply.
Since we are using remote ActiveMQ I don't think this will be relevant for us.
But the feature you are adding, this is ActiveMQ sessions and not JMS sessions right? I believe "remote" ActiveMQ Artemis already have an API to retrieve that information.

Emmanuel Hugonnet

unread,
Jan 10, 2025, 9:32:11 AMJan 10
to Christoffer A. Nilsen, WildFly
Le 10/01/2025 à 09:53, 'Christoffer A. Nilsen' via WildFly a écrit :
> Thank you for your reply.
> Since we are using remote ActiveMQ I don't think this will be relevant for us.
> But the feature you are adding, this is ActiveMQ sessions and not JMS sessions right? I believe "/remote"/ ActiveMQ Artemis already have
> an API to retrieve that information.
Correct, but JMS sessions are ActiveMQ sessions with a specific field to be able to detect them.
Emmanuel
> <https://groups.google.com/d/msgid/wildfly/b2312136-3230-4a45-9215-32522180523en%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> --
> You received this message because you are subscribed to the Google Groups "WildFly" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/wildfly/d05c839f-9b75-4f22-a891-8995d2ce4415n%40googlegroups.com
> <https://groups.google.com/d/msgid/wildfly/d05c839f-9b75-4f22-a891-8995d2ce4415n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages