Write a C program to develop message-oriented middleware?
-
Create three message queues. Allow various processes to become subscriber of any of these queues. Few processes may become subscriber for multiple message queues. Define three independent processes as message producer. Each message producer is responsible for writing messages to a specific message queue assigned to it. Allow numbers of messages to be written to these three message queues. Generate few (5-10) individual and independent processes. Each message consumer should read appropriate message from the message queue to which it defined as a subscriber. Define proper action for each message consumer after receiving messages.
-
Answer:
You would make one message queue server that listens to two TCP socket for connections. There would be two TCP listening ports, one for writers, and another for readers. A producer connects to the message queue server writer port and sends a message. The message queue server go through the list of connected readers (consumers), and forward the message to all of them. To have three queues, you run three instances of your message queue server, and give each instance different listening port numbers using command line parameters.
Patel Komal at Yahoo! Answers Visit the source
Related Q & A:
- How to write a parser in C?Best solution by Stack Overflow
- How to write a program to monitor the temperature of CPU?Best solution by Stack Overflow
- How Can I use .net dll in C program?Best solution by Stack Overflow
- How to run an executable from within a c program?Best solution by Stack Overflow
- How to write a TV program proposal?
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.