or "Message Queuing for C++", is an open source implementation of enterprise
messaging system, also referred to as message-oriented middleware (MOM).
enables C++ application threads to communicate with other threads locally or remotely
through the exchange of messages. A message is a request, report, and/or event
that contains information needed to coordinate communication between different
applications. A message provides a level of abstraction, allowing you to separate
the details about the destination system from the application code.
- enables C++ applications sharing a messaging system to
- simplifies application development by providing
a standard interface for creating, sending, and receiving messages.
allows to build clusterized services. A cluster consists of multiple server instances
running simultaneously and working together to provide increased scalability and
reliability. The server instances that constitute a cluster can run on the same
machine, or be located on different machines. Each server instance contains a
session repository of properties (a property represents a state of the service).
A session can be replicated on multiple server istance to protect service state.
If a server instance on which a service is running fails, another server instance
on which that service is deployed can continue application processing. Session
replication and service failover work also on heterogeneous platforms.
implements the following messaging paradigms:
- unsolicited messaging
- automatic reconnection
- connection failover
on multiple server
implements also the following services:
- advanced tracing for
- output on stdout
DDK WinDbg debugger
- thread safe garbage collector.
implementation of LinkedList and Vector patterns.
- timer (single
- thread safe logger.
queuing to avoid thread locks or infinite looping.
- lookup service:
- local services
- remote services
and remote threads referenced by handle.
- automatic clean-up
of network connections.
- socket transmission:
of same connections
- statistical multiplexing.
limited to 65 Kbytes to avoid buffer overflows.
- packets associated
to a sequence number.
- session management:
repository of properties
- session replication between multiple server
- inflight message encryption:
- Rijndael 256
- ready for more
- lossless data compression
coder with caching
- complex messages (like XML but in binary
As implementation of Request/Reply paradigm, MQ4CPP include
- Distributed lock manager to allow multiple threads
share any resources
- File transfer to transfer files between threads
- Memory channel to transfer big ammount of memory (for example a
cache) between threads.
MQ4CPP allows to build your client-server
or peer-to-peer application using C++ language and inheriting and extending its
allows also to build your high-perfomance computing (HPC) application, helping
you to break a data crunching algorithm in several threads and deploying it on
is compiled and tested on the following platforms:
- Windows 2000
- Windows XP (x86)
- Windows 2003 Enterprise
Server SP1 (SMP Itanium2)
- Linux Red Hat ES 3.0 (x86 - kernel
- Linux SuSE SLES 8 (SMP Itanium2 - kernel 2.4.21)
Red Hat ES 3.0 (SMP Itanium2 - kernel 2.4.21)
- Linux Red Hat EL
4.0 (SMP Itanium2 - kernel 2.6.9)
- Linux OpenSuse 10.1 (x86 - kernel
MQ4CPP has been successifully compiled also on Debian and
To develop this project I have used the following
SDK 1.4.2: to run Eclipse
3.0: for visual editing.
CDT 2.0 plug-in: for C and C++ editing.
Visual C++ Express 2005: include Intel x86 compiler, linker and standard C
and C++ libraries.
Platform SDK (Core SDK only): include Intel Itanium2 compiler and Windows
is licensed under the GNU Lesser
General Public License. This means that all source code, tools and documentation
is available free of charge for any purpose.
The main constraints of the
- Modifications of MQ4CPP should be made publically
- Make the MQ4CPP available as source with copyrights
- Clearly document customisations, modifications or changes
warranty or responsibility in relation to the suitability, functionality, reliability
or robustness of the software. This software is under constant revision, with
changes likely to some parts of application or API. All reasonable efforts are
made to supply the software without known defects or exploits, however no responsibility
can be accepted by the authors.
of direct/indirect messaging, unsolicited messaging,
broadcast, local and remote lookup.
version implements a reliable request/reply messaging with automatic reconnection
and connection failover on multiple server instances using round-robin algorithm.
See example7.cpp to learn how implement a client failover.
version implements a complete clustering for Request/Reply services. See example8.cpp
to learn how implement a cluster.
version fix a bug on session management and add message encryption using Rijndael
128/256 algorithm (source: mcrypt).
bugs due to multithreading conflicts are fixed. Trace is now integrated with MS
DDK WinDbg. Current version is composed by 48 C++ classes and about 5700 lines
of code (examples excluded).
version fix several bugs (threads dead locks) and implements publish/subscribe
paradigm. See example9 to learn how to implement it.
version implements Store&Forward paradigm. See example10 to learn how to implement
to support True3D*Shell
multithreading synchronization was redesigned to support SMP on x86 and IA64 on
Windows Server. This release uses CriticalSection instead of CreateMutex/WaitForSingleObject.
Thread queues and vectors use InterlockedExchange to enforce SMP cache coherency.
An '-MT' switch has been added to the makefile to link the C multithreaded run-time
library (LIBCMT.LIB). I added example11 to explain how send complex messages (like
XML but in binary format).
version implements Lock Manager, File transfer and Memory channel.|
release and bug fixes. Now it is supported the compiler Microsoft Visual C++ 2005
Express Edition. See README to setup your DOS environment.|
a performance problem during transmition in MessageProxy module and a bad deallocation
of tx message in RequestReply module. This version include a new compression algorithm
and a benchmark application to test MQ4CPP performances on your platform.|
version implements message routing. The benchmark application has been modified
to support local and remote message routing.
Thank to Janos Soos now MQ4CPP
has a new version '.bz2' compatible with libtool. Extract the file with 'bunzip2',
run './configure' and 'make' to compile all.
version improves message switching and fixes some bugs.|
version includes some patches for FreeBSD compatibility.|
Please report any problem or
request of support sending an e-mail here.