rabbitmq-c
rabbitmq-c copied to clipboard
Add rpc_server example
Hello alanxz, well I've implemented rabbitmq-c , and work fine except for rpc-server. I need to create a type RPC from Java(Client RPM) to client in C(Server RPC), in this moment I implemented:
Java client basic_publish RPC ------> RabbitMQ --------> Rabbit-C Consume(amqp_listen.c)
I can read request from Java but I need return a response for the queue (amq.gen.XXXXXX) and
How do I do that ?
Thanks for the API.
Once you've consumed a message and processed it, your code should publish to the default exchange (amqp_empty_bytes
), with a routing key that is specified in the reply_to
header in the request message. Additionally your code should set the correlation_id
header to be the same as what is in the request message.
A lot of thanks Alanxz , my rpc-server implementation was successful:
https://github.com/alanxz/rabbitmq-c/compare/master...wallkietallkie:patch-1
Regards
Hi alanxz, actually I do not see any rpc_server file on the example folder, only one rpc_sendstrings file,. Is that you remove the rpc_server example to the other place? Thanks~
@rheerila there currently is no rpc_server example, this issue tracks adding this.
@alanxz So that's mean the driver currently still not support create rpc_server right?
@dhthong92 the library supports creation of a rpc-server, however there is no example provided describing how to do so.