Message sequencing with Mule and JMS Message Groups

Reading Time: 6 minutes

During my years on the Mule Community forum I’ve noticed that there are some problem areas that are more common than others. One recurring question, that I thought I should address here, is how to preserve message order in JMS.

The first solution coming to mind is to use exclusive consumer, but I’ve come to realise that there are some disadvantages with exclusive consumer such as having active consumers doing nothing (I don’t like the idea of having workers ready to dig in but they are not allowed to). Another thing is that, with exclusive consumer, a message might block another message even though they really don’t have anything to do with each other. For example, let’s say we’re dealing with car orders, then you probably don’t want a order for a Volvo, that doesn’t go through, to block a order for a Saab (I’m Swedish).

Continue reading

Mule School: Invoking component methods using Entry Point Resolvers

Reading Time: 7 minutes

In the previous lesson Invoking Java Component Over HTTP, we learned how to invoke a simple method of a Java component in Mule Flow. Let’s now go a bit further and see how Mule maps a request message to a specific method in your component using Entry Point Resolvers.

At a high level, Mule uses three types of Entry Point Resolvers.

  1. Reflection Entry Point Resolver
  2. Annotated Entry Point Resolver
  3. Callable interface

In this article, I will focus on the Reflection Entry Point Resolver, which is used to determine the entry point on a component after a message has been received. The entry point is discovered using the message payload type(s) as the argument using reflection. For multiple parameters the payload should be an Array of objects. If the message payload is of type NullPayload the resolver will look for a no-argument method.

Continue reading

Working with Databases (JDBC) in Mule Studio

Reading Time: 12 minutes

In this blog post, I’ll give you some background information about JDBC, explain what Mule ESB and Studio do with JDBC, and demonstrate how can you use it in a simple example.

A little reference for JDBC:

JDBC, which stands for Java Database Connectivity, is basically an API that enables users to execute operations over a Data Source using the Java programming language. This API allows you to connect to almost any Data Source system, from relational databases to spreadsheets and flat files and, using the proper SQL syntax, you can perform queries, updates, deletes, or even execute store procedures.

Continue reading

Mule School: Integration with Social Media: Part I – Twitter

Reading Time: 8 minutes

This tutorial is the first in a series of blog posts that explain how to integrate Mule and Social Media.

Today’s post will focus on connecting to Twitter and sending a tweet (if you don’t know what Twitter is read this). Subsequent tutorials will cover:

Continue reading

Mule School: Getting started with JMS

Reading Time: 5 minutes

Mule Studio offers easy-to-use components to connect to JMS Queues and Topics. In today’s example, we’re going to learn how to use ActiveMQ, a leading open source JMS implementation from Apache that supports JMS 1.1 specification.

Here’s an outline of the simple steps required to implement this example:

  • Import ActiveMQ libraries
  • Create an ActiveMQ connector
  • Enqueue to JMS Queue
  • Run the sample
Continue reading

Announcing Mule 3.3 Release Candidate

Reading Time: 10 minutes

For the past few months we’ve been busy working hard on the next version of Mule, release 3.3.  This release candidate includes all the new features and improvements from Milestone  1 and Milestone 2, as well as those that we have introduced since.

As you’ll see, we didn’t slow down as we neared feature-complete, but continued to make high-impact improvements.  In a nutshell, this release includes:

  • Mule Expression Language – a concise way to work with any payload, message headers and attachments.
  • HTTP Response builder – a new element that makes it easy to work with HTTP responses for REST or general resource calls.
  • HTTP Proxy – a new pattern that allows you to front any HTTP resource with routing, filtering and caching.
  • Transformations – improved implicit transformation capabilities, enforcement and lookups, which make it easier to work with different data types and content types.
  • Syntax Sugar – a couple of new elements have been added to make it easier to work with variables and the payload and to make flows more concise and easier to read.
Continue reading

Mule School: Using Flow Controls – Choice Router

Reading Time: 7 minutes

Flow Controls, as the name suggests, control how messages are sent and received within a Mule flow. In the following examples, we’ll learn about the various Flow Controls that Mule offers. First up: Choice Router.

Choice Router allows us to route a request to a specific path based on an expression. Mule provides implementations of all the common enterprise integration patterns from this recommended book. The Choice router enables content-based routing, which is a common way to introduce routing logic based on content of the current message.

Continue reading