IBM MQ, AMQP and Zero MQ in 2 lines of code"

As suggested in the zeromq-dev list, here's an integration example making use of ZeroMQ.

THE CODE

Say you need to forward messages sent from ZeroMQ-based apps to AMQP and JMS WebSphere MQ ones.

No message transformation, no enrichment, validations - simply connect several incompatible technologies and, possibly, programming languages (let's say ZeroMQ one is in C++, AMQP is in Python and JMS is, unsurprisingly, in Java), like in the diagram below.

This is the whole code needed. 2 lines in addition to an import and class/method definition.

THE PHILOSOPHY

Zato is an open-source middleware/[ESB]/en/docs/3.2/intro/esb-soa.html) (Enterprise Service Bus) and backend server in Python designed for connecting other applications and creating systems of systems. This also known as working in [SOA - Service Oriented Architecture]/en/docs/3.2/intro/esb-soa.html).

You create interesting, reusable, atomic and loosely-coupled [services]/en/docs/3.2/intro/esb-soa.html) that are shielded from underlying technologies, transport methods or data formats. You can trivially access raw requests but you usually don't need to, you work on a higher level.

Services can be simultaneously exposed over independent channels, each possibly using different data format, transport method or security definition.

Almost everything in Zato is hot-deployed and hot-reconfigured, restarts are rarely needed.

You can use GUI, CLI, [API]/en/docs/3.2/index.html or (for devops seeking repeatable builds) manage objects en masse using a JSON config.

Let's use the GUI in this blog post. 3 things will be needed:

  • A ZeroMQ channel for incoming messages
  • An outgoing AMQP connection
  • An outgoing JMS WebSphere MQ connection

After filling out the forms like below a service can be hot-deployed and is ready to use.

AND MORE

What if out of a sudden another application needs to push data, say, through HTTP (which as of Zato 1.1 happens to be the only way to invoke services synchronously), using SOAP, JSON or anything?

You'll have to create a new REST channel, using GUI or other tools, and that's it. The service will have now been exposed through another channel, servers are automatically reconfigured and you can start invoking the service from HTTP, no restarts are needed.

You can also check the service's source code directly in the browser, browse its [statistics]/en/docs/3.2/index.html and do more using the GUI Dashboard, CLI or [API]/en/docs/3.2/index.html.

WHAT'S NEXT?

This was only a very simple example of a pass-through router and Zato can do much more. Please have a look at programming examples, architecture, [intro to ESB/SOA]/en/docs/3.2/intro/esb-soa.html) and more documentation over here.

Zato has HTTP, JSON, SOAP, SQL, AMQP, JMS WebSphere MQ, ZeroMQ, Redis NoSQL, FTP, browser-based GUI, CLI, API, security, statistics, job scheduling, load-balancing, hot-deployment and a lot of docs to cover everything.

The [tutorial]/en/docs/3.2/tutorial/01.html) will quickly help you get started using a scaled-down real-world integration example.

Please check out the support page if you'd like to chat or need assistance with anything.

Cheers!