JFR JMS

A JMS wrapper that generates JFR events.

Лицензия

Лицензия

MIT
Группа

Группа

com.github.marschall
Идентификатор

Идентификатор

jfr-jmstemplate
Последняя версия

Последняя версия

0.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

JFR JMS
A JMS wrapper that generates JFR events.
Ссылка на сайт

Ссылка на сайт

https://github.com/marschall/jfr-jmstemplate
Система контроля версий

Система контроля версий

https://github.com/marschall/jfr-jmstemplate

Скачать jfr-jmstemplate

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.marschall/jfr-jmstemplate/ -->
<dependency>
    <groupId>com.github.marschall</groupId>
    <artifactId>jfr-jmstemplate</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.marschall/jfr-jmstemplate/
implementation 'com.github.marschall:jfr-jmstemplate:0.1.0'
// https://jarcasting.com/artifacts/com.github.marschall/jfr-jmstemplate/
implementation ("com.github.marschall:jfr-jmstemplate:0.1.0")
'com.github.marschall:jfr-jmstemplate:jar:0.1.0'
<dependency org="com.github.marschall" name="jfr-jmstemplate" rev="0.1.0">
  <artifact name="jfr-jmstemplate" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.marschall', module='jfr-jmstemplate', version='0.1.0')
)
libraryDependencies += "com.github.marschall" % "jfr-jmstemplate" % "0.1.0"
[com.github.marschall/jfr-jmstemplate "0.1.0"]

Зависимости

provided (2)

Идентификатор библиотеки Тип Версия
org.springframework : spring-jms jar
jakarta.jms : jakarta.jms-api jar 2.0.3

test (7)

Идентификатор библиотеки Тип Версия
org.junit.jupiter : junit-jupiter-api jar
org.junit.vintage : junit-vintage-engine jar
org.apache.activemq : activemq-broker jar 5.16.0
org.apache.activemq.tooling : activemq-junit jar 5.16.0
org.apache.logging.log4j : log4j-core jar 2.13.3
org.apache.logging.log4j : log4j-slf4j-impl jar 2.13.3
org.apache.logging.log4j : log4j-jcl jar 2.13.3

Модули Проекта

Данный проект не имеет модулей.

JFR JmsTemplate Maven Central Javadocs Build Status

An implementation of Spring JmsTemplate that generates Flight Recorder events.

This project requires Java 11 based on OpenJDK or later.

<dependency>
  <groupId>com.github.marschall</groupId>
  <artifactId>jfr-jmstemplate</artifactId>
  <version>0.1.0</version>
</dependency>

Flight Recording of a JUnit Test

Compared to approaches based on ConnectionFactory an approach based on JmsTemplate has the advantage that it captures a complete queue interaction. A JmsTemplate based approach generates a single JFR event for an entire message queue interaction that involves several JMS method invocations.

Overhead

We try to keep overhead to a minimum and have no additional allocations besides the JFR events. Besides the overhead of the event the only additional overhead is

  • a wrapper around JmsTemplate
  • a few instanceof operations and casts
  • a finally block

We assume javax.jms.Queue#getQueueName() and javax.jms.Topic#getTopicName() are simple getters.

Usage

@Configuration
public class JmsConfiguration {

   @Autowired
   private ConnectionFactory connectionFactory;

   @Bean
   public JmsOperations jmsOperations() {
     return new JfrJmsOperations(new JmsTemplate(this.connectionFactory));
   }

}

Limitations

  • We can not intercept JmsTemplate#setDefaultDestination(Destination) or JmsTemplate#setDefaultDestinationName(String) so for operations on the default destination we can not report the destination name.

Версии библиотеки

Версия
0.1.0