Mary Cochran
Mary Cochran's contributions
Article
Camel Clustered File Ingestion with JDBC and Spring
Mary Cochran
Reading a file is a common use for Apache Camel. From using a file to kick off a larger route to simply needing to store the file content, the ability to only read a file once is important. This is easy when you have a single server with your route deployed, but what about when you deploy your route to multiple servers. Thankfully, Camel has the concept of an Idempotent Consumer . A useful way to implement this is with...
Article
Using Clustered Camel Quartz Jobs on JBoss EAP
Mary Cochran
Camel Quartz can be a useful component for jobs that need to run at a particular time every day. Recently on a client site, we had a need for about 15 different jobs that each created a differently formatted file and send each file to a particular destination. While this was straightforward to get setup on a single machine, once we started deploying our camel routes to multiple servers the jobs started to kick off on both machines. To resolve...
Article
Basic Camel and HTTPS
Mary Cochran
Ever wonder how you can set up and hit a basic https endpoint with camel? These directions are sure to help! First, configure your RouteBuilder. This RouteBuilder calls for two methods. Those will be defined down below. It then polls a jetty https endpoint. When the jetty endpoint gets a hit, it sends a request to https endpoint deployed elsewhere. public class MyRouteBuilder extends RouteBuilder{ public void configure() { configureJetty(); configureHttp4(); from("jetty:https://0.0.0.0:8080/sample/?matchOnUriPrefix=true") .to("https4://example.com:8081/?q=ssl&bridgeEndpoint=true&throwExceptionOnFailure=false"); } } Next, we need to define...
Article
The Camel Rest DSL
Mary Cochran
Camel 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. Rest DSL Overview...
Article
Lessons learned from using IoT devices in the real world
Mary Cochran
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...
Article
Persistence vs. Durability in Messaging. Do you know the difference?
Mary Cochran
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? Persistence At a basic level, persistence means that when failure occurs during message processing, the message will still be there (where you found it the first time) to process again once the failure is...
Article
Persistent Custom MDC Logging in Apache Camel
Mary Cochran
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...
Article
Should I learn OSGi? What's the point?
Mary Cochran
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? What is OSGi? OSGi is meant to solve...
![Apache Camel](/sites/default/files/styles/list_item_thumb/public/blog/2017/09/Screen-Shot-2017-09-07-at-2.19.37-PM.png?itok=g7NL9moq)
Article
Camel Clustered File Ingestion with JDBC and Spring
Mary Cochran
Reading a file is a common use for Apache Camel. From using a file to kick off a larger route to simply needing to store the file content, the ability to only read a file once is important. This is easy when you have a single server with your route deployed, but what about when you deploy your route to multiple servers. Thankfully, Camel has the concept of an Idempotent Consumer . A useful way to implement this is with...
![RedHat](/sites/default/files/styles/list_item_thumb/public/blog/2014/08/red_hat_rgb_150px.gif?itok=7WrX2cR_)
Article
Using Clustered Camel Quartz Jobs on JBoss EAP
Mary Cochran
Camel Quartz can be a useful component for jobs that need to run at a particular time every day. Recently on a client site, we had a need for about 15 different jobs that each created a differently formatted file and send each file to a particular destination. While this was straightforward to get setup on a single machine, once we started deploying our camel routes to multiple servers the jobs started to kick off on both machines. To resolve...
![fusetooling_icon Camel / Red Hat Fuse](/sites/default/files/styles/list_item_thumb/public/blog/2016/09/fusetooling_icon.gif?itok=5FM40g6N)
Article
Basic Camel and HTTPS
Mary Cochran
Ever wonder how you can set up and hit a basic https endpoint with camel? These directions are sure to help! First, configure your RouteBuilder. This RouteBuilder calls for two methods. Those will be defined down below. It then polls a jetty https endpoint. When the jetty endpoint gets a hit, it sends a request to https endpoint deployed elsewhere. public class MyRouteBuilder extends RouteBuilder{ public void configure() { configureJetty(); configureHttp4(); from("jetty:https://0.0.0.0:8080/sample/?matchOnUriPrefix=true") .to("https4://example.com:8081/?q=ssl&bridgeEndpoint=true&throwExceptionOnFailure=false"); } } Next, we need to define...
![fusetooling_icon Camel / Red Hat Fuse](/sites/default/files/styles/list_item_thumb/public/blog/2016/09/fusetooling_icon.gif?itok=5FM40g6N)
Article
The Camel Rest DSL
Mary Cochran
Camel 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. Rest DSL Overview...
![Article Thumbnail](/themes/custom/rhdp_fe/images/design/defaults/taxonomy_list_item_articles.webp)
Article
Lessons learned from using IoT devices in the real world
Mary Cochran
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...
![Article Thumbnail](/themes/custom/rhdp_fe/images/design/defaults/taxonomy_list_item_articles.webp)
Article
Persistence vs. Durability in Messaging. Do you know the difference?
Mary Cochran
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? Persistence At a basic level, persistence means that when failure occurs during message processing, the message will still be there (where you found it the first time) to process again once the failure is...
![Article Thumbnail](/themes/custom/rhdp_fe/images/design/defaults/taxonomy_list_item_articles.webp)
Article
Persistent Custom MDC Logging in Apache Camel
Mary Cochran
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...
![Should I learn OSGi? What's the point?](/sites/default/files/styles/list_item_thumb/public/blog/2016/04/osgi_logoimage.png?itok=RHag8Dwm)
Article
Should I learn OSGi? What's the point?
Mary Cochran
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? What is OSGi? OSGi is meant to solve...