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 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
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
Partner Zones AWS Cloud
by AWS Developer Relations
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
Partner Zones
AWS Cloud
by AWS Developer Relations

Trending

  • The SPACE Framework for Developer Productivity
  • Auditing Tools for Kubernetes
  • Real-Time Made Easy: An Introduction to SignalR
  • Redefining DevOps: The Transformative Power of Containerization
  1. DZone
  2. Coding
  3. Frameworks
  4. Long Stacktraces in Apache Camel No More

Long Stacktraces in Apache Camel No More

Claus Ibsen user avatar by
Claus Ibsen
·
May. 30, 13 · Interview
Like (0)
Save
Tweet
Share
3.94K Views

Join the DZone community and get the full member experience.

Join For Free

In the upcoming Apache Camel 2.12 we have improved the internal routing engine to dramatically reduce the stacktraces our end users will see when an exception occurs and is logged.

During the development of the improvement we had a small sample route for benchmarking.
It was basically a simple route with:

from("seda:start")
  .to("log:foo")
  .to("log:bar")
  .to("log:baz")
  .process(new Processor ...);


And in the processor we forced an exception being logged. In Apache Camel 2.11.x the stacktrace would be around 40 lines. The Camel team managed to reduce this down to 15 lines. And the bottom 6 lines is 3 from the JVM and 3 from the seda consumer. So in between the routing engine is executing; and that's where we have optimized the code. So we went from (40-6 = 34) to (15-6 = 9). Eg before we had 34 lines during the routing, and that is down to 9 now.

Camel is still executing the same functionality. As an end user there is no functionality turned off or missing now. Its all still there and being executed; just in a different way. What we did was refactor most of the internal cross cutting functionality into a single entity CamelInternalProcessor (name subject for change), and fold that into a single stack-frame being executed.

This improvement is internal changes only, and all end users Camel application is upgrade compatible.

For our end users who have been debugging the Camel source code, this is now also simpler, as we added code comments in the CamelInternalProcessor with pointers how to do this easier, and which part you can safely skip over, to make your debugging experience easier and faster.

And speaking of debugger. Then we also added a new BacklogDebugger, which is a Camel routing debugger JMX MBean which is ready to use for tooling and end users. For example you can use it easily set breakpoints, single step a message in the routes, and edit/view its message content. Now for the graphical UI, then James Strachan is hacking on hawtio to add this in the upcoming hawtio 1.2 release. And since its JMX based you can always use it from a JMX console such as JConsole or JVisualVM. And for the brave a plugin to Eclipse / IDEA could be developed to integrate it with their native debugger; but thats a big task to take on.

For further details and background on the stacktrace improvement then you can take a look at the ticket CAMEL-6077 and our discussion on the Camel developer mailing list. As well we have a sample of the before and after stacktraces in the CAMEL-6077 ticket.
Apache Camel

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

Opinions expressed by DZone contributors are their own.

Trending

  • The SPACE Framework for Developer Productivity
  • Auditing Tools for Kubernetes
  • Real-Time Made Easy: An Introduction to SignalR
  • Redefining DevOps: The Transformative Power of Containerization

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

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: