subject

In this assignment you will need to install erlang and the rabbitmq server for your operating system. finally, for protocol support you will need to install the pika module. from pycharm inside your project go to file > settings > project settings > project interpreter. from there click on the green “+” to add a package to the project. enter pika in the search field at the top and select add package. now, you will need three python source files. one sender (send. py) and two receivers (receive. py). the sender will need establish a connection, channel and declare a queue. it will then need to send a message to the message queue once per second. you may use a while loop and the time. sleep function for this. the message should be something unique, like “my name is john doe and i love python! #” where is # is a running counter so you can see the message number. each of the receivers, will need to establish a connection to the same queue, register a call back, and start consuming any messages received. when a message is received it should be output to standard out. this assignment is not very realistic when implemented on a single computer but recognize that “localhost” need not be the address. the message queue could be located on one server with dozens of senders and receivers each located anywhere. as you are running your code, noticed that you can start the server. it will begin sending messages. wait a few seconds and start the receiver. notice that all messages are received even though some were sent before the receiver was started. this is one of the benefits of message queues, i. e. it maintains the message history and can deliver messages to clients even if they momentarily lose connectivity.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. a company is currently focusing on creating specific management goals for itself. which level of maturity is the company demonstrating under the sse_ccm framework? a. performed informally b. planned and tracked c. quantitatively controlled d. well-defined e. continuously improving
Answers: 2
question
Computers and Technology, 23.06.2019 21:30
Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest value. you may assume there is at least one value. (cascading/streaming logic, basic string processing)
Answers: 3
You know the right answer?
In this assignment you will need to install erlang and the rabbitmq server for your operating system...
Questions
question
Health, 18.03.2021 01:20
question
Mathematics, 18.03.2021 01:20
question
Mathematics, 18.03.2021 01:20
question
Mathematics, 18.03.2021 01:20
Questions on the website: 13722367