Skip to content

amchayd/Rabbitmq-RPC-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rabbitmq RPC With Java

Prerequisites:

Install Rabbitmq-server

Components:

Publisher:

The Publisher create a Request Object which contains three fields two operands and oprator

public class Request implements Serializable{
	private double valeur1;
	private double valeur2;
	private String operator;
  //...
  }

Then send it to the Publisher using basicPublish() of Channel Object

  channel.basicPublish("", requestQueueName, props, data);

Consumer:

The Consumer receive the Request Object then parse it. Then send the response to the Publisher using Queues.

public class Response implements Serializable{
	private String msg;
	private Status status;
  //...
  }
  public static enum Status {
		SUCCESS,
		ERROR
		}

Communication:

The communication between the two Components ensured RabbitMQ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages