The Camel Rest DSL


Apache Camel is a piece of JBoss Fuse.  It is an open source integration framework with a variety of components to fit your integration needs.  Camel is a Java-based implementation of the Enterprise Integration Patterns based on a book by Gregor Hohpe and Bobby Woolf.  Camel includes components for HTTP, Files, FTP, JMS, JDBC, AWS, and much more.  While Camel can be used for many different purposes, this post will focus on the REST DSL specifically.

Continue reading “The Camel Rest DSL”


Lessons learned from using IoT devices in the real world

As a consultant, I’ve spent a decent amount of time working on a full stack development project in the realm of IoT. Over the years, our teams have run into a lot of avoidable issues. Here are some lessons I learned from using IoT devices in industry.

I define IoT as “connecting a device to a larger system with the goal of that device providing information to the system that is then leveraged in some way”. This can range from something like a FitBit to a Tesla to a smart fridge — all of which connect and report information to a cloud or back end, making them “internet of things” devices.

Continue reading “Lessons learned from using IoT devices in the real world”


Persistence vs. Durability in Messaging. Do you know the difference?

Messaging is a critical aspect of integrating systems, and while there are many different messaging platforms and infrastructures, a common request is for “zero loss of messages.”  From there, the terms “Persistence” and “Durability” often get thrown around, but what do those two things really mean?

Continue reading Persistence vs. Durability in Messaging. Do you know the difference?


Persistent Custom MDC Logging in Apache Camel

Logging is an ubiquitous need in any production quality application, and one common scenario is to log the active (logged in) username, or to log the user and order IDs for customer order event details. This is typically done to create an audit trail so that issues can be more easily traced should something go wrong, but there are any number of reasons why you might decide to create a custom log.

Mapped Diagnostic Contexts (MDCs) in Apache Camel are great for creating custom logging statements, and will easily meet our needs for these use cases.  MDC is offered by both slf4j and log4j, and is also supported by JBoss Logging. (Apache Camel is a part of the Red Hat JBoss Fuse integration platform.)

In addition, you can use something like GELF to automatically index any MDC, thus allowing them to be easily searched using ElasticSearch (logging configuration is not required for this feature), so there are a few reasons why this might be an appealing solution.

This article will demonstrate how to set up MDC to perform custom logging.

Continue reading “Persistent Custom MDC Logging in Apache Camel”


Should I learn OSGi? What’s the point?

Recently, I have been hearing a lot of debate around whether it is worth someone’s time to learn OSGi.  Doing a simple Google search on “OSGi usability” returns results filled with phrases such as “not easy to use”, “unproductive”, “developer burden”, and “going away”.  However, you will also find that it solves a lot of common issues in the JVM, particularly issues around class loading.  So is learning OSGi worth your time?

Continue reading “Should I learn OSGi? What’s the point?”