[rabbitmq-discuss] rabbitmq - implement a proxy with RPC

mysurf mail stammailbox at gmail.com
Wed Mar 23 11:31:49 GMT 2011

All I want is the usage of an interface in the client . can the regular rpc
client supply me this>

and in another note :
I am experiencing problems in creating JsonRpcClient.
when debugging it - it stays on that line forever (doesnt move to the next
line of code)
when attaching the source I see it uses the primitive call of the RpcClient
when it asks
system.describe. I dont see it reaches to the server.
Should I supply something ?
here is my client code

JsonRpcClient client = null;
Connection conn = null;
Channel ch;
try {
       ConnectionFactory ConnFactory = new ConnectionFactory();
       conn = ConnFactory.newConnection();
       ch = conn.createChannel();
       Channel channel = getServerChannel().getChannel();
       client = new JsonRpcClient(channel, "", "positions");
} catch (IOException e) {
    throw new RuntimeException(e);
} catch (JsonRpcException e) {
    throw new RuntimeException(e);
return (PositionServerServices)

And in the server i am doing
server = new JsonRpcServer(channel, "PositionsQueue",
PositionServerServices.class, positionServerInternalServices);

(and positionServerInternalServices is my implemntor of the interface. )


On Wed, Mar 23, 2011 at 12:34 PM, Emile Joubert <emile at rabbitmq.com> wrote:

> Hi,
> If JSonRpcClient meets your needs then that is great news. Make sure that
> the JSON serialisation works for all parameters and return values you may
> wish to use. The JSON implementation is less general than other Java
> remoting alternatives, but in keeping with AMQP it does have the advantage
> of being platform-neutral.
> Regards
> Emile
> On 23/03/11 10:00, mysurf mail wrote:
>> Do you have a solution that lets me use an interface in the client?
>> I think I found the JSonRpcClient to be the closest
>> On Wed, Mar 23, 2011 at 11:37 AM, Emile Joubert <emile at rabbitmq.com
>> <mailto:emile at rabbitmq.com>> wrote:
>>    Hi,
>>    On 23/03/11 08:48, mysurf mail wrote:
>>        Hi,
>>        I would like to implement an rpc with rabbitmq.
>>        As with other rpc frameworks I would like to use an interface
>>        (skeleton)
>>        in the client and an interface with implementor on the server .
>>        Then I would be able to call the remote methods like they were in
>> my
>>        local client.
>>        so far I see RpcClient.stringCall which I will need to parse the
>>        string
>>        request myself.
>>        Is there any implementation as i described ?
>>    I assume you want a Java solution - RpcClient and RpcServer comes
>>    closest to what you need. It should be possible to extend those to
>>    work as you describe though.
>>    The .net client comes with a WCF two-way implementation that defines
>>    interfaces for messages in the way you describe. See the TwoWayTest
>>    calculator example.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110323/a96b8b0f/attachment.htm>

More information about the rabbitmq-discuss mailing list