{"id":20474189,"url":"https://github.com/marschall/jfr-jmstemplate","last_synced_at":"2025-06-17T23:36:07.987Z","repository":{"id":51245891,"uuid":"195370971","full_name":"marschall/jfr-jmstemplate","owner":"marschall","description":"an implementation of Spring JmsTemplate that generates Flight Recorder events","archived":false,"fork":false,"pushed_at":"2025-03-01T21:50:51.000Z","size":434,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T23:02:53.229Z","etag":null,"topics":["java-flight-recorder","jms","spring-jms"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marschall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-07-05T08:28:27.000Z","updated_at":"2025-03-01T21:50:54.000Z","dependencies_parsed_at":"2024-11-15T14:30:54.506Z","dependency_job_id":"faa64662-a225-41a0-8346-4a80f015e1cd","html_url":"https://github.com/marschall/jfr-jmstemplate","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/marschall/jfr-jmstemplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fjfr-jmstemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fjfr-jmstemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fjfr-jmstemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fjfr-jmstemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marschall","download_url":"https://codeload.github.com/marschall/jfr-jmstemplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fjfr-jmstemplate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260458535,"owners_count":23012495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java-flight-recorder","jms","spring-jms"],"created_at":"2024-11-15T14:28:32.479Z","updated_at":"2025-06-17T23:36:02.973Z","avatar_url":"https://github.com/marschall.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"JFR JmsTemplate [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.marschall/jfr-jmstemplate/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.marschall/jfr-jmstemplate) [![Javadocs](https://www.javadoc.io/badge/com.github.marschall/jfr-jmstemplate.svg)](https://www.javadoc.io/doc/com.github.marschall/jfr-jmstemplate)\n===============\n\nAn implementation of Spring [JmsTemplate](https://docs.spring.io/spring/docs/current/spring-framework-reference/integration.html#jms-jmstemplate) that generates [Flight Recorder](https://openjdk.java.net/jeps/328) events.\n\nVersions 2.x are for Jakarta EE 9+ / Spring 6, versions 1.x are for Jakarta EE 8 / Spring 5.\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.marschall\u003c/groupId\u003e\n  \u003cartifactId\u003ejfr-jmstemplate\u003c/artifactId\u003e\n  \u003cversion\u003e2.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n![Flight Recording of a JUnit Test](https://github.com/marschall/jfr-jmstemplate/raw/master/src/main/javadoc/screenshot.png)\n\nCompared 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.\n\nOverhead\n--------\n\nWe 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\n\n* a wrapper around `JmsTemplate`\n* a few `instanceof` operations and casts\n* a `finally` block\n\nWe assume `jakarta.jms.Queue#getQueueName()` and `jakarta.jms.Topic#getTopicName()` are simple getters.\n\nUsage\n-----\n\n```java\n@Configuration\npublic class JmsConfiguration {\n\n   @Autowired\n   private ConnectionFactory connectionFactory;\n\n   @Bean\n   public JmsOperations jmsOperations() {\n     return new JfrJmsOperations(new JmsTemplate(this.connectionFactory));\n   }\n\n}\n```\n\nLimitations\n-----------\n\n* 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarschall%2Fjfr-jmstemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarschall%2Fjfr-jmstemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarschall%2Fjfr-jmstemplate/lists"}