DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • Microservices With Apache Camel and Quarkus (Part 5)
  • Microservices With Apache Camel and Quarkus (Part 3)
  • Microservices With Apache Camel and Quarkus (Part 2)
  • Microservices With Apache Camel and Quarkus

Trending

  • Database Monitoring: Key Metrics and Considerations
  • Announcing DZone Core 2.0!
  • Logging to Infinity and Beyond: How To Find the Hidden Value of Your Logs
  • Microservices With Apache Camel and Quarkus (Part 5)
  1. DZone
  2. Coding
  3. Frameworks
  4. Defining Custom JMX Attributes in Apache Camel 2.16

Defining Custom JMX Attributes in Apache Camel 2.16

It used to not be possible to add custom JMX operations, but see how Clause Ibsen is working to commit custom JMX components.

Claus Ibsen user avatar by
Claus Ibsen
·
Aug. 13, 15 · Tutorial
Like (2)
Save
Tweet
Share
1.67K Views

Join the DZone community and get the full member experience.

Join For Free

Apache Camel 2.16 - Components with custom JMX is now an addon on top of the standard set of JMX.

In the upcoming Apache Camel 2.16, I took a second attempt (I am currently writing about JMX for the Camel in Action 2nd edition book) of making it much easier to define custom JMX attributes and operations on your components, and have that added it to the standard set of JMX that Camel provides by default.

Beforehand, it was not possible to add custom JMX operations to the standard set. To make this possible, you would need to re-expose the standard set of JMX in your custom component.

But I am happy to have found a solution that is being committed shortly to Apache Camel 2.16. 

This simple custom component (from the Camel in Action book) exposes a single JMX attribute named verbose on the custom component called ERP.

The custom component exposes a JMX attribute named Verbose. Using this component at runtime in Apache Camel 2.15.2 only shows the Verbose attribute:

But the same code running on Apache Camel 2.16.0 now has all the default JMX attributes and operations as well:

This works also for any custom bean you may use in your routes. For example, if you call a POJO using bean in the route DSL, then the custom POJO will be listed in JMX under processors. All you have to do in your POJO is annotate it with the Camel @ManagedResources and then @ManagedAttribute for attributes and @ManagedOperation for operations.

All the existing Camel components we have (150+) could also benefit from this. They would be able to expose more custom information in JMX for their endpoints, consumer, producers, etc. We have held back a bit in the past to do this due to this problem. This task has been logged as CAMEL-9074.

Apache Camel Attribute (computing)

Published at DZone with permission of Claus Ibsen, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Microservices With Apache Camel and Quarkus (Part 5)
  • Microservices With Apache Camel and Quarkus (Part 3)
  • Microservices With Apache Camel and Quarkus (Part 2)
  • Microservices With Apache Camel and Quarkus

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: