public JsonAmqpRpcServer(string hostName, string queueName, IJsonRpcHandler handler) { _log = LogManager.GetCurrentClassLogger(); _log.Info("AMQP RPC server starting: host = {0}; queue = {1}", hostName, queueName); _messaging = AmqpRpc.CreateMessaging(AmqpRpc.CreateConnector(hostName), queueName); _handler = handler; }
public JsonAmqpRpcClient(string hostName, string target) { _target = target; var connector = AmqpRpc.CreateConnector(hostName); _messaging = Factory.CreateMessaging(); _messaging.Connector = connector; _messaging.SetupReceiver += channel => { _replyTo = channel.QueueDeclare(); _messaging.QueueName = _replyTo; }; _messaging.QueueName = "DUMMY_QUEUE_NAME"; _messaging.Init(); }